From f18c78c262089284bf6099b3fc37c61cdfb4cfaf Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期四, 26 十二月 2024 14:33:08 +0800 Subject: [PATCH] 完成人员迁移 --- src/components/do/a6-personnel/training-record.vue | 319 +++ src/components/view/a7-changes-standard-methods.vue | 23 src/components/do/a6-personnel/personnel-information.vue | 948 ++++++++++ src/assets/api/controller.js | 150 + src/components/do/a6-personnel/personnel-supervision.vue | 100 + src/components/do/a6-personnel-training/AddInDetail.vue | 173 + src/components/do/a6-personnel/job-responsibilities.vue | 374 ++++ src/components/do/a6-personnel-training/Edit.vue | 448 +++++ src/components/do/a6-personnel-training/index.vue | 794 ++++++++ src/main.js | 2 src/components/do/a6-personnel-collect/personnel-list.vue | 388 ++++ src/components/do/a6-personnel/personnel-capacity.vue | 579 ++++++ src/components/do/a6-personnel/reward-punishment-record.vue | 329 +++ src/components/do/a6-personnel/track-record.vue | 299 +++ src/components/do/a8-file-handling/FileChangeRequest.vue | 3 src/components/view/a7-method-verification.vue | 22 src/components/view/a6-personnel.vue | 324 +++ src/components/view/a7-Ensure-results-validity.vue | 49 18 files changed, 5,299 insertions(+), 25 deletions(-) diff --git a/src/assets/api/controller.js b/src/assets/api/controller.js index 7e33442..8fa13dc 100644 --- a/src/assets/api/controller.js +++ b/src/assets/api/controller.js @@ -70,6 +70,8 @@ feCalibrationSchedule, feStandardSubstance, feStandardSubstanceRecord, + personPostAuthorizationRecord, + deviceCheck, } } @@ -179,28 +181,31 @@ } const deviceScope = { - selectDeviceParameter: "/deviceScope/selectDeviceParameter", //鏌ヨ璁惧璇︽儏鍒楄〃 - addDeviceParameter: "/deviceScope/addDeviceParameter", //娣诲姞璁惧璇︽儏鍙傛暟 - delDeviceParameter: "/deviceScope/delDeviceParameter", //鍒犻櫎璁惧璇︽儏鍙傛暟 - upDeviceParameter: "/deviceScope/upDeviceParameter", //淇敼璁惧璇︽儏鍙傛暟 - selectDeviceByCategory: "/deviceScope/selectDeviceByCategory", //閫氳繃璁惧鍒嗙被鑾峰彇璁惧鍒楄〃 - authorizedPerson: "/user/getDeviceManager", //鑾峰彇鎺堟潈浜� - selectEquipmentOverview: "/deviceScope/selectEquipmentOverview", //鑾峰彇璁惧鎬昏 - uploadFile: "/deviceScope/uploadFile", //涓婁紶鍥剧墖 - selectDevicePrincipal: "/user/getDeviceManager", //鑾峰彇璁惧璐熻矗浜� - selectDeviceByCode: "/deviceScope/selectDeviceByCode", //閫氳繃璁惧缂栧彿鑾峰彇璁惧鍒楄〃 - getNumberCollect: "/deviceScope/getNumberCollect", //鏌ヨ鏁伴噰閰嶇疆 - numberCollect: "/deviceScope/numberCollect", //缁存姢鏁伴噰閰嶇疆 - saveDataAcquisitionConfiguration: "/deviceScope/saveDataAcquisitionConfiguration", // 缁存姢鏁伴噰閰嶇疆 - queryDataAcquisitionConfiguration: "/deviceScope/queryDataAcquisitionConfiguration", // 鏌ヨ鏁伴噰閰嶇疆 - deleteDataAcquisitionConfiguration: "/deviceScope/deleteDataAcquisitionConfiguration", // 鍒犻櫎鏁伴噰閰嶇疆 - determineWhetherToCollectData: "/deviceScope/determineWhetherToCollectData", // 鍒ゆ柇璇ヨ澶囨槸鍚﹀彲浠ユ暟閲� - dataCollection: "/deviceScope/dataCollection", // 鏁伴噰-鏁版嵁閲囬泦 - treeDevice: "/deviceScope/treeDevice", // 璁惧鏍戝舰 - temDataAcquisition: "/deviceScope/temDataAcquisition", // PK8000鏁伴噰 - temDataAcquisition2: "/deviceScope/temDataAcquisition2", // PK8000鏁伴噰--澶氭潯 - formulaCalculation: "/deviceScope/formulaCalculation", // 鏁伴噰-鍏紡璁$畻 + selectUserList: '/deviceScope/selectUserList', //鑾峰彇鐢ㄦ埛鍒楄〃 + selectDeviceParameter: '/deviceScope/selectDeviceParameter', //鏌ヨ璁惧璇︽儏鍒楄〃 + addDeviceParameter: '/deviceScope/addDeviceParameter', //娣诲姞璁惧璇︽儏鍙傛暟 + delDeviceParameter: '/deviceScope/delDeviceParameter', //鍒犻櫎璁惧璇︽儏鍙傛暟 + upDeviceParameter: '/deviceScope/upDeviceParameter', //淇敼璁惧璇︽儏鍙傛暟 + selectDeviceByCategory: '/deviceScope/selectDeviceByCategory', //閫氳繃璁惧鍒嗙被鑾峰彇璁惧鍒楄〃 deviceScopeSearch: "/deviceScope/search", //閫氳繃璁惧鍒嗙被鑾峰彇璁惧鍒楄〃 + authorizedPerson: '/user/getDeviceManager', //鑾峰彇鎺堟潈浜� + selectEquipmentOverview: '/deviceScope/selectEquipmentOverview', //鑾峰彇璁惧鎬昏 + uploadFile: '/deviceScope/uploadFile', //涓婁紶鍥剧墖 + selectDevicePrincipal: '/user/getDeviceManager', //鑾峰彇璁惧璐熻矗浜� + selectDeviceByCode: '/deviceScope/selectDeviceByCode', //閫氳繃璁惧缂栧彿鑾峰彇璁惧鍒楄〃 + getNumberCollect: '/deviceScope/getNumberCollect', //鏌ヨ鏁伴噰閰嶇疆 + numberCollect: '/deviceScope/numberCollect', //缁存姢鏁伴噰閰嶇疆 + saveDataAcquisitionConfiguration: '/deviceScope/saveDataAcquisitionConfiguration', // 缁存姢鏁伴噰閰嶇疆 + queryDataAcquisitionConfiguration: '/deviceScope/queryDataAcquisitionConfiguration', // 鏌ヨ鏁伴噰閰嶇疆 + deleteDataAcquisitionConfiguration: '/deviceScope/deleteDataAcquisitionConfiguration', // 鍒犻櫎鏁伴噰閰嶇疆 + determineWhetherToCollectData: '/deviceScope/determineWhetherToCollectData', // 鍒ゆ柇璇ヨ澶囨槸鍚﹀彲浠ユ暟閲� + dataCollection: '/deviceScope/dataCollection', // 鏁伴噰-鏁版嵁閲囬泦 + treeDevice: '/deviceScope/treeDevice', // 璁惧鏍戝舰 + temDataAcquisition: '/deviceScope/temDataAcquisition', // PK8000鏁伴噰 + temDataAcquisition2: '/deviceScope/temDataAcquisition2', // PK8000鏁伴噰--澶氭潯 + formulaCalculation: '/deviceScope/formulaCalculation', // 鏁伴噰-鍏紡璁$畻 + formulaCalculation2: '/deviceScope/export', //瀵煎嚭 + selectListBylargeCategory: '/deviceScope/largeCategory' } const insOrder = { @@ -578,7 +583,55 @@ // 6.2 浜哄憳 const personnel = { selectCNSAPersonTree: '/personBasicInfo/selectCNSAPersonTree', // 鏌ヨCNAS浜哄憳渚ц竟鏍� + getAnnex: '/personBasicInfo/getAnnex', // 鑾峰彇闄勪欢 + basicInformationOfPersonnelSelectPage: 'personBasicInfo/basicInformationOfPersonnelSelectPage', // 鑾峰彇浜哄憳鍒楄〃 + getAnnexByUserId: '/personBasicInfo/getAnnexByUserId', + addAnnex: '/personBasicInfo/addAnnex', // 娣诲姞闄勪欢 + deleteAnnex: '/personBasicInfo/deleteAnnex', // 鍒犻櫎闄勪欢 + updateAnnex: '/personBasicInfo/updateAnnex', // 鏇存柊闄勪欢 + getCNASFile: '/personBasicInfo/getCNASFile', // 鑾峰彇鍥剧墖 + getCNASInformation: '/personBasicInfo/getCNASInformation', // 鏌ヨCNAS浜哄憳淇℃伅 + updateCNASInformation: '/personBasicInfo/updateCNASInformation', // 鏇存柊CNAS浜哄憳淇℃伅 + getCNASPersonnelInfo: '/personBasicInfo/getCNASPersonnelInfo', // 浜哄憳鍩烘湰淇℃伅鏌ヨ + saveCNASPersonnelInfo: '/personBasicInfo/saveCNASPersonnelInfo', // 浜哄憳鍩烘湰淇℃伅淇濆瓨 saveCNASFile: '/personBasicInfo/saveCNASFile', // 鍏叡鏂囦欢淇濆瓨鎺ュ彛 + deleteCNASFile: '/personBasicInfo/deleteCNASFile', // 鍒犻櫎鏂囦欢 + personTrainingSelect: '/personTraining/personTrainingSelect', // 鏌ヨ浜哄憳鍩硅 + personTrainingDelete: '/personTraining/personTrainingDelete', // 鍒犻櫎浜哄憳鍩硅淇℃伅 + approveAnnualPersonnelTraining: '/personTraining/approveAnnualPersonnelTraining', // 鎵瑰噯 骞村害浜哄憳鍩硅 + reviewAnnualPersonnelTraining: '/personTraining/reviewAnnualPersonnelTraining', // 瀹℃牳 骞村害浜哄憳鍩硅 + personTrainingImport: '/personTraining/personTrainingImport', // 瀵煎叆 浜哄憳鍩硅 + exportPersonTraining: "/personTraining/exportPersonTraining", // 瀵煎嚭/浜哄憳鍩硅 + queryTheAnnualPlanDetailsTable: '/personTraining/queryTheAnnualPlanDetailsTable', // 鏌ヨ鍩硅璁″垝骞村害璁″垝鏄庣粏琛� + addOrUpdatePersonTrainingDetailed: '/personTraining/addOrUpdatePersonTrainingDetailed', // 鏂板鍩硅璁″垝骞村害璁″垝鏄庣粏琛� + deleteAnnualPlanDetailTable: '/personTraining/deleteAnnualPlanDetailTable', // 鎵归噺鍒犻櫎 骞村害璁″垝鏄庣粏琛� + trainingAndAssessmentRecordsPage: '/personTraining/trainingAndAssessmentRecordsPage', // 鍩硅涓庤�冩牳璁板綍 鏌ヨ + deleteTrainingAndAssessmentRecords: '/personTraining/deleteTrainingAndAssessmentRecords', // 鍩硅涓庤�冩牳璁板綍 鎵归噺鍒犻櫎 + trainingAndAssessmentRecordsAdded: '/personTraining/trainingAndAssessmentRecordsAdded', // 鍩硅涓庤�冩牳璁板綍 鎻愪氦 + personJobResponsibilitiesSave: '/personJobResponsibilities/personJobResponsibilitiesSave', // 鏂板宀椾綅鑱岃矗 + personJobResponsibilitiesDelete: '/personJobResponsibilities/personJobResponsibilitiesDelete', // 鍒犻櫎宀椾綅鑱岃矗 + personJobResponsibilitiesUpdate: '/personJobResponsibilities/personJobResponsibilitiesUpdate', // 鏇存柊宀椾綅鑱岃矗 + personJobResponsibilitiesSelect: '/personJobResponsibilities/personJobResponsibilitiesSelect', // 鍒嗛〉鏌ヨ宀椾綅鑱岃矗 + personJobResponsibilitiesExport: '/personJobResponsibilities/personJobResponsibilitiesExport', // 瀵煎嚭宀椾綅鑱岃矗 + personTrackRecordSave: '/personTrackRecord/personTrackRecordSave', // 鏂板宸ヤ綔灞ュ巻 + personTrackRecordDelete: '/personTrackRecord/personTrackRecordDelete', // 鍒犻櫎宸ヤ綔灞ュ巻 + personTrackRecordUpdate: '/personTrackRecord/personTrackRecordUpdate', // 鏇存柊宸ヤ綔灞ュ巻 + personTrackRecordSelect: '/personTrackRecord/personTrackRecordSelect', // 鏌ヨ宸ヤ綔灞ュ巻 + personTrackRecordExport: '/personTrackRecord/personTrackRecordExport', // 瀵煎嚭宸ヤ綔灞ュ巻 + personTrainingRecordSelect: '/personTrainingRecord/personTrainingRecordSelect', // 鏌ヨ鍩硅璁板綍 + personTrainingRecordExport: '/personTrainingRecord/personTrainingRecordExport', // 宸ヤ綔鍩硅璁板綍 + personPersonnelCapacityPage: '/personPersonnelCapacity/personPersonnelCapacityPage', // 鏌ヨ浜哄憳鑳藉姏 + deletePersonPersonnelCapacity: '/personPersonnelCapacity/deletePersonPersonnelCapacity', // 鍒犻櫎浜哄憳鑳藉姏 + addOrUpdatePersonPersonnelCapacity: '/personPersonnelCapacity/addOrUpdatePersonPersonnelCapacity', // 鏂板缂栬緫浜哄憳鑳藉姏 + exportPersonnelCapacity: '/personPersonnelCapacity/exportPersonnelCapacity', // 瀵煎嚭浜哄憳鑳藉姏 + newPersonnelAddedToTrainingRecords: "/personTraining/newPersonnelAddedToTrainingRecords", // 鍩硅涓庤�冩牳 鏂板浜哄憳 + outOfFocusPreservation: "/personTraining/outOfFocusPreservation", // 鍩硅涓庤�冩牳 澶辩劍鏇存柊 + trainingSelectTrainingRecord: "/personTrainingRecord/trainingSelectTrainingRecord", // 鏌ヨ浜哄憳 鍩硅璁板綍 + queryPersonnelDetails: "/personTrainingRecord/queryPersonnelDetails", // 鏌ヨ浜哄憳鏄庣粏 鍩硅璁板綍 + claimOfTrainingAndAssessmentRecords: "/personTraining/claimOfTrainingAndAssessmentRecords", // 璁ら/鍙栨秷璁ら + exportPersonTrainingRecord: "/personTraining/exportPersonTrainingRecord", // 瀵煎嚭浜哄憳鍩硅涓庤�冩牳璁板綍 + exportTrainingRecord: "/personTrainingRecord/exportTrainingRecord", // 瀵煎嚭鍩硅璁板綍 + confirmPersonnelCapability: "/personPersonnelCapacity/confirmPersonnelCapability", // 纭浜哄憳鑳藉姏 } // 8.3 瀹㈡埛婊℃剰搴﹁皟鏌� @@ -739,6 +792,7 @@ getVerifyMethodFileList:'/processMethodVerify/getVerifyMethodFileList', // 鍘熷璁板綍鍒楄〃 delVerifyMethodFileList:'/processMethodVerify/delVerifyMethodFileList', // 鍒犻櫎楠岃瘉鍘熷璁板綍鍒楄〃 delMethodVerify:'/processMethodVerify/delMethodVerify', // 鍒犻櫎鏍囧噯鏂规硶鏇存柊楠岃瘉 + exportMethodVerify:'/processMethodVerify/exportMethodVerify', // 瀵煎嚭鏍囧噯鏂规硶鏇存柊楠岃瘉 } // 7.4妫�娴嬫垨鏍″噯鐗╁搧鐨勫缃�-鏍峰搧鎺ユ敹 @@ -796,7 +850,9 @@ ratifyQualityMonitor:'/qualityMonitor/ratifyQualityMonitor', // 鐩戞帶璁″垝鎵瑰噯 delQualitySupervise:'/qualityMonitor/delQualitySupervise', // 鐩戞帶璁″垝鎵瑰噯 importQualityMonitor:'/qualityMonitor/importQualityMonitor', // 瀵煎叆鐩戞帶璁″垝 - exportQualityMonitorDetail:'/qualityMonitor/exportQualityMonitorDetail', // 瀵煎嚭鐩戞帶璁″垝 + exportQualityMonitorDetail:'/qualityMonitor/exportQualityMonitorDetail', + exportQualityMonitorRatify:'/qualityMonitor/exportQualityMonitorRatify', // 璐ㄩ噺鐩戞帶瀹炴柦璁″垝瀵煎嚭 + exportQualityMonitorEvaluate:'/qualityMonitor/exportQualityMonitorEvaluate', // 璐ㄩ噺鐩戞帶璇勪环瀵煎嚭 } // 8.5 搴斿椋庨櫓鍜屾満閬囩殑鎺柦 @@ -921,3 +977,53 @@ returnSubstance:'/feStandardSubstanceRecord/returnSubstance',//鏍囧噯鐗╄川娓呭崟褰掕繕 getPageSubstanceRecord: '/feStandardSubstanceRecord/getPageSubstanceRecord', // 鍒嗛〉鏌ヨ } + +const personPostAuthorizationRecord = { + exportPersonPostAuthorizationRecord:'/personPostAuthorizationRecord/exportPersonPostAuthorizationRecord',//浼犲弬id 浜哄憳鐨勪换鑱屾巿鏉冨鍑� + exportPersonBasicInfo:'/personBasicInfo/exportPersonBasicInfo',//鏈俊鎭鍑�,浼犲弬绫讳技鍒嗛〉 + exportPersonBasicInfoById:'/personBasicInfo/exportPersonBasicInfoById',//鏈俊鎭鍑�,浼犲弬绫讳技鍒嗛〉 + exportPersonJobResponsibilities:'/personJobResponsibilities/exportPersonJobResponsibilities',//瀵煎嚭浜哄憳鑱岃矗,浼犲弬id +} + +//璁惧鎺ュ彛 +const deviceCheck = { + list: '/device-alt', + edit: '/device-alt/edit', + saveIncidentReportData: '/incident-report/saveIncidentReportData', // 璁惧楠屾敹 淇濆瓨锛屾彁浜わ紝椹冲洖锛岄�氳繃鎺ュ彛 + incidentReportPage: '/incident-report/incidentReportPage', // 鎵撳紑鏂板寮规锛岃幏鍙栬澶囩殑鍩虹淇℃伅 + deleteIncidentReport: '/incident-report/deleteIncidentReport', // 鍒犻櫎璁惧楠屾敹鏁版嵁 + getShowIncidentReport: '/incident-report/getShowIncidentReport', // 璁惧楠屾敹 鐐瑰嚮鏌ョ湅鑾峰彇鏁版嵁 + deleteIncidentReportAll: '/incident-report/deleteIncidentReportAll', // 璁惧楠屾敹涓洓涓猼able琛ㄦ牸鐨勫垹闄ゅ姛鑳� + incidentReportExport: '/incident-report/incidentReportExport', // 璁惧楠屾敹瀵煎嚭 + deviceRecordPage: '/deviceRecord/deviceRecordPage', // cnas璁惧浣跨敤璁板綍鍒嗛〉鏌ヨ + saveDeviceRecord: '/deviceRecord/saveDeviceRecord', // 璁惧浣跨敤璁板綍淇濆瓨 + deleteDeviceRecord: '/deviceRecord/deleteDeviceRecord', // 鍒犻櫎璁惧浣跨敤璁板綍 + deviceRecordExport: '/deviceRecord/deviceRecordExport', // 璁惧浣跨敤璁板綍鍒犻櫎 + getDeviceMaintenancePage: '/device-maintain/getDeviceMaintenancePage', // 璁惧缁存姢鍒嗛〉鏌ヨ + deviceMaintenanceExport: '/device-maintain/deviceMaintenanceExport', // 璁惧缁存姢瀵煎嚭 + deviceMaintenanceDelete: '/device-maintain/delete', // 璁惧缁存姢鍒犻櫎 + deviceMaintainAdd: '/device-maintain', // 璁惧缁存姢鏂板 + saveDeviceState: '/deviceState/saveDeviceState', // 璁惧鍚敤/鍋滅敤 淇濆瓨锛屾彁浜わ紝椹冲洖锛岄�氳繃鎺ュ彛 + getDeviceStatePage: '/deviceState/getDeviceStatePage', // 璁惧鍚敤/鍋滅敤 鍒嗛〉 + deleteDeviceState: '/deviceState/deleteDeviceState', // 璁惧鍚敤/鍋滅敤 鍒犻櫎 + deviceFaultOnePage: '/deviceFaultOne/deviceFaultOnePage', // 璁惧鏁呴殰琛� 鍒嗛〉鏌ヨ + addOrUpdateDeviceFaultOne: '/deviceFaultOne/addOrUpdateDeviceFaultOne', + deleteDeviceFaultOne: '/deviceFaultOne/deleteDeviceFaultOne', // 鍒犻櫎 璁惧鏁呴殰 + deviceMetricRecordPage: '/deviceMetricRecord/deviceMetricRecordPage', // 璁惧鏍″噯 鍒嗛〉鏌ヨ + addOrUpdateDeviceMetricRecord: '/deviceMetricRecord/addOrUpdateDeviceMetricRecord', // 璁惧鏍″噯 鏂板 鏇存柊 + deleteDeviceMetricRecord: '/deviceMetricRecord/deleteDeviceMetricRecord', // 璁惧鏍″噯 鍒犻櫎 + showDeviceMetricsCopy: '/deviceMetricRecord/showDeviceMetricsCopy', // 璁惧鏍″噯 鏌ヨ鏍″噯鏉$洰 + selectDeviceMetric: '/deviceMetrics/selectDeviceMetric', // 璁惧鏍″噯 璁惧缁存姢琛� 鏌ヨ + saveOrUpdateDeviceMetric: '/deviceMetrics/saveOrUpdateDeviceMetric', // 璁惧鏍″噯 鏂板 鏇存柊 + deleteDeviceMetrics: '/deviceMetrics/deleteDeviceMetrics', // 璁惧鏍″噯 鍒犻櫎 + rewardPunishmentExport: '/personRewardPunishmentRecord/rewardPunishmentExport', // 濂栨儵璁板綍 瀵煎嚭 + exportRewardAndPunishmentRecords: '/deviceFaultOne/exportRewardAndPunishmentRecords', // 濂栨儵璁板綍瀵煎嚭 + deviceStateExport: "/deviceState/deviceStateExport", // 璁惧鐘舵�� + newHomeworkGuidebookAdded: "/instruction/newHomeworkGuidebookAdded", // 浣滀笟鎸囧涔︽柊澧� + pageByPageQueryOfHomeworkInstructions: "/instruction/pageByPageQueryOfHomeworkInstructions", // 浣滀笟鎸囧涔� 鏌ヨ + homeworkGuidebookEditor: "/instruction/homeworkGuidebookEditor", // 浣滀笟鎸囧涔� 缂栬緫鏌ヨ + deleteHomeworkGuidebook: "/instruction/deleteHomeworkGuidebook", // 浣滀笟鎸囧涔﹀彈鎺ф枃浠跺垹闄� + homeworkGuidebook: "/instruction/homeworkGuidebook", // 浣滀笟鎸囧涔� 鍒犻櫎 + approvalOfHomeworkInstructionManual: "/instruction/approvalOfHomeworkInstructionManual", // 浣滀笟鎸囧涔� 瀹℃壒 + deviceMetricRecordExport: '/deviceMetricRecord/deviceMetricRecordExport', // 璁惧鏍″噯 瀵煎嚭 +}; diff --git a/src/components/do/a6-personnel-collect/personnel-list.vue b/src/components/do/a6-personnel-collect/personnel-list.vue new file mode 100644 index 0000000..57330cf --- /dev/null +++ b/src/components/do/a6-personnel-collect/personnel-list.vue @@ -0,0 +1,388 @@ +<template> + <div> + <div class="search-list"> + <span class="search-input"> + <span class="search-label"> + <span style="width: 120px;font-size: 14px;line-height: 32px" + >浜哄憳鍚嶇О锛�</span + > + <el-input + v-model="entity.name" + clearable + placeholder="璇疯緭鍏�" + size="small" + style="width: 100%;" + @keyup.enter.native="refreshTable()" + > + </el-input> + </span> + <el-button size="small" style="margin-left: 10px" @click="refresh()" + >閲� 缃�</el-button + > + <el-button size="small" type="primary" @click="refreshTable()" + >鏌� 璇�</el-button + > + </span> + <span> + <el-button + :loading="outLoading" + size="small" + type="primary" + @click="handleDown" + >瀵煎嚭</el-button + > + <el-button size="small" type="primary" @click="selectUserDia = true" + >鏂板缓</el-button + > + </span> + </div> + <div class="search-table"> + <el-table + v-loading="tableLoading" + :data="tableData" + border + height="calc(100vh - 20em)" + style="width: 100%;" + > + <el-table-column align="center" label="搴忓彿" type="index" width="60"></el-table-column> + <el-table-column label="鍛樺伐缂栧彿" prop="account" width="150"></el-table-column> + <el-table-column label="濮撳悕" prop="name" width="120"></el-table-column> + <el-table-column label="鍏ラ泦鍥㈡椂闂�" prop="groupTime" width="120"></el-table-column> + <el-table-column label="绫嶈疮" prop="nativePlace" width="120"></el-table-column> + <el-table-column label="璇佷欢鍙风爜" prop="identityCard" show-overflow-tooltip width="300"></el-table-column> + <el-table-column label="璇佷欢鍦板潃" prop="idAddress" show-overflow-tooltip width="100"></el-table-column> + <el-table-column label="鎵嬫満鍙�" prop="telephone" show-overflow-tooltip width="100"></el-table-column> + <el-table-column label="姣曚笟闄㈡牎" prop="graduatedInstitutions1" width="100"></el-table-column> + <el-table-column label="鎵�瀛︿笓涓�" prop="major1" width="100"></el-table-column> + <el-table-column label="姣曚笟鏃堕棿" prop="graduationTime1" width="100"></el-table-column> + <el-table-column label="鏈�楂樺鍘�" prop="officialAcademicRedentials" width="100"></el-table-column> + <el-table-column label="鏈�楂樺浣�" prop="highestDegree" width="100"></el-table-column> + <el-table-column label="鑱岀О" prop="professionalTitle" width="100"></el-table-column> + <el-table-column label="绱ф�ヨ仈绯讳汉" prop="emergencyContact" width="120"></el-table-column> + <el-table-column label="绱ф�ヨ仈绯荤數璇�" prop="emergencyContactPhone" width="120"></el-table-column> + <el-table-column fixed="right" label="鎿嶄綔" width="140"> + <template slot-scope="scope"> + <el-button size="small" type="text" @click="downPerson(scope.row)">涓嬭浇</el-button> + <el-button + size="small" + type="text" + @click="$emit('updatePerson', scope.row)" + >缂栬緫 + </el-button> + <el-button size="small" type="text" @click="deletePerson(scope.row)" + >鍒犻櫎 + </el-button> + </template> + </el-table-column> + </el-table> + <el-pagination + :current-page="1" + :current-page.sync="page.current" + :page-size="page.size" + :page-sizes="[10, 20, 30, 50, 100]" + :total="page.total" + layout="->,total, sizes, prev, pager, next, jumper" + style="margin-top: 16px" + @size-change="handleSizeChange" + @current-change="handleCurrentChange" + > + </el-pagination> + </div> + <el-dialog :visible.sync="selectUserDia" title="閫夋嫨鐢ㄦ埛" width="70%"> + <div class="search" style="margin-bottom: 9px;"> + <div class="search_thing"> + <div class="search_label">鐢ㄦ埛鍚嶏細</div> + <div class="search_input"> + <el-input + v-model="addUserTableInfo.entity.name" + clearable + placeholder="璇疯緭鍏�" + size="small" + @keyup.enter.native="$refs.ValueTable.selectList()" + ></el-input> + </div> + </div> + </div> + <div v-if="selectUserDia" class="body" style="height: 60vh;"> + <ValueTable + ref="ValueTable" + :componentData="addUserTableInfo" + :url="$api.user.selectUserList" + /> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="selectUserDia = false">鍙� 娑�</el-button> + <el-button type="primary" @click="selectUser">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import ValueTable from '../../tool/value-table.vue'; + +export default { + name: 'PersonnelList', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: { ValueTable }, + props: { + departId: { + type: Number, + default: () => { + return null; + } + }, + isDepartment: { + type: Boolean, + default: false + }, + currentCompaniesList: { + type: Array, + default: [] + } + }, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + page: { + size: 20, + current: 1, + }, + outLoading: false, + tableLoading: false, + tableData: [], // 浜哄憳鎬诲垪琛ㄦ暟鎹� + selectUserDia: false, // 娣诲姞浜哄憳寮规 + entity: { + name: '', + orderBy: { + field: 'id', + order: 'asc' + } + }, + addUserTableInfo: { + name: null, + entity: { + isCustom: 0, + orderBy: { + field: 'id', + order: 'asc' + } + }, + isIndex: true, + showSelect: true, + select: true, + do: [], + tagField: { + state: { + select: [ + { + value: 1, + type: 'success', + label: '鍚敤' + }, + { + value: 0, + type: 'danger', + label: '鍋滅敤' + } + ] + } + }, + selectField: {}, + upUserDepardLimsIdPower: true + }, + }; + }, + mounted() { + this.refreshTable(); + }, + // 鏂规硶闆嗗悎 + methods: { + /** + * @desc 鑾峰彇璁惧id + */ + // 閲嶇疆 + refresh() { + this.page = { + size: 20, + current: 1, + }; + this.entity.name = '' + this.refreshTable(); + }, + // 鏌ヨ浜哄憳鍒楄〃鏁版嵁 + refreshTable(entity, type) { + try { + this.tableLoading = true; + this.entity.departLimsId = this.departId; + this.$axios.get( + this.$api.personnel.basicInformationOfPersonnelSelectPage + + '?size=' + this.page.size + + '¤t=' + this.page.current + + '&departmentId=' + this.entity.departLimsId + + '&name=' + this.entity.name + ) + .then(res => { + this.tableLoading = false; + if (res.code === 201) { + return; + } + this.page.total = res.data.total; + this.tableData = res.data.records; + }); + } catch (e) { + this.tableLoading = false; + } + }, + // 鍒犻櫎浜哄憳 + deletePerson(row) { + this.$confirm('鏄惁鍒犻櫎褰撳墠鏁版嵁?', '璀﹀憡', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }) + .then(() => { + this.$axios + .post(this.$api.user.delUserDepardLimsId + '?id=' + row.id) + .then(res => { + if (res.code === 201) { + return; + } + this.$message.success('鍒犻櫎鎴愬姛'); + this.refreshTable(); + }) + .catch(e => { + this.$message.error('鍒犻櫎澶辫触'); + }); + }) + .catch(() => { + }); + }, + handleSizeChange(val) { + this.page.size = val; + this.refreshTable(); + }, + handleCurrentChange(val) { + this.page.current = val; + this.refreshTable(); + }, + selectUser() { + if (!this.currentCompaniesList.length > 0) { + this.$message.warning("璇烽�夋嫨閮ㄩ棬锛�") + return; + } + let selects = this.$refs.ValueTable.multipleSelection; + if (selects.length == 0) { + this.$message.error('鏈�夋嫨鏁版嵁'); + return; + } + let ids = []; + selects.forEach(a => { + ids.push(a.id); + }); + let str = ''; + this.currentCompaniesList.forEach(a => { + if (a) { + str += a + ','; + } + }); + this.selectUserDia = false; + this.$axios.post(this.$api.user.upUserDepardLimsId, { + ids: JSON.stringify(ids), + id: str + }).then(res => { + if (res.code === 201) { + return; + } + this.$message.success('娣诲姞鎴愬姛'); + this.refreshTable(); + }); + this.$emit('refreshTree') + }, + handleDown() { + this.outLoading = true; + let entity = this.HaveJson(this.entity) + delete entity.orderBy; + this.$axios.post( + this.$api.personPostAuthorizationRecord.exportPersonBasicInfo, + { + entity: entity + }, + { + headers: { + 'Content-Type': 'application/json' + }, + responseType: "blob" + } + ) + .then(res => { + this.outLoading = false; + if (res.code === 201) { + return; + } + this.$message.success('涓嬭浇鎴愬姛') + const blob = new Blob([res],{ type: 'application/octet-stream' }); + const url = URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = url; + link.download = '浜哄憳淇℃伅.xlsx'; + link.click(); + }); + }, + downPerson(row){ + this.$axios.post( + this.$api.personPostAuthorizationRecord.exportPersonBasicInfoById+'?id=' + row.userId, + { + id: row.userId + } + ) + .then(res => { + if (res.code === 201) { + return; + } + this.$message.success('涓嬭浇鎴愬姛') + try { + let url = res.message; + const link = document.createElement('a'); + link.href = this.javaApi + '/word/'+ url; + // link.target = '_blank'; + document.body.appendChild(link); + link.click(); + } catch (error) { + + } + }); + } + }, + watch: { + departId: { + handler(newId, oldId) { + if (newId) { + this.page.current = 1 + this.refreshTable(); + } + } + } + } +}; +</script> + +<style scoped> +.search-list { + padding: 0 16px 16px; + display: flex; + justify-content: space-between; +} + +.search-table { + padding: 0 16px; +} + +.search-input { + display: flex; +} + +.search-label { + display: flex; +} +</style> diff --git a/src/components/do/a6-personnel-training/AddInDetail.vue b/src/components/do/a6-personnel-training/AddInDetail.vue new file mode 100644 index 0000000..5a98e66 --- /dev/null +++ b/src/components/do/a6-personnel-training/AddInDetail.vue @@ -0,0 +1,173 @@ +<template> + <div> + <el-dialog :visible.sync="addTrainingPlanDia" title="鏂板鍩硅璁″垝" width="50%"> + <div class="body"> + <el-form ref="trainingPlan" :model="trainingPlan" label-position="right" label-width="90px" :rules="trainingPlanRules"> + <el-row> + <el-col :span="12"> + <el-form-item label="鍩硅鏃ユ湡:" prop="trainingDate"> + <el-date-picker v-model="trainingPlan.trainingDate" format="yyyy-MM-dd" + placeholder="閫夋嫨鏃ユ湡" size="small" value-format="yyyy-MM-dd" + type="date" style="width: 100%"></el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="璇炬椂:"> + <el-input type="number" v-model="trainingPlan.classHour" label="鎻忚堪鏂囧瓧" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="寮�濮嬫椂闂�:" prop="openingTime"> + <el-time-picker v-model="trainingPlan.openingTime" placeholder="閫夋嫨鏃堕棿" + size="small" style="width: 100%" value-format="HH:mm:ss"></el-time-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="缁撴潫鏃堕棿:" prop="endTime"> + <el-time-picker v-model="trainingPlan.endTime" placeholder="閫夋嫨鏃堕棿" size="small" + style="width: 100%" value-format="HH:mm:ss"></el-time-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鍩硅鐩爣:"> + <el-input v-model="trainingPlan.trainingObjectives" placeholder="璇疯緭鍏�" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鍙傚姞瀵硅薄:"> + <el-input v-model="trainingPlan.participants" placeholder="璇疯緭鍏�" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鍩硅鍐呭:" prop="trainingContent"> + <el-input v-model="trainingPlan.trainingContent" placeholder="璇疯緭鍏�" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鍩硅璁插笀:" prop="trainingLecturerId"> + <el-select v-model="trainingPlan.trainingLecturerId" + clearable filterable + placeholder="璇烽�夋嫨" size="small" style="width: 100%;"> + <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> + </el-option> + </el-select> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="璇鹃瀛﹀垎:"> + <el-input type="number" v-model="trainingPlan.projectCredits" label="鎻忚堪鏂囧瓧" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鍩硅鍦扮偣:"> + <el-input v-model="trainingPlan.placeTraining" placeholder="璇疯緭鍏�" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鍩硅鏂瑰紡:"> + <el-input v-model="trainingPlan.trainingMode" placeholder="璇疯緭鍏�" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="涓惧姙閮ㄩ棬:"> + <el-input v-model="trainingPlan.holdingDepartment" placeholder="璇疯緭鍏�" size="small"></el-input> + </el-form-item> + </el-col> + </el-row> + </el-form> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="closeAdd">鍙� 娑�</el-button> + <el-button type="primary" @click="submitAdd">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +export default { + props: { + currentChangeRow: { + type: Object, + default: () => { + return {} + } + }, + }, + name: 'Add', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {}, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + addTrainingPlanDia: false, + trainingPlan: { + planId: '', + }, + trainingPlanRules: { + trainingDate: [{ required: true, message: '璇烽�夋嫨鍩硅鏃ユ湡', trigger: 'change' }], + openingTime: [{ required: true, message: '璇烽�夋嫨寮�濮嬫椂闂�', trigger: 'change' }], + endTime: [{ required: true, message: '璇烽�夋嫨缁撴潫鏃堕棿', trigger: 'change' }], + trainingContent: [{ required: true, message: '璇疯緭鍏ュ煿璁唴瀹�', trigger: 'change' }], + trainingLecturerId: [{ required: true, message: '璇烽�夋嫨鍩硅璁插笀', trigger: 'change' }], + }, + responsibleOptions: [], + }; + }, + // 鏂规硶闆嗗悎 + methods: { + showDialog(id) { + this.addTrainingPlanDia = true; + this.trainingPlan.planId = id + this.getUserList() + }, + // 鎻愪氦鏂板 + submitAdd() { + this.$refs.trainingPlan.validate((valid) => { + if (valid) { + this.trainingPlan.planId = this.currentChangeRow.id + const personTrainingDetailed = this.trainingPlan + this.$axios.post(this.$api.personnel.addOrUpdatePersonTrainingDetailed, personTrainingDetailed, { + headers: { + 'Content-Type': 'application/json' + }, + noQs: true + }).then(res => { + if (res.code == 200) { + this.$message.success('鎻愪氦鎴愬姛'); + this.closeAdd(); + this.dialogVisible = false; + } + }); + } + }) + }, + // 鍏抽棴寮规 + closeAdd() { + this.$refs.trainingPlan.resetFields(); + this.$emit('search') + this.addTrainingPlanDia = false; + }, + // 鑾峰彇璐熻矗浜轰俊鎭帴鍙� + getUserList() { + this.$axios.get(this.$api.deviceScope.selectUserList).then(res => { + if (res.code == 200) { + this.responsibleOptions = res.data; + } + }); + }, + }, + watch: { + addTrainingPlanDia(newVal) { + if (newVal) { + this.trainingPlan = { + planId: '', + } + } + } + } +}; +</script> + +<style scoped> +</style> diff --git a/src/components/do/a6-personnel-training/Edit.vue b/src/components/do/a6-personnel-training/Edit.vue new file mode 100644 index 0000000..0c041cc --- /dev/null +++ b/src/components/do/a6-personnel-training/Edit.vue @@ -0,0 +1,448 @@ +<template> + <div> + <div class="page-header"> + <h4><span class="line"></span><span>鍩硅涓庤�冩牳璁板綍</span></h4> + <div class="btns"> + <el-button size="small" type="primary" @click="submitForm">{{ currentRow.state === 4 ? '鎻愪氦' : '鎾ら攢' }}</el-button> + <el-button size="small" @click="$emit('goBack')">杩斿洖</el-button> + </div> + </div> + <div class="form_title"> + <el-row> + <el-col :span="5"> + <span class="form_label">璇剧▼缂栧彿锛�</span> + <span> {{ trainingForm.courseCode }} </span> + </el-col> + <el-col :span="6"> + <span class="form_label">鍩硅鍐呭锛�</span> + <span> {{ trainingForm.trainingContent }} </span> + </el-col> + <el-col :span="4"> + <span class="form_label">鐘舵�侊細</span> + <el-tag v-if="trainingForm.state === 1" type="success">宸插畬鎴�</el-tag> + <el-tag v-if="trainingForm.state === 2" type="warning">杩涜涓�</el-tag> + <el-tag v-if="trainingForm.state === 3" type="primary">鏈紑濮�</el-tag> + <el-tag v-if="trainingForm.state === 4" type="info">宸茬粨鏉�</el-tag> + </el-col> + <el-col :span="4"> + <span class="form_label">鍩硅璁插笀锛�</span> + <span> {{ trainingForm.trainingLecturerName }} </span> + </el-col> + <el-col :span="4"> + <span class="form_label">鍩硅鏃ユ湡锛�</span> + <span> {{ trainingForm.trainingDate }} </span> + </el-col> + </el-row> + <el-row style="margin: 15px 0"> + <el-form> + <el-col :span="12"> + <el-form-item label="鑰冩牳鏂瑰紡"> + <el-input v-model="trainingForm.assessmentMethod" :disabled="currentRow.state === 1" :rows="2" placeholder="璇疯緭鍏�" + size="small" style="width: 79%" type="textarea"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鏈鍩硅缁煎悎璇勪环"> + <el-input v-model="trainingForm.comprehensiveAssessment" :disabled="currentRow.state === 1" :rows="2" placeholder="璇疯緭鍏�" + size="small" style="width: 68%" type="textarea"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="璇勪环浜�"> + <el-select v-model="trainingForm.assessmentUserId" :disabled="currentRow.state === 1" placeholder="璇烽�夋嫨" size="small" style="width: 68%"> + <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> + </el-select> + </el-form-item> + </el-col> + </el-form> + </el-row> + </div> + <el-divider>浜哄憳璇︽儏</el-divider> + <div> + <div class="items_center"> + <span>濮撳悕</span> + <el-input v-model="userName" class="search" placeholder="璇疯緭鍏�" + size="small"></el-input> + <el-button size="small" type="primary" @click="getInfo">鏌ヨ</el-button> + </div> + <div class="items_btn"> + <el-button :disabled="currentRow.state === 1" size="small" type="primary" @click="addPerson">鏂板浜哄憳</el-button> + <el-button :disabled="currentRow.state === 1" size="small" @click="batchDelete">鎵归噺鍒犻櫎</el-button> + </div> + <el-table :data="trainingTableData" height="calc(100vh - 30em)" stripe style="width: 100%" + @selection-change="handleSelectionChange"> + <el-table-column type="selection" width="55"></el-table-column> + <el-table-column label="搴忓彿" type="index" width="60"></el-table-column> + <el-table-column label="濮撳悕" prop="userName"></el-table-column> + <el-table-column label="宸ュ彿" prop="account"></el-table-column> + <el-table-column label="瑙掕壊" prop="roleName"></el-table-column> + <el-table-column label="鐢佃瘽鍙风爜" prop="phone"></el-table-column> + <el-table-column label="鑰冩牳缁撴灉" prop="examinationResults"> + <template v-slot="scope"> + <el-input v-model="scope.row.examinationResults" :disabled="currentRow.state === 1" clearable size="small" style="width: 100%" @blur="updatePersonResult(scope.row)"></el-input> + </template> + </el-table-column> + </el-table> + </div> + <el-dialog :visible.sync="selectUserDia" title="閫夋嫨鐢ㄦ埛" width="70%"> + <div class="search" style="margin-bottom: 9px;"> + <div class="search_thing"> + <div class="search_label">鐢ㄦ埛鍚嶏細</div> + <div class="search_input"> + <el-input + v-model="addUserTableInfo.entity.name" + clearable + placeholder="璇疯緭鍏�" + size="small" + @keyup.enter.native="$refs.ValueTable.selectList()" + ></el-input> + </div> + </div> + </div> + <div v-if="selectUserDia" class="body" style="height: 60vh;"> + <ValueTable + ref="ValueTable" + :componentData="addUserTableInfo" + :isSelectedList="isSelectedList" + :url="$api.user.selectUserList" + /> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="selectUserDia = false">鍙� 娑�</el-button> + <el-button type="primary" @click="selectUser">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import TableCard from '../../caorui/TableCard/index.vue'; +import ZTTable from '../../caorui/ZTTable/index.vue'; +import ValueTable from '../../tool/value-table.vue'; + +export default { + name: 'Edit', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {ValueTable, ZTTable, TableCard}, + props: { + currentRow: { + type: Object, + default: () => { + return {} + } + }, + }, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + isSelectedList: [], // 绂佺敤鐨勫閫� + userName: undefined, + trainingForm: { + code: '111111', + date: '2024-10-10', + }, + trainingColumn: [ + { + label: '濮撳悕', + prop: 'userName' + }, + { + label: '宸ュ彿', + prop: 'account' + }, + { + label: '瑙掕壊', + prop: 'roleName' + }, + { + label: '鐢佃瘽鍙风爜', + prop: 'phone' + }, + { + label: '鑰冩牳缁撴灉', + prop: 'result' + } + ], + trainingTableData: [], + trainingLoading: false, + selectUserDia: false, // 娣诲姞浜哄憳寮规 + addUserTableInfo: { + name: null, + entity: { + departLimsId: '1', + orderBy: { + field: 'id', + order: 'asc' + } + }, + isIndex: true, + showSelect: true, + select: true, + do: [], + tagField: { + state: { + select: [ + { + value: 1, + type: 'success', + label: '鍚敤' + }, + { + value: 0, + type: 'danger', + label: '鍋滅敤' + } + ] + } + }, + selectField: {}, + upUserDepardLimsIdPower: true + }, + multipleSelection: [], + userList: [], + }; + }, + mounted() { + this.trainingForm = this.currentRow + this.getInfo() + this.getUserList() + }, + // 鏂规硶闆嗗悎 + methods: { + // 鑾峰彇褰撳墠鏁版嵁 + async getInfo() { + this.trainingLoading = true + await this.$axios({ + method: 'get', + url: this.$api.personnel.trainingAndAssessmentRecordsPage, + params: { + trainingDetailedId: this.currentRow.id, + userName: this.userName + }, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + noQs: true + }) + .then(res => { + if (res.code === 200) { + this.trainingTableData = res.data + } + this.trainingLoading = false + }) + }, + async updatePersonResult(row) { + const { code } = await this.$axios({ + method: 'post', + url: this.$api.personnel.outOfFocusPreservation, + data: row, + headers: { + 'Content-Type': 'application/json' + } + }) + if (code === 200) { + this.$message.success("鎿嶄綔鎴愬姛锛�") + } + }, + addPerson() { + this.isSelectedList = this.trainingTableData.map(item => item.userId) + this.selectUserDia = true; + }, + selectUser() { + let selects = this.$refs.ValueTable.multipleSelection; + if (selects.length == 0) { + this.$message.error('鏈�夋嫨鏁版嵁'); + return; + } + let list = [] + selects.forEach(a => { + const obj = { + courseId: this.currentRow.id, + examinationResults: "", + userId: a.id + } + list.push(obj) + // this.trainingTableData.push(obj); + }); + this.$axios({ + method: 'post', + url: this.$api.personnel.newPersonnelAddedToTrainingRecords, + data: list, + headers: { + 'Content-Type': 'application/json' + }, + noQs: true + }) + .then(res => { + this.isSelectedList = [] + this.selectUserDia = false; + this.getInfo() + }) + }, + // 鎵归噺鍒犻櫎 + handleSelectionChange(list) { + this.multipleSelection = list + }, + batchDelete() { + console.log('鎵归噺鍒犻櫎', this.multipleSelection) + if (this.multipleSelection.length > 0) { + let ids = this.multipleSelection.map(item => item.trainingRecordId) + this.$confirm('鏄惁纭鍒犻櫎鎵�閫夋嫨鐨勬暟鎹�?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + let formData = new FormData() + formData.append('ids', ids) + this.$axios({ + method: 'post', + url: this.$api.personnel.deleteTrainingAndAssessmentRecords, + data: formData, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + noQs: true + }) + .then(res => { + if (res.code == 200) { + this.$message.success('鍒犻櫎鎴愬姛'); + this.getInfo() + } + }); + }).catch(() => { + this.$message.warning('鍙栨秷鍒犻櫎'); + }); + } else { + this.$message.warning('璇烽�夋嫨闇�瑕佸垹闄ょ殑鏁版嵁') + } + }, + handleSizeChange(val) { + this.search.size = val; + this.getInfo(); + }, + handleCurrentChange(val) { + this.search.current = val; + this.getInfo(); + }, + /** + * @desc 鎻愪氦琛ㄥ崟 + */ + async submitForm() { + if (this.currentRow.state !== 4 && this.currentRow.state !== 1) { + this.$message.warning("褰撳墠鐘舵�佹棤娉曟彁浜�/鎾ら攢锛�") + return + } + // 濡傛灉绛変簬4 琛ㄧず璇ョ姸鎬佷负宸茬粨鏉燂紝1 琛ㄧず宸插畬鎴� + let state = this.currentRow.state === 4 ? 1 : 4 + let data = { + assessmentMethod: this.trainingForm.assessmentMethod, + comprehensiveAssessment: this.trainingForm.comprehensiveAssessment, + trainingDetailedId: this.trainingForm.id, + assessmentUserId: this.trainingForm.assessmentUserId, + state: state + } + const {code} = await this.$axios({ + method: 'post', + url: this.$api.personnel.trainingAndAssessmentRecordsAdded, + data: data, + headers: { + 'Content-Type': 'application/json;' + }, + noQs: true + }) + if(code === 200) { + this.currentRow.state = state + this.$message.success("鎿嶄綔鎴愬姛") + } + }, + getUserList(){ + this.$axios.post(this.$api.user.selectUserList, { + page: {current: -1, size: -1,}, + entity: {name: null, isCustom: 0} + }, { + headers: { + 'Content-Type': 'application/json' + } + }).then(res => { + if (res.code === 201) { + return + } + this.userList = res.data.body.records + }) + }, + } +}; +</script> + +<style scoped> +.page-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 20px; + margin-bottom: 10px; +} + +h4 { + display: flex; + align-items: center; +} + +h4 .line { + display: inline-block; + width: 3px; + height: 16px; + background: #3A7BFA; + margin-right: 4px; +} + +.form_title { + font-size: 14px; + padding: 0 20px; + margin-bottom: 10px; +} + +.el-divider { + margin: 0 1em 1em 0; +} + +.form__input_label { + width: 90px; + margin-right: 6px; + color: #606266; +} + +.form__input_label2 { + width: 210px; + margin-right: 6px; + color: #606266; +} +.search_thing { + display: flex; + align-items: center +} +.search_label { + width: 120px; +} +.pagination { + display: flex; + justify-content: space-between +} + +.items_center { + float: left; + width: 50%; + text-align: left; +} +.items_btn { + text-align: right; + width: 50%; + float: right; + margin-bottom: 1em; +} + +.search { + width: 180px; + padding: 0 16px; +} +</style> diff --git a/src/components/do/a6-personnel-training/index.vue b/src/components/do/a6-personnel-training/index.vue new file mode 100644 index 0000000..5a4f796 --- /dev/null +++ b/src/components/do/a6-personnel-training/index.vue @@ -0,0 +1,794 @@ +<!-- 浜哄憳鍩硅 --> +<template> + <div class="flex_column"> + <div v-if="!editPlanShow && isDepartment"> + <TableCard title="骞村害璁″垝琛�"> + <template v-slot:form> + <div class="items_center"> + <span>鍒涘缓浜�</span> + <el-input v-model="pagination.compilerName" class="search" placeholder="璇疯緭鍏�" size="small"></el-input> + <el-button size="small" type="primary" @click="getYearPlanList(departId)">鏌ヨ</el-button> + </div> + <div> + <el-button size="small" type="primary" @click="uploadDia = true">瀵煎叆</el-button> + </div> + </template> + <template v-slot:table> + <ZTTable + :column="yearPlanColumn" + :currentChange="currentChange" + :height="'320'" + :table-data="yearPlanTableData" + :table-loading="yearLoading" + highlightCurrentRow + style="padding: 0 15px;"> + </ZTTable> + <div class="pagination"> + <div></div> + <el-pagination + :page-size="pagination.pageSize" + :page-sizes="[10, 20, 30, 40]" + :total="pagination.total" + layout="total, sizes, prev, pager, next, jumper" + @current-change="handleYearCurrent" + @size-change="handleYearSizeChange"> + </el-pagination> + </div> + </template> + </TableCard> + </div> + <div v-if="!editPlanShow" class="table"> + <TableCard title="骞村害璁″垝鏄庣粏琛�"> + <template v-slot:form> + <div class="items_center"> + <span>鍩硅璁插笀</span> + <el-input v-model="inDetailForm.trainingLecturerName" class="search" clearable placeholder="璇疯緭鍏�" size="small"></el-input> + <span>璇剧▼缂栧彿</span> + <el-input v-model="inDetailForm.courseCode" class="search" clearable placeholder="璇疯緭鍏�" size="small"></el-input> + <span style="margin-right: 16px">鍩硅鏃ユ湡</span> + <el-date-picker v-model="inDetailForm.trainingDate" clearable + format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" + type="date" value-format="yyyy-MM-dd"></el-date-picker> + <el-button size="small" style="margin-left: 16px" type="primary" @click="searchTable">鏌ヨ</el-button> + </div> + <div> + <el-button v-if="isDepartment && currentChangeRow && isOperation" size="small" @click="batchDelete">鎵归噺鍒犻櫎</el-button> + <el-button v-if="isDepartment && currentChangeRow && isOperation" size="small" type="primary" @click="addTrainingPlan">鏂板</el-button> + </div> + </template> + <template v-slot:table> + <ZTTable + :column="inDetailPlanColumn" + :handleSelectionChange="handleSelectionChange" + :height="isDepartment ? '45vh' : '68vh' " + :isSelection="true" + :table-data="inDetailPlanTableData" + :table-loading="yearLoading" + style="padding: 0 15px;"> + </ZTTable> + <div class="pagination"> + <div></div> + <el-pagination + :page-size="inDetailPagination.pageSize" + :page-sizes="[10, 20, 30, 40]" + :total="inDetailPagination.total" + layout="total, sizes, prev, pager, next, jumper" + @current-change="handleCurrentChange" + @size-change="handleSizeChange"> + </el-pagination> + </div> + </template> + </TableCard> + </div> + <Add ref="addPlan" :currentChangeRow="currentChangeRow" @search="getInDetailPlan(currentRowId, departId)"></Add> + <Edit + v-if="editPlanShow" + ref="editPlan" + :currentRow="currentRow" + @del="getInDetailPlan(currentRowId, departId)" + @goBack="goBack" + ></Edit> + <el-dialog :visible.sync="reviewDialog" title="瀹℃牳" width="30%" @close="reviewRemarks = ''"> + <span> + 瀹℃牳澶囨敞锛� + <el-input v-model="reviewRemarks" type="textarea"></el-input> + </span> + <span slot="footer" class="dialog-footer"> + <el-button :loading="reviewLoading" @click="handleReview(2)">涓嶉�氳繃</el-button> + <el-button :loading="reviewLoading" type="primary" @click="handleReview(1)">閫� 杩�</el-button> + </span> + </el-dialog> + <el-dialog :visible.sync="approvalDialog" title="鎵瑰噯" width="30%" @close="approvalRemarks = ''"> + <span> + 鎵瑰噯澶囨敞锛� + <el-input v-model="approvalRemarks" type="textarea"></el-input> + </span> + <span slot="footer" class="dialog-footer"> + <el-button :loading="approvalLoading" @click="handleApproval(2)">涓嶆壒鍑�</el-button> + <el-button :loading="reviewLoading" type="primary" @click="handleApproval(1)">鎵� 鍑�</el-button> + </span> + </el-dialog> + <el-dialog :visible.sync="uploadDia" title="鏁版嵁瀵煎叆" width="500px"> + <div style="margin: 0 auto;"> + <el-upload ref="upload" :action="javaApi + $api.personnel.personTrainingImport" :auto-upload="false" :before-upload="beforeUpload" :file-list="fileList" :headers="token" + :limit="1" :on-error="onError" :on-success="onSuccess" accept=".xlsx" drag + name="file"> + <i class="el-icon-upload"></i> + <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div> + </el-upload> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="uploadDia = false">鍙� 娑�</el-button> + <el-button :loading="uploading" type="primary" @click="submitUpload()">涓� 浼�</el-button> + </span> + </el-dialog > + </div> +</template> + +<script> +import ValueTable from '../../tool/value-table.vue'; +import TableCard from '../../caorui/TableCard/index.vue'; +import ZTTable from '../../caorui/ZTTable/index.vue'; +import Add from './AddInDetail.vue'; +import Edit from './Edit.vue'; + +export default { + name: 'PersonnelTraining', + components: { Add, ZTTable, TableCard, ValueTable, Edit }, + props: { + departId: { + type: Number, + default: () => { + return null; + } + }, + isDepartment: { + type: Boolean, + default: false + } + }, + data() { + return { + search: {}, + superviseForm: {}, + inDetailForm: { + trainingLecturerName: '', + courseCode: '', + trainingDate: '', + }, + yearLoading: false, + yearPlanTableData: [], // 骞村害璁″垝琛ㄦ暟鎹� + yearPlanColumn: [ + { + label: '鏂囦欢鍚嶇О', + width: '160px', + prop: 'fileName' + }, { + label: '鍒涘缓鏃堕棿', + width: '160px', + prop: 'createTime' + }, { + label: '鍒涘缓浜�', + prop: 'createUserName' + }, { + label: '缂栧埗浜�', + prop: 'compilerName' + }, { + label: '缂栧埗鏃ユ湡', + width: '160px', + prop: 'compilationDate' + }, { + label: '瀹℃牳浜�', + prop: 'reviewerName', + minWidth: '100px', + }, { + dataType: 'tag', + label: '瀹℃牳鐘舵��', + prop: 'reviewerStatus', + width: '100px', + formatData: (params) => { + if (params == 1) { + return '閫氳繃'; + } else if (params == 2) { + return '涓嶉�氳繃'; + } else { + return null + } + }, + formatType: (params) => { + if (params == 1) { + return 'success'; + } else if (params == 2) { + return 'danger'; + } else { + return null + } + } + }, { + label: '瀹℃牳澶囨敞', + prop: 'auditRemarks', + minWidth: '100px', + }, { + label: '瀹℃牳鏃ユ湡', + width: '160px', + prop: 'auditDate' + }, { + label: '鎵瑰噯浜�', + prop: 'approverName', + minWidth: '100px', + }, { + label: '鎵瑰噯澶囨敞', + prop: 'approvalRemarks', + minWidth: '100px', + }, { + dataType: 'tag', + label: '鎵瑰噯鐘舵��', + minWidth: '100px', + prop: 'approvalStatus', + formatData: (params) => { + if (params == 1) { + return '鎵瑰噯'; + } else if (params == 2) { + return '涓嶆壒鍑�'; + } else { + return null + } + }, + formatType: (params) => { + if (params == 1) { + return 'success'; + } else if (params == 2) { + return 'danger'; + } else { + return null + } + } + }, { + label: '鎵瑰噯鏃ユ湡', + width: '160px', + prop: 'approvalDate' + }, { + dataType: 'action', + width: '180px', + label: '鎿嶄綔', + fixed: 'right', + operation: [ + { + name: '瀵煎嚭', + type: 'text', + disabled: (row) => { + if(row.approvalStatus === 1 && row.reviewerStatus === 1) { + return false; + } else { + return true; + } + }, + clickFun: (row) => { + this.downLoadPost(row); + } + }, + { + name: '瀹℃牳', + type: 'text', + disabled: (row) => { + if(row.reviewerStatus === 1) { + return true; + } else { + return false; + } + }, + clickFun: (row) => { + this.handleCheck(row.id); + } + }, + { + name: '鎵瑰噯', + type: 'text', + disabled: (row) => { + if(row.approvalStatus === 1) { + return true; + } else { + return false; + } + }, + clickFun: (row) => { + this.handleApprove(row.id); + } + }, + { + name: '鍒犻櫎', + type: 'text', + color: '#f56c6c', + clickFun: (row) => { + this.deleteFun(row.id); + } + } + ] + }], + inDetailPlanTableData: [], // 骞村害璁″垝鏄庣粏琛ㄨ〃鏁版嵁 + inDetailPlanColumn: [ + { + label: '璇剧▼缂栧彿', + prop: 'courseCode', + width: '130px', + }, { + dataType: 'tag', + label: '璁ら鐘舵��', + width: '100px', + prop: 'whetherClaim', + formatData: (params) => { + if (params === true) { + return '宸茶棰�'; + } else { + return '鏈棰�'; + } + }, + formatType: (params) => { + if (params === true) { + return 'success'; + } else { + return 'info' + } + } + }, { + label: '鍩硅鐩爣', + prop: 'trainingObjectives', + width: '100px', + }, { + label: '鍩硅鍐呭', + prop: 'trainingContent', + width: '100px', + }, { + label: '鍩硅鏂瑰紡', + prop: 'trainingMode', + width: '100px', + }, { + dataType: 'tag', + label: '璇剧▼鐘舵��', + width: '100px', + prop: 'state', + formatData: (params) => { + if (params == 1) { + return '宸插畬鎴�'; + } else if (params == 2) { + return '杩涜涓�'; + } else if (params == 3) { + return '鏈紑濮�'; + } else if (params == 4) { + return '宸茬粨鏉�'; + } else { + return null + } + }, + formatType: (params) => { + if (params == 1) { + return 'success'; + } else if (params == 2) { + return 'warning'; + } else if (params == 3) { + return 'primary'; + } else if (params == 4) { + return 'info'; + } else { + return null + } + } + }, { + label: '鍙傚姞瀵硅薄', + prop: 'participants', + width: '100px', + }, { + label: '涓惧姙閮ㄩ棬', + prop: 'holdingDepartment', + width: '100px', + }, { + label: '鍩硅鍦扮偣', + prop: 'placeTraining', + width: '100px', + }, { + label: '鍩硅璁插笀', + prop: 'trainingLecturerName', + width: '100px', + }, { + label: '鍩硅鏃ユ湡', + prop: 'trainingDate', + width: '100px', + }, { + label: '寮�濮嬫椂闂�', + prop: 'openingTime', + width: '100px', + }, { + label: '璇炬椂', + prop: 'classHour', + width: '100px', + }, { + label: '澶囨敞', + prop: 'remarks', + width: '100px', + }, { + dataType: 'action', + width: '180', + label: '鎿嶄綔', + fixed: 'right', + operation: [ + // 瓒呰繃浼氳寮�濮嬫椂闂村氨涓嶈兘璁ら浜� + { + name: '璁ら', + type: 'text', + clickFun: (row) => { + this.handleClaim(row); + }, + disabled: (row) => { + if(row.whetherClaim === true || row.trainingDate < this.$moment().format('YYYY-MM-DD')) { + return true; + } else { + return false; + } + }, + }, + { + name: '缁撴灉鏄庣粏', + type: 'text', + clickFun: (row) => { + this.editInDetail(row); + }, + showHide: () => { + if (this.isDepartment) { + return true; + } else { + return false; + } + } + }, + { + name: '瀵煎嚭', + type: 'text', + clickFun: (row) => { + this.downLoadInDetail(row); + } + } + + ] + }], + pagination: { + pageSize: 20, + current: 1, + total: 0, + compilerName: "" + }, + inDetailPagination: { + pageSize: 20, + current: 1, + total: 0 + }, + editPlanShow: false, + currentRow: {}, + currentRowId: null, // 褰撳墠閫変腑鏁版嵁鐨刬d + reviewRemarks: '', // 瀹℃牳澶囨敞 + reviewDialog: false, // 瀹℃牳寮规 + reviewLoading: false, // 瀹℃牳鎻愪氦鎸夐挳 + approvalRemarks: '', // 瀹℃牳澶囨敞 + approvalDialog: false, // 瀹℃牳寮规 + approvalLoading: false, // 瀹℃牳鎻愪氦鎸夐挳 + multipleSelection: [], // 骞村害鏄庣粏琛ㄩ�変腑鐨勬暟鎹� + uploadDia: false, + uploading: false, + isOperation: false, + token: null, + fileList: [], + currentChangeRow: {}, + }; + }, + mounted() { + this.token = { + 'token': sessionStorage.getItem('token') + } + if (this.isDepartment) { + this.getYearPlanList(this.departId) + } else { + this.getInDetailPlan('', this.departId) + } + }, + methods: { + searchTable () { + this.getInDetailPlan(this.currentRowId) + }, + // 鏌ヨ-骞村害璁″垝琛� + getYearPlanList(userId) { + const name = this.isDepartment ? 'departmentId' : 'userId'; + this.$axios.get(this.$api.personnel.personTrainingSelect + `?${name}=` + userId + '&size=' + this.pagination.pageSize + '¤t=' + this.pagination.current + '&compilerName=' + this.pagination.compilerName).then(res => { + if (res.code === 201) return + this.yearPlanTableData = res.data.records; + this.pagination.total = res.data.total; + if (this.yearPlanTableData.length > 0) { + this.currentRowId = this.yearPlanTableData[0].id + this.currentChange(this.yearPlanTableData[0]) + } + }); + }, + currentChange (row) { + const now = new Date(); + const currentYear = now.getFullYear(); + this.currentChangeRow = row + this.currentRowId = row.id + if (row.createTime.slice(0,4) == currentYear) { + this.isOperation = true; + } else { + this.isOperation = false; + } + this.getInDetailPlan(row.id) + }, + getInDetailPlan (id) { + if (this.inDetailForm.trainingDate === null) { + this.inDetailForm.trainingDate = '' + } + const userId = this.isDepartment ? '' : this.departId + this.$axios.get(this.$api.personnel.queryTheAnnualPlanDetailsTable + '?userId=' + userId + '&size=' + this.inDetailPagination.pageSize + + '¤t=' + this.inDetailPagination.current + '&id=' + id + + '&trainingLecturerName=' + this.inDetailForm.trainingLecturerName+ + '&trainingDate=' + this.inDetailForm.trainingDate+ + '&courseCode=' + this.inDetailForm.courseCode).then(res => { + if (res.code === 201) return + this.inDetailPlanTableData = res.data.records; + this.inDetailPagination.total = res.data.total; + }); + }, + // 鏂板骞村害璁″垝鏄庣粏琛� + addTrainingPlan() { + if (!this.currentRowId) { + this.$message.warning('璇烽�夋嫨涓�鏉¤鍒掕繘琛屾柊澧�') + return + } + this.$refs.addPlan.showDialog(this.currentRowId); + }, + // 骞村害璁″垝琛�-鍒犻櫎 + deleteFun(id) { + this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + this.$axios.delete(this.$api.personnel.personTrainingDelete + '?id=' + id).then(res => { + this.$message.success('鍒犻櫎鎴愬姛锛�'); + this.getYearPlanList(this.departId); + }); + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑堝垹闄�' + }); + }); + }, + // 骞村害璁″垝琛�-瀹℃牳 + handleCheck(id) { + this.currentRowId = id + this.reviewDialog = true + }, + handleReview (status) { + const personTrainingUpdateDto = { + id: this.currentRowId, + remarks: this.reviewRemarks, + status: status + } + this.reviewLoading = true + this.$axios.post(this.$api.personnel.reviewAnnualPersonnelTraining, personTrainingUpdateDto, { + headers: { + 'Content-Type': 'application/json' + }, + noQs: true + }).then(res => { + if (res.code === 200) { + this.$message.success('鎻愪氦鎴愬姛锛�'); + this.reviewDialog = false + this.getYearPlanList(this.departId); + } + this.reviewLoading = false + }).catch(() => { + this.reviewLoading = false + }) + }, + // 骞村害璁″垝琛�-鎵瑰噯 + handleApprove(id) { + this.currentRowId = id + this.approvalDialog = true + }, + handleApproval (status) { + const personTrainingUpdateDto = { + id: this.currentRowId, + remarks: this.approvalRemarks, + status: status + } + this.approvalLoading = true + this.$axios.post(this.$api.personnel.approveAnnualPersonnelTraining, personTrainingUpdateDto, { + headers: { + 'Content-Type': 'application/json' + }, + noQs: true + }).then(res => { + if (res.code === 200) { + this.$message.success('鎻愪氦鎴愬姛锛�'); + this.approvalDialog = false + this.getYearPlanList(this.departId); + } + this.approvalLoading = false + }).catch(() => { + this.approvalLoading = false + }) + }, + // 骞村害璁″垝琛�-涓嬭浇 + downLoadPost(row) { + this.$axios.get(this.$api.personnel.exportPersonTraining + '?id=' + row.id,{responseType: "blob"}).then(res => { + this.outLoading = false + this.$message.success('瀵煎嚭鎴愬姛') + const blob = new Blob([res],{ type: 'application/msword' }); + const url = URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = url; + link.download = row.fileName + '.docx'; + link.click(); + }) + }, + // 骞村害璁″垝-瀵煎叆 + submitUpload() { + if (this.$refs.upload.uploadFiles.length == 0) { + this.$message.error('鏈�夋嫨鏂囦欢') + return + } + this.uploading = true + this.$refs.upload.submit(); + this.uploading = false + }, + onSuccess(response, file, fileList) { + this.$refs.upload.clearFiles() + this.uploadDia = false + this.uploading = false + if (response.code == 201) { + this.$message.error(response.message) + return + } + this.$message.success('涓婁紶鎴愬姛') + this.standardList = [] + this.productList = [] + this.getYearPlanList(this.departId) + }, + onError(err, file, fileList) { + this.$message.error('涓婁紶澶辫触') + this.$refs.upload.clearFiles() + this.uploading = false + }, + beforeUpload(file, fileList) { + if (file.type != 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') { + this.$message.error('涓婁紶鏂囦欢鏍煎紡涓嶆纭�'); + this.$refs.upload.clearFiles() + return false; + } + }, + // 骞村害璁″垝鍒嗛〉 + handleYearCurrent(page) { + this.pagination.current = page; + this.getYearPlanList(this.departId); + }, + handleYearSizeChange(size) { + this.pagination.pageSize = size; + this.getYearPlanList(this.departId); + }, + // 骞村害璁″垝鏄庣粏琛�-璁ら銆佸彇娑堣棰� + handleClaim(row) { + this.$confirm('鏄惁纭璁ら璇ヨ绋�?', '鎻愮ず', { + confirmButtonText: '璁ら', + cancelButtonText: '鍙栨秷璁ら', + type: 'warning' + }).then(() => { + this.handleClaimFun(true, row.id) + }).catch(() => { + this.handleClaimFun(false, row.id) + }); + }, + handleClaimFun(claimAndClaim, rowId) { + this.$axios.post(this.$api.personnel.claimOfTrainingAndAssessmentRecords + `?claimAndClaim=${claimAndClaim}&courseId=${rowId}`).then(res => { + this.getInDetailPlan(this.currentChangeRow.id) + }); + }, + // 骞村害璁″垝鏄庣粏琛�-缂栬緫 + editInDetail(row) { + this.editPlanShow = true; + this.currentRow = row + }, + // + goBack() { + this.editPlanShow = false; + this.getInDetailPlan(this.currentRowId) + }, + // 骞村害璁″垝鏄庣粏琛�-涓嬭浇 + downLoadInDetail(row) { + this.$axios.get(this.$api.personnel.exportPersonTrainingRecord + '?id=' + row.id,{responseType: "blob"}).then(res => { + this.outLoading = false + this.$message.success('瀵煎嚭鎴愬姛') + const blob = new Blob([res],{ type: 'application/msword' }); + const url = URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = url; + link.download = row.courseCode + '浜哄憳鍩硅涓庤�冩牳璁板綍' + '.docx'; + link.click(); + }) + }, + // 骞村害璁″垝鏄庣粏琛�-澶氶�� + handleSelectionChange(list) { + this.multipleSelection = list + }, + // 骞村害鏄庣粏琛�-鍒犻櫎 + batchDelete () { + if (this.multipleSelection.length > 0) { + let ids = [] + this.multipleSelection.forEach(item => { + ids.push(item.id) + }) + this.$confirm('鏄惁纭鍒犻櫎鎵�閫夋嫨鐨勬暟鎹�?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + this.$axios.post(this.$api.personnel.deleteAnnualPlanDetailTable+ '?ids=' +ids.join(',')).then(res => { + if (res.code == 200) { + this.$message.success('鍒犻櫎鎴愬姛'); + this.getInDetailPlan(this.currentRowId); + } + }); + }).catch(() => { + this.$message.warning('鍙栨秷鍒犻櫎'); + }); + } else { + this.$message.warning('璇烽�夋嫨闇�瑕佸垹闄ょ殑鏁版嵁') + } + }, + handleSizeChange(val) { + this.inDetailPagination.size = val; + this.getYearPlanList(this.departId); + }, + handleCurrentChange(val) { + this.inDetailPagination.current = val; + this.getYearPlanList(this.departId); + }, + }, + watch: { + // 鐩戝惉鐐瑰嚮el-tree鐨勬暟鎹紝杩涜鏁版嵁鍒锋柊 + departId: { + handler(newId, oldId) { + if (this.isDepartment) { + this.getYearPlanList(newId); + } else { + this.getInDetailPlan('') + } + } + } + } +}; +</script> +<style scoped> +.flex_column { + display: flex; + height: 80vh; + flex-direction: column; + overflow: auto; + justify-content: space-between; +} + +.pagination { + display: flex; + justify-content: space-between +} + +.items_center { + display: flex; + align-items: center; +} + +.date_box { + margin: 0 5px; +} + +.search { + width: 150px; + margin: 0 16px; +} +</style> diff --git a/src/components/do/a6-personnel/job-responsibilities.vue b/src/components/do/a6-personnel/job-responsibilities.vue new file mode 100644 index 0000000..8a3186d --- /dev/null +++ b/src/components/do/a6-personnel/job-responsibilities.vue @@ -0,0 +1,374 @@ +<!-- 宀椾綅鑱岃矗 --> +<template> + <div class="view"> + <div style="text-align: left; margin-bottom: 15px;padding: 0 10px"> + <label>鍛樺伐锛�</label> + <el-input v-model="userName" clearable placeholder="璇疯緭鍏ュ憳宸�" size="small" style="width: 20vh;"></el-input> + <el-button size="small" type="primary" @click="refreshTable">鏌ヨ</el-button> + <div v-if="isDepartment" style="float: right;"> + <el-button size="small" type="primary" @click="addPost">鏂板</el-button> + <!-- <el-button size="small" type="primary">瀵煎嚭excel</el-button>--> + </div> + </div> + <div class="table" style="padding: 0 10px"> + <el-table :data="tableData" height="70vh" style="width: 100%"> + <el-table-column label="搴忓彿" type="index" width="60"></el-table-column> + <el-table-column label="鍛樺伐缂栧彿" min-width="120" prop="account"></el-table-column> + <el-table-column label="宀椾綅鍚嶇О" min-width="180" prop="postName"></el-table-column> + <el-table-column label="鎵�灞為儴闂�" min-width="180" prop="departLimsName"></el-table-column> + <el-table-column label="宸ヤ綔鐩爣" min-width="180" prop="jobObjective"></el-table-column> + <el-table-column label="宀椾綅鑱岃矗" min-width="180" prop="jobResponsibilities"></el-table-column> + <el-table-column label="浠昏亴浜�" min-width="180" prop="incumbentName"></el-table-column> + <el-table-column label="浠昏亴浜哄鏍告棩鏈�" min-width="180" prop="incumbentDate"></el-table-column> + <el-table-column label="涓荤" min-width="180" prop="supervisorName"></el-table-column> + <el-table-column label="涓荤瀹℃牳鏃ユ湡" min-width="180" prop="supervisorDate"></el-table-column> + <el-table-column fixed="right" label="鎿嶄綔" width="140"> + <template v-slot="scope"> + <el-button v-if="!isDepartment || scope.row.currentState === '鍏抽棴'" size="small" type="text" + @click="handleViewClick(scope.row, 'view')">鏌ョ湅 + </el-button> + <el-button v-if="isDepartment && scope.row.currentState !== '鍏抽棴'" size="small" type="text" + @click="handleViewClick(scope.row, 'edit')">缂栬緫 + </el-button> + <el-button size="small" type="text" @click="downLoadPost(scope.row)">涓嬭浇</el-button> + <el-button v-if="isDepartment" size="small" type="text" @click="deletePost(scope.row)">鍒犻櫎</el-button> + </template> + </el-table-column> + </el-table> + <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" + :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" + @size-change="handleSizeChange" + @current-change="handleCurrentChange"> + </el-pagination> + </div> + <!-- 鏂板宀椾綅鑱岃矗 --> + <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="dialogVisible" + title="鏂板宀椾綅鑱岃矗" + width="50%" @close="resetForm"> + <el-steps :active="currentStep" align-center finish-status="success"> + <el-step v-for="(v, i) in steps" :key="i" :title="v" style="cursor:pointer" + @click.native="choiceStep(i)"></el-step> + </el-steps> + <el-form ref="form" :model="form" :rules="rules" label-width="130px"> + <div> + <el-card style="margin-top: 1em; height: 40vh; overflow-y: scroll;"> + <!-- 鏂板璁惧浜嬭褰曞崱鐗� --> + <el-row> + <el-col :span="12"> + <el-form-item label="宀椾綅鍚嶇О锛�" prop="postName"> + <el-input v-model="form.postName" :disabled="currentStep !== 0 || operationType === 'view'" + size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="宸ヤ綔鐩爣锛�" prop="jobObjective"> + <el-input v-model="form.jobObjective" :disabled="currentStep !== 0 || operationType === 'view'" + size="small" + type="textarea"></el-input> + </el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="宀椾綅鑱岃矗锛�" prop="jobResponsibilities"> + <el-input v-model="form.jobResponsibilities" :disabled="currentStep !== 0 || operationType === 'view'" + size="small" + type="textarea"></el-input> + </el-form-item> + </el-col> + <el-col v-if="currentStep === 0 || operationType === 'view'" :span="12"> + <el-form-item + :rules="[{ required: currentStep === 0, message: '璇烽�夋嫨浠昏亴浜�', trigger: 'change' }]" + label="浠昏亴浜猴細" + prop="incumbentId"> + <el-select v-model="form.incumbentId" :disabled="operationType === 'view'" clearable + filterable + placeholder="璇烽�夋嫨浠昏亴浜�" size="small" style="width: 100%;"> + <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> + </el-option> + </el-select> + </el-form-item> + </el-col> + <el-col v-if="currentStep === 1 || operationType === 'view'" :span="12"> + <el-form-item + :rules="[{ required: currentStep === 1, message: '璇烽�夋嫨涓荤', trigger: 'blur' }]" + label="涓荤锛�" + prop="supervisorId"> + <el-select v-model="form.supervisorId" :disabled="currentStep !== 1 || operationType === 'view'" + clearable filterable + placeholder="璇烽�夋嫨涓荤" size="small" style="width: 100%;"> + <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> + </el-option> + </el-select> + </el-form-item> + </el-col> + </el-row> + </el-card> + <el-row style="margin-top: 1em;"> + <el-col :span="4"> + 鎿嶄綔浜猴細{{ form.submitPerson }} + </el-col> + <el-col :span="6"> + 鏃ユ湡锛歿{ form.submitDate }} + </el-col> + </el-row> + </div> + </el-form> + <span slot="footer" class="dialog-footer"> + <el-button v-if="currentStep !== 0 && currentStep !== 3" @click="submitForm('3reject')">椹冲洖</el-button> + <el-button v-if="currentStep === 0" @click="submitForm('2save')">淇濆瓨</el-button> + <el-button v-if="currentStep !== 3" type="primary" + @click="submitForm('1submit')">{{ currentStep === 0 ? '鎻愪氦' : '閫氳繃' }}</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import { dateFormat } from '../../../util/date'; +import { deletePersonCommunicationAbility } from '../../../assets/api/api'; + +export default { + data() { + return { + userName: '', + tableData: [], + responsibleOptions: [], + search: { + size: 20, + current: 1, + total: 0 + }, + dialogVisible: false, + currentStep: 0, // 姝ラ鏉℃樉绀虹鍑犳 + currentStepClick: 0, // 鐐瑰嚮姝ラ鏉″彉鍖� + operationType: '', + steps: ['鎻愪氦', '浠昏亴浜虹‘璁�', '涓荤纭'], + form: { + postName: '', // 宀椾綅鍚嶇О + jobObjective: '', // 宸ヤ綔鐩爣 + jobResponsibilities: '', // 宀椾綅鑱岃矗 + incumbentId: '', // 浠昏亴浜� + supervisorId: '' // 涓荤 + }, + rules: { + postName: [{ required: true, message: '璇疯緭鍏ュ矖浣嶅悕绉�', trigger: 'blur' }], + jobObjective: [{ required: true, message: '璇疯緭鍏ュ伐浣滅洰鏍�', trigger: 'blur' }], + jobResponsibilities: [{ required: true, message: '璇疯緭鍏ュ矖浣嶈亴璐�', trigger: 'blur' }], + incumbentId: [{ required: true, message: '璇烽�夋嫨浠昏亴浜�', trigger: 'change' }], + supervisorId: [{ required: true, message: '璇烽�夋嫨涓荤', trigger: 'change' }] + } + // departId: 0 + }; + }, + props: { + departId: { + type: Number, + default: () => { + return null; + } + }, + isDepartment: { + type: Boolean, + default: false + } + }, + mounted() { + this.getPostList(this.departId); + }, + methods: { + addPost() { + this.dialogVisible = true; + this.form = { + postName: '', // 宀椾綅鍚嶇О + jobObjective: '', // 宸ヤ綔鐩爣 + jobResponsibilities: '', // 宀椾綅鑱岃矗 + incumbentId: '', // 浠昏亴浜� + supervisorId: '', // 鎿嶄綔浜� + submitPerson: '', // 涓荤 + submitDate: '', // 鏃ユ湡 + currentStep: 0 // 鏃ユ湡 + }; + this.currentStep = 0; + this.getUserList(); + }, + // 鏌ヨ鍒楄〃淇℃伅 + getPostList(userId) { + this.search.userId = userId; + const name = this.isDepartment ? 'departmentId' : 'userId'; + this.$axios.get(this.$api.personnel.personJobResponsibilitiesSelect + '?userName=' + this.userName + `&${name}=` + this.search.userId + '&size=' + this.search.size + '¤t=' + this.search.current).then(res => { + if (res.code === 201) return; + this.tableData = res.data.records; + this.search.total = res.data.total; + }); + }, + //鎻愪氦琛ㄥ崟 + async submitForm(saveState) { + this.$refs.form.validate((valid) => { + if (valid === true || saveState !== '1submit') { + // 缁欏綋鍓嶇幆鑺傝缃垱寤轰汉涓庢椂闂� + let user = JSON.parse(localStorage.getItem('user')); + const dateTime = dateFormat(new Date()); + // 鑾峰彇褰撳墠鐜妭鎿嶄綔浜轰笌鏃ユ湡 + switch (this.currentStep) { + case 0: + this.form.submittingOperator = user.name; + this.form.submittingDate = dateTime; + break; + case 1: + this.form.incumbentOperator = user.name; + this.form.incumbentDate = dateTime; + break; + case 2: + this.form.supervisorOperator = user.name; + this.form.supervisorDate = dateTime; + break; + default: + break; + } + // 鑾峰彇褰撳墠鐜妭璐熻矗浜� + switch (saveState === '3reject' ? this.currentStep - 1 : this.currentStep) { + case 1: + this.form.currentResponsible = this.form.submittingOperator; + break; + case 2: + this.form.currentResponsible = this.form.incumbentOperator; + break; + default: + break; + } + let currentStepAction; + // 璁剧疆璇ユ搷浣滃垽鏂槸鍚︿负鎻愪氦锛屼繚瀛橈紝椹冲洖锛岄�氳繃 + switch (saveState) { + // 鎻愪氦锛岄�氳繃 + case '1submit': + currentStepAction = this.currentStep + 1; + break; + // 淇濆瓨 + case '2save': + currentStepAction = this.currentStep; + break; + // 椹冲洖 + case '3reject': + currentStepAction = this.currentStep - 1; + break; + default: + break; + } + // 鑾峰彇褰撳墠鐘舵�� + this.form.currentState = currentStepAction === 3 ? '鍏抽棴' : this.steps[currentStepAction]; + this.$axios.post(this.$api.personnel.personJobResponsibilitiesSave, this.form, { + headers: { + 'Content-Type': 'application/json' + }, + noQs: true + }).then(res => { + if (res.code == 200) { + this.$message.success('鎻愪氦鎴愬姛'); + this.getPostList(this.departId); + this.dialogVisible = false; + } + }); + } else { + let step = this.steps[this.currentStep]; + this.$message.warning(step + ' 娴佺▼涓湁蹇呭~椤规湭濉紒'); + } + }); + }, + // 缂栬緫 + handleViewClick(row, type) { + this.operationType = type; + this.getUserList(); + row.incumbentId = Number(row.incumbentId); + this.form = { ...row }; + switch (row.currentState) { + case '鎻愪氦': + this.currentStep = 0; + break; + case '浠昏亴浜虹‘璁�': + this.currentStep = 1; + this.form.submitPerson = row.submittingOperator; + this.form.submitDate = row.submittingDate; + break; + case '涓荤纭': + this.currentStep = 2; + this.form.submitPerson = row.incumbentOperator; + this.form.submitDate = row.incumbentDate; + break; + case '鍏抽棴': + this.currentStep = 3; + this.form.submitPerson = row.supervisorOperator; + this.form.submitDate = row.supervisorDate; + break; + default: + break; + } + this.form.currentState = this.currentStep; + this.currentStepClick = this.currentStep === 3 ? 0 : this.currentStep + console.log('this.form---', this.form); + this.dialogVisible = true; + }, + // 涓嬭浇宀椾綅鑱岃矗 + downLoadPost(row) { + this.$axios.post(this.$api.personPostAuthorizationRecord.exportPersonJobResponsibilities,{id:row.id},{responseType: "blob"}).then(res => { + this.$message.success('涓嬭浇鎴愬姛') + const blob = new Blob([res],{ type: 'application/octet-stream' }); + const url = URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = url; + link.download = row.incumbentName+'-宀椾綅鑱岃矗'+'.docx'; + link.click(); + }) + }, + // 鍒犻櫎宀椾綅鑱岃矗 + deletePost(row) { + this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎姝ゆ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + this.$axios.delete(this.$api.personnel.personJobResponsibilitiesDelete + '?id=' + row.id).then(res => { + if (res.code == 200) { + this.$message.success('鍒犻櫎鎴愬姛'); + this.getPostList(this.departId); + } + }); + }).catch(() => { + this.$message.error('鍒犻櫎澶辫触'); + }); + }, + resetForm() { + this.$refs.form.resetFields(); + }, + refreshTable() { + this.getPostList(this.departId); + }, + // 鑾峰彇璐熻矗浜轰俊鎭帴鍙� + getUserList() { + this.$axios.get(this.$api.deviceScope.selectUserList).then(res => { + if (res.code == 200) { + this.responsibleOptions = res.data; + } + }); + }, + choiceStep(index) { + this.currentStepClick = index; + }, + handleSizeChange(val) { + this.search.size = val; + this.getPostList(this.departId); + }, + handleCurrentChange(val) { + this.search.current = val; + this.getPostList(this.departId); + } + }, + watch: { + departId: { + handler(newId, oldId) { + this.getPostList(newId); + } + } + } +}; +</script> +<style scoped> +</style> diff --git a/src/components/do/a6-personnel/personnel-capacity.vue b/src/components/do/a6-personnel/personnel-capacity.vue new file mode 100644 index 0000000..cde9fe9 --- /dev/null +++ b/src/components/do/a6-personnel/personnel-capacity.vue @@ -0,0 +1,579 @@ +<!-- 浜哄憳鑳藉姏 --> +<template> + <div> + <div style="text-align: left; margin-bottom: 15px;padding: 0 16px"> + <label>濮撳悕</label> + <el-input v-model="userName" placeholder="璇疯緭鍏ュ鍚�" size="small" style="width: 20vh;"></el-input> + <el-button size="small" type="primary" @click="refreshTable">鏌ヨ</el-button> + <div v-if="isDepartment" style="float: right;"> + <el-button size="small" type="primary" @click="addAppointPost('add')">鏂板</el-button> + </div> + </div> + <div class="table"> + <TableCard :showForm="false" :showTitle="false"> + <template v-slot:table> + <ZTTable + :column="yearColumnData" + :height="'calc(100vh - 20em)'" + :table-data="tableData" + :table-loading="yearLoading" + style="padding: 0 15px;margin-bottom: 16px" + > + <div slot="jobResponsibilities" slot-scope="scope"> + <div v-html="changeLine(scope.row.responsibilities)"></div> + </div> + <div slot="placeWorkSlot" slot-scope="scope"> + <div v-html="changeLine(scope.row.placeWork)"></div> + </div> + </ZTTable> + </template> + </TableCard> + <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" + :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" + @size-change="handleSizeChange" + @current-change="handleCurrentChange"> + </el-pagination> + </div> + <!--鏂板鑳藉姏璁ゅ畾寮规--> + <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="title" + :visible.sync="dialogVisible" + width="80%" @close="resetForm"> + <el-form v-if="dialogVisible" ref="infoForm" :model="form" :rules="rules"> + <el-col :span="12"> + <el-form-item label="浜哄憳锛�" label-width="110px" prop="userId"> + <el-select v-model="form.userId" :disabled="operationType === 'view'" clearable + filterable placeholder="璇烽�夋嫨" + size="small" style="width: 100%;"> + <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> + </el-option> + </el-select> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鑱岀О锛�" label-width="110px" prop="technicalPost"> + <el-input v-model="form.technicalPost" :disabled="operationType === 'view'" clearable size="small" style="width: 100%;"/> + </el-form-item> + </el-col> + <el-col :span="24"> + <div style="display: flex;justify-content: space-evenly;font-weight: 600"> + <span>鏌ユ牳缁撴灉</span> + <span>绗﹀悎涓庡惁</span> + <span>澶囨敞</span> + </div> + </el-col> + <el-col :span="8"> + <el-form-item label="瀛﹀巻锛�" label-width="110px" prop="academicDegree"> + <el-input v-model="form.academicDegree" :disabled="operationType === 'view'" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item class="radio-group" prop="academicConformNot" style="text-align: center"> + <el-radio-group v-model="form.academicConformNot" :disabled="operationType === 'view'"> + <el-radio :label="1">绗﹀悎</el-radio> + <el-radio :label="2">涓嶇鍚�</el-radio> + <el-radio :label="3">涓嶉�傜敤</el-radio> + </el-radio-group> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item prop="academicRemarks"> + <el-input v-model="form.academicRemarks" :disabled="operationType === 'view'" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鐩稿叧骞撮檺锛�" label-width="110px" prop="relatedYears"> + <el-input v-model="form.relatedYears" :disabled="operationType === 'view'" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item class="radio-group" prop="relatedYearsConformNot" style="text-align: center"> + <el-radio-group v-model="form.relatedYearsConformNot" :disabled="operationType === 'view'"> + <el-radio :label="1">绗﹀悎</el-radio> + <el-radio :label="2">涓嶇鍚�</el-radio> + <el-radio :label="3">涓嶉�傜敤</el-radio> + </el-radio-group> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item prop="relatedYearsRemarks "> + <el-input v-model="form.relatedYearsRemarks " :disabled="operationType === 'view'" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鐩稿叧鍩硅锛�" label-width="110px" prop="relatedTraining"> + <el-input v-model="form.relatedTraining" :disabled="operationType === 'view'" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item class="radio-group" prop="relatedTrainingConformNot" style="text-align: center"> + <el-radio-group v-model="form.relatedTrainingConformNot" :disabled="operationType === 'view'"> + <el-radio :label="1">绗﹀悎</el-radio> + <el-radio :label="2">涓嶇鍚�</el-radio> + <el-radio :label="3">涓嶉�傜敤</el-radio> + </el-radio-group> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item prop="relatedTrainingRemarks"> + <el-input v-model="form.relatedTrainingRemarks" :disabled="operationType === 'view'" + size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鐩稿叧缁忛獙锛�" label-width="110px" prop="relevantExperience"> + <el-input v-model="form.relevantExperience" :disabled="operationType === 'view'" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item class="radio-group" prop="relevantExperienceConformNot" style="text-align: center"> + <el-radio-group v-model="form.relevantExperienceConformNot" :disabled="operationType === 'view'"> + <el-radio :label="1">绗﹀悎</el-radio> + <el-radio :label="2">涓嶇鍚�</el-radio> + <el-radio :label="3">涓嶉�傜敤</el-radio> + </el-radio-group> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item prop="relevantExperienceRemarks"> + <el-input v-model="form.relevantExperienceRemarks" :disabled="operationType === 'view'" + size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="涓婂矖璇侊細" label-width="110px" prop="workLicense"> + <el-input v-model="form.workLicense" :disabled="operationType === 'view'" size="small" + style="width: 100%"> + </el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item class="radio-group" prop="workLicenseConformNot" style="text-align: center"> + <el-radio-group v-model="form.workLicenseConformNot" :disabled="operationType === 'view'"> + <el-radio :label="1">绗﹀悎</el-radio> + <el-radio :label="2">涓嶇鍚�</el-radio> + <el-radio :label="3">涓嶉�傜敤</el-radio> + </el-radio-group> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item prop="workLicenseRemarks"> + <el-input v-model="form.workLicenseRemarks" :disabled="operationType === 'view'" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="宀椾綅鑱岃矗锛�" label-width="110px" prop="jobResponsibilitiesTem" style="height: 450px"> + <el-checkbox-group v-model="form.jobResponsibilitiesTem" :disabled="operationType === 'view'" + @change="selectResponsibilities"> + <el-checkbox v-for="city in responsibilities" :key="city.value" :label="city.label" + :value="city.value"></el-checkbox> + </el-checkbox-group> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item class="radio-group" prop="jobResponsibilitiesConformNot" + style="text-align: center;height: 420px"> + <el-radio-group v-model="form.jobResponsibilitiesConformNot" :disabled="operationType === 'view'"> + <el-radio :label="1">绗﹀悎</el-radio> + <el-radio :label="2">涓嶇鍚�</el-radio> + <el-radio :label="3">涓嶉�傜敤</el-radio> + </el-radio-group> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item prop="jobResponsibilitiesRemarks" style="height: 420px"> + <el-input v-model="form.jobResponsibilitiesRemarks" :disabled="operationType === 'view'" + size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="24"> + <span style="padding-left: 110px;font-size: 14px">澶囨敞锛氬矖浣嶈亴璐h揪鍒�5椤瑰強5椤逛互涓婁负绗﹀悎</span> + </el-col> + <el-col :span="16"> + <el-form-item label="缁煎悎璇勪环锛�" label-width="110px" prop="comprehensiveAssessment"> + <el-radio-group v-model="form.comprehensiveAssessment" :disabled="operationType === 'view'"> + <el-radio label="Qualified this position">鍙儨浠昏宀椾綅</el-radio> + <el-radio label="You can work while training">鍙竟鍩硅杈逛笂宀�</el-radio> + <el-radio label="Iconpetent for the position">涓嶈儨浠昏宀椾綅</el-radio> + </el-radio-group> + </el-form-item> + </el-col> + </el-form> + <span slot="footer" class="dialog-footer"> + <el-button v-if="operationType !== 'view'" @click="resetForm">鍙栨秷</el-button> + <el-button v-if="operationType !== 'view'" type="primary" @click="submitForm">淇濆瓨</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import ZTTable from '../../caorui/ZTTable/index.vue'; +import TableCard from '../../caorui/TableCard/index.vue'; +import {exportSuperVisePlanApi} from "../../../assets/api/api"; + +export default { + props: { + departId: { + type: Number, + default: () => { + return null; + } + }, + isDepartment: { + type: Boolean, + default: false + } + }, + components: { + ZTTable, + TableCard + }, + data() { + return { + userName: '', + tableData: [], + search: { + size: 20, + current: 1, + total: 0 + }, + title: '鏂板鑳藉姏璁ゅ畾', + operationType: '', + yearColumnData: [ + { + label: '宀椾綅', + prop: 'postName', + minWidth: '100' + }, { + label: '濮撳悕', + prop: 'userName', + minWidth: '100' + }, { + label: '瀛﹀巻', + prop: 'academicDegree', + minWidth: '100' + }, { + label: '涓撲笟', + prop: 'major', + minWidth: '100' + }, { + label: '鑱岀О', + prop: 'technicalPost', + minWidth: '100' + }, { + dataType: 'slot', + label: '宸ヤ綔缁忓巻', + prop: 'placeWork', + minWidth: '100', + slot: 'placeWorkSlot' + }, { + dataType: 'slot', + label: '宀椾綅鑱岃矗', + prop: 'jobResponsibilities', + minWidth: '200px', + slot: 'jobResponsibilities' + }, { + dataType: 'tag', + label: '缁煎悎璇勪环', + minWidth: '140px', + prop: 'comprehensiveAssessment', + formatData: (params) => { + if (params == 'Qualified this position') { + return '鍙儨浠昏宀椾綅'; + } else if (params == 'You can work while training') { + return '鍙竟鍩硅杈逛笂宀�'; + } else { + return '涓嶈儨浠昏宀椾綅'; + } + }, + formatType: (params) => { + if (params == 'Qualified this position') { + return 'success'; + } else if (params == 'You can work while training') { + return 'warning'; + } else { + return 'danger'; + } + } + }, { + label: '纭浜�', + prop: 'confirmOperatingPersonnelId', + minWidth: '100' + }, { + label: '纭鏃ユ湡', + prop: 'confirmDate', + minWidth: '160' + }, { + dataType: 'action', + minWidth: '220', + label: '鎿嶄綔', + fixed: 'right', + operation: [ + { + name: '缂栬緫', + type: 'text', + clickFun: (row) => { + this.handleViewClick('edit', row); + }, + showHide: (row) => { + if (this.isDepartment) { + return true; + } else { + return false; + } + } + }, + { + name: '鏌ョ湅', + type: 'text', + clickFun: (row) => { + this.handleViewClick('view', row); + } + }, + { + name: '瀵煎嚭', + type: 'text', + clickFun: (row) => { + this.downLoadPost(row); + } + }, + { + name: '纭', + type: 'text', + clickFun: (row) => { + this.verifyGet(row.id); + } + }, + { + name: '鍒犻櫎', + type: 'text', + color: '#f56c6c', + clickFun: (row) => { + this.deletePost(row.id); + }, + showHide: (row) => { + if (this.isDepartment) { + return true; + } else { + return false; + } + } + } + ] + }], + yearLoading: false, + dialogVisible: false, + form: { + jobResponsibilitiesTem: [] + }, + responsibleOptions: [], + rules: { + userId: [{ required: true, message: '璇烽�夋嫨浜哄憳', trigger: 'change' }], + academicDegree: [{ required: true, message: '璇疯緭鍏ュ鍘嗘煡鏍哥粨鏋�', trigger: 'blur' }], + academicConformNot: [{ required: true, message: '璇烽�夋嫨瀛﹀巻绗﹀悎涓庡惁', trigger: 'change' }], + relatedYears: [{ required: true, message: '璇疯緭鍏ョ浉鍏冲勾闄愭煡鏍哥粨鏋�', trigger: 'blur' }], + relatedYearsConformNot: [{ required: true, message: '璇烽�夋嫨鐩稿叧骞撮檺绗﹀悎涓庡惁', trigger: 'change' }], + relatedTraining: [{ required: true, message: '璇疯緭鍏ョ浉鍩硅闄愭煡鏍哥粨鏋�', trigger: 'blur' }], + relatedTrainingConformNot: [{ required: true, message: '璇烽�夋嫨鐩稿叧鍩硅绗﹀悎涓庡惁', trigger: 'change' }], + relevantExperience: [{ required: true, message: '璇疯緭鍏ョ浉鍏崇粡楠屾煡鏍哥粨鏋�', trigger: 'blur' }], + relevantExperienceConformNot: [{ required: true, message: '璇烽�夋嫨鐩稿叧缁忛獙绗﹀悎涓庡惁', trigger: 'change' }], + workLicense: [{ required: true, message: '璇疯緭鍏ヤ笂宀楄瘉鏌ユ牳缁撴灉', trigger: 'blur' }], + workLicenseConformNot: [{ required: true, message: '璇烽�夋嫨涓婂矖璇佺鍚堜笌鍚�', trigger: 'change' }], + jobResponsibilitiesTem: [{ required: true, message: '璇烽�夋嫨宀椾綅鑱岃矗鏌ユ牳缁撴灉', trigger: 'change' }], + jobResponsibilitiesConformNot: [{ required: true, message: '璇烽�夋嫨宀椾綅鑱岃矗绗﹀悎涓庡惁', trigger: 'change' }], + comprehensiveAssessment: [{ required: true, message: '璇烽�夋嫨缁煎悎璇勪环', trigger: 'change' }] + }, + responsibilities: [] + }; + }, + mounted() { + this.getList(this.departId); + }, + methods: { + // 涓嬭浇 + downLoadPost(row) { + this.$axios.get(this.$api.personnel.exportPersonnelCapacity + '?id=' + row.id,{responseType: "blob"}).then(res => { + this.outLoading = false + this.$message.success('瀵煎嚭鎴愬姛') + const blob = new Blob([res],{ type: 'application/msword' }); + const url = URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = url; + link.download = "浜哄憳鑳藉姏瀵煎嚭" + '.docx'; + link.click(); + }) + }, + // 鏌ヨ + refreshTable() { + this.getList(this.departId); + }, + // 鑾峰彇浜哄憳鑳藉姏鍒楄〃淇℃伅 + getList(userId) { + this.search.userId = userId; + const name = this.isDepartment ? 'departmentId' : 'userId'; + this.yearLoading = true + this.$axios.get(this.$api.personnel.personPersonnelCapacityPage + '?userName=' + this.userName + `&${name}=` + this.search.userId + '&size=' + this.search.size + '¤t=' + this.search.current).then(res => { + this.yearLoading = false + if (res.code === 201) return; + this.tableData = res.data.records; + this.search.total = res.data.total; + }).catch(err => { + console.log(err); + this.yearLoading = false + }) + }, + selectResponsibilities(arr) { + let arrTem = []; + arr.map(val => { + const index = this.responsibilities.findIndex(item => item.label === val); + if (index > -1) { + arrTem.push(this.responsibilities[index].value); + } + }); + this.form.jobResponsibilities = arrTem.join(','); + }, + getResponsibilities() { + this.$axios.post(this.$api.enums.selectEnumByCategory, { + category: '宀椾綅鑱岃矗' + }).then(res => { + this.responsibilities = res.data; + }); + }, + changeLine (val) { + if(val) { + return val.replace(/,/g, '<br>') + } else { + return + } + }, + // 鏂板 + addAppointPost(type) { + this.operationType = type; + this.title = '鏂板鑳藉姏璁ゅ畾' + this.dialogVisible = true; + this.form = { + jobResponsibilitiesTem: [] + } + this.getUserList(); + this.getResponsibilities(); + + }, + // 缂栬緫/鏌ョ湅 + handleViewClick(type, row) { + this.operationType = type; + this.title = this.operationType === 'edit' ? '淇敼鑳藉姏璁ゅ畾' : '鏌ョ湅鑳藉姏璁ゅ畾' + this.dialogVisible = true; + this.form = {...row} + if(this.form.responsibilities) { + this.$set(this.form, 'jobResponsibilitiesTem', this.form.responsibilities.split(",")) + } else { + this.$set(this.form, 'jobResponsibilitiesTem', []) + } + this.getUserList(); + this.getResponsibilities(); + }, + submitForm() { + this.$refs.infoForm.validate((valid) => { + if (valid) { + this.$axios.post(this.$api.personnel.addOrUpdatePersonPersonnelCapacity, this.form, { + headers: { + 'Content-Type': 'application/json' + } + }).then(res => { + if (res.code == 200) { + this.$message.success('鎻愪氦鎴愬姛'); + this.getList(this.departId); + this.dialogVisible = false; + } + }); + } + }); + }, + verifyGet (id) { + this.$confirm('鏄惁纭鏈潯淇℃伅?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + this.$axios.get(this.$api.personnel.confirmPersonnelCapability + '?id=' + id).then(res => { + if (res.code == 200) { + this.$message.success('纭鎴愬姛'); + this.getList(this.departId); + } + }); + }).catch((err) => { + console.log('err---', err); + this.$message.info('宸插彇娑�') + }); + }, + // 鍒犻櫎宀椾綅鑱岃矗 + deletePost(id) { + this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎姝ゆ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + this.$axios.delete(this.$api.personnel.deletePersonPersonnelCapacity + '?id=' + id).then(res => { + if (res.code == 200) { + this.$message.success('鍒犻櫎鎴愬姛'); + this.getList(this.departId); + } + }); + }).catch(() => { + this.$message.error('鍒犻櫎澶辫触'); + }); + }, + resetForm() { + this.$refs.infoForm.resetFields(); + this.dialogVisible = false; + }, + // 鑾峰彇璐熻矗浜轰俊鎭帴鍙� + getUserList() { + this.$axios.get(this.$api.deviceScope.selectUserList).then(res => { + if (res.code == 200) { + this.responsibleOptions = res.data; + } + }); + }, + handleSizeChange(val) { + this.search.size = val; + this.getList(this.departId); + }, + handleCurrentChange(val) { + this.search.current = val; + this.getList(this.departId); + } + }, + watch: { + // 鐩戝惉鐐瑰嚮el-tree鐨勬暟鎹紝杩涜鏁版嵁鍒锋柊 + departId: { + handler(newId, oldId) { + this.getList(newId); + } + }, + // 鐩戝惉鐐瑰嚮el-tree鐨勬暟鎹紝杩涜鏁版嵁鍒锋柊 + isDepartment: { + handler(newId, oldId) { + this.getList(this.departId); + } + }, + } +}; +</script> +<style scoped> +>>>.el-dialog { + margin: 6vh auto 50px !important; +} +>>> .el-dialog__body { + max-height: 70vh; + overflow-y: auto; +} + +.radio-group >>> .el-form-item__error { + padding-left: 38px; +} +>>>.el-checkbox__label { + width: 212px; + white-space: pre-wrap; +} +</style> diff --git a/src/components/do/a6-personnel/personnel-information.vue b/src/components/do/a6-personnel/personnel-information.vue new file mode 100644 index 0000000..b10df08 --- /dev/null +++ b/src/components/do/a6-personnel/personnel-information.vue @@ -0,0 +1,948 @@ +<template> + <div> + <div style="text-align: right;margin-bottom: 10px"> +<!-- <el-button size="small" @click="$emit('goBackList')">杩斿洖</el-button>--> + <el-button size="small" type="primary" @click="dialogVisible = true">浜哄憳鍒嗙被</el-button> + <el-button :loading="saveLoading" size="small" type="primary" @click="save">淇濆瓨</el-button> + </div> + <div> + <div style="display: flex;flex-direction: row;"> + <div style="width: 12em"> + <el-image :src="javaApi + '/img/' + form.pictureUrl" fit="fill" + style="width:100%;height: 300px;border: 1px solid #000;border-radius: 10px;margin-left: 6px;margin-top: 10px;"> + <div slot="error" class="image-slot"> + <i class="el-icon-picture-outline" style="font-size: 40px;"></i> + </div> + </el-image> + <el-image :src="javaApi + '/img/' + form.signatureUrl" fit="fill" + style="width:80%;height: 50px;border: 1px solid #000;border-radius: 10px;margin-left: 22px;margin-top: 20px;"> + <div slot="error" class="image-slot"> + <i class="el-icon-picture-outline" style="font-size: 40px;"></i> + </div> + </el-image> + </div> + <div style="height: calc(100vh - 14em);overflow-y: auto"> + <el-form ref="form" :model="form" label-width="110px"> + <el-row> + <el-col :span="8"> + <el-form-item label="濮撳悕"> + <el-input v-model="form.name" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鐧诲綍璐﹀彿"> + <el-input v-model="form.account" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="褰撳墠鐘舵��"> + <el-radio-group v-model="form.currentState"> + <el-radio label="1formal" size="mini">姝e紡</el-radio> + <el-radio label="2intern" size="mini">瀹炰範</el-radio> + <el-radio label="3leaveOffice" size="mini">绂昏亴</el-radio> + </el-radio-group> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="宸ュ彿"> + <el-input v-model="form.jobNumber" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鍛樺伐瀛愮紪鍙�"> + <el-input v-model="form.subordinateNumber" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鎬у埆"> + <el-radio-group v-model="form.sex"> + <el-radio label="1" size="mini">鐢�</el-radio> + <el-radio label="0" size="mini">濂�</el-radio> + </el-radio-group> + </el-form-item> + </el-col> + <!-- <el-col :span="8"> + <el-form-item label="鍏ヨ亴鏃堕棿"> + <el-date-picker v-model="form.entryTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" + style="width: 99%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> --> + <!-- <el-col :span="8"> + <el-form-item label="褰撳墠鑱屽姟"> + <el-input v-model="form.currentPosition" size="small" clearable></el-input> + </el-form-item> + </el-col> --> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="鍏徃鍚嶇О"> + <el-input v-model="form.corporateName" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="閮ㄩ棬缂栧彿"> + <el-input v-model="form.department" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鎵�灞為儴闂�"> + <el-cascader v-model="form.departLimsId" :options="department" :props="{ label: 'name', value: 'id',checkStrictly: true }" filterable style="width: 100%;"></el-cascader> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="宀椾綅绫诲埆"> + <el-input v-model="form.postType" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="宀椾綅缂栧彿"> + <el-input v-model="form.postCode" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="宀椾綅鍚嶇О"> + <el-input v-model="form.postName" clearable size="small"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="鍏ラ泦鍥㈡椂闂�"> + <el-date-picker v-model="form.groupTime" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" + style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鍏ュ崟浣嶆椂闂�"> + <el-date-picker v-model="form.unitTime" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" + size="small" style="width: 99%;" type="date" + value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鐩存帴涓婄骇"> + <el-input v-model="form.reportingTo" clearable size="small"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="鍔冲姩鍏崇郴"> + <el-radio-group v-model="form.laborRelations"> + <el-radio :label=0 size="mini">鍚堝悓宸�</el-radio> + <el-radio :label=1 size="mini">姝e紡宸�</el-radio> + </el-radio-group> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="璇曠敤寮�濮嬫椂闂�"> + <el-date-picker v-model="form.trialStartTime" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" + style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="璇曠敤缁撴潫鏃堕棿"> + <el-date-picker v-model="form.trialEndTime" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" + style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="24" style="text-align: left;"> + <el-form-item label="浜哄憳鍒嗙被"> + <span style="color: #000;">{{ form.personnelClassification }}</span> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="鍑虹敓鏃ユ湡"> + <el-date-picker v-model="form.dateBirth" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" + style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="绫嶈疮"> + <el-input v-model="form.nativePlace" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="姘戞棌"> + <el-input v-model="form.nation" clearable size="small"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="璇佷欢绫诲瀷"> + <el-input v-model="form.idType" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="韬唤璇佸彿"> + <el-input v-model="form.identityCard" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="骞撮緞"> + <el-input-number v-model="form.age" :max="130" :min="1" + controls-position="right" size="small" style="width: 99%;"></el-input-number> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="璇佷欢鏈夋晥鏈�"> + <el-date-picker v-model="form.validityPeriod" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" + size="small" style="width: 99%;" type="date" + value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="濠氬Щ鐘跺喌"> + <el-radio-group v-model="form.maritalStatus"> + <el-radio :label=0 size="mini">宸插</el-radio> + <el-radio :label=1 size="mini">鏈</el-radio> + </el-radio-group> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="璇佷欢鍦板潃"> + <el-input v-model="form.idAddress" clearable size="small"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="璇佷欢璇︾粏鍦板潃"> + <el-input v-model="form.idDetailAddress" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鐜板眳鍦板潃"> + <el-input v-model="form.currentAddress" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鐜板眳璇︾粏鍦板潃"> + <el-input v-model="form.currentDetailAddress" clearable size="small"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="閫佽揪鍦板潃"> + <el-input v-model="form.serviceAddress" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="閫佽揪璇︾粏鍦板潃"> + <el-input v-model="form.serviceDetailAddress" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鏄惁閫�浼嶅啗浜�"> + <el-radio-group v-model="form.retiredSoldiers"> + <el-radio :label=1 size="mini">鏄�</el-radio> + <el-radio :label=0 size="mini">鍚�</el-radio> + </el-radio-group> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="鏀挎不闈㈣矊"> + <el-input v-model="form.politicalStatus" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鍏ュ厷/鍥㈡椂闂�"> + <el-date-picker v-model="form.dumplingTime" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" + size="small" style="width: 99%;" type="date" + value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鎵嬫満鍙�"> + <el-input v-model="form.telephone" clearable size="small"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="鐭彿"> + <el-input v-model="form.cornet" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鍔炲叕鐢佃瘽"> + <el-input v-model="form.officePhone" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鍏徃閭"> + <el-input v-model="form.email" clearable size="small"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="璁$畻鏈虹瓑绾�"> + <el-input v-model="form.ncre" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鏈�楂樺鍘�"> + <el-input v-model="form.officialAcademicRedentials" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鏈�楂樺浣�"> + <el-input v-model="form.highestDegree" clearable size="small"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="姣曚笟闄㈡牎1"> + <el-input v-model="form.graduatedInstitutions1" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="涓撲笟1"> + <el-input v-model="form.major1" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="姣曚笟鏃堕棿1"> + <el-date-picker v-model="form.graduationTime1" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" + size="small" style="width: 99%;" type="date" + value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="姣曚笟闄㈡牎2"> + <el-input v-model="form.graduatedInstitutions2" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="涓撲笟2"> + <el-input v-model="form.major2" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="姣曚笟鏃堕棿2"> + <el-date-picker v-model="form.graduationTime2" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" + size="small" style="width: 99%;" type="date" + value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="鏄惁鍏ㄦ棩鍒�"> + <el-radio-group v-model="form.fullTime"> + <el-radio :label="1" size="mini">鏄�</el-radio> + <el-radio :label= "0" size="mini">鍚�</el-radio> + </el-radio-group> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鏄惁灞炰簬涓ぉ"> + <el-radio-group v-model="form.enroll"> + <el-radio :label=1 size="mini">鏄�</el-radio> + <el-radio :label=0 size="mini">鍚�</el-radio> + </el-radio-group> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="XX灞婂ぇ瀛︾敓"> + <el-input v-model="form.collegeStudents" clearable size="small"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="8"> + <el-form-item label="绱ф�ヨ仈绯讳汉"> + <el-input v-model="form.emergencyContact" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="绱ф�ヨ仈绯荤數璇�"> + <el-input v-model="form.emergencyContactPhone" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="8"> + <el-form-item label="鏈�鍚庢洿鏂版椂闂�"> + <el-date-picker v-model="form.lastUpdateTime" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" + size="small" style="width: 99%;" type="date" + value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="18"> + <el-form-item label="涓汉鐓х墖"> + <el-input v-model="form.pictureUrl" disabled size="small"> + <el-button v-if="form.pictureUrl" slot="append" icon="el-icon-delete-solid" + @click="deleteFile(form.pictureUrl, 'pictureUrl')"></el-button> + </el-input> + </el-form-item> + </el-col> + <el-col :span="6"> + <el-upload ref="upload" :action="action" :on-success="(response, file, fileList) => onSuccess(response, file, fileList, 'pictureUrl')" + :show-file-list="false" + style="float: left; margin: 0 10px 0 10px;"> + <el-button slot="trigger" class="uploadFile" size="mini" type="primary">涓婁紶</el-button> + </el-upload> + <el-button v-if="form.pictureUrl" class="uploadFile" size="mini" + type="primary" @click="downloadFile(form.pictureUrl)">涓嬭浇</el-button> + </el-col> + </el-row> + <el-row> + <el-col :span="18"> + <el-form-item label="鐢靛瓙绛惧悕"> + <el-input v-model="form.signatureUrl" disabled size="small"> + <el-button v-if="form.signatureUrl" slot="append" icon="el-icon-delete-solid" + @click="deleteFile(form.signatureUrl, 'signatureUrl')"></el-button> + </el-input> + </el-form-item> + </el-col> + <el-col :span="6"> + <el-upload ref="upload" :action="action" :on-success="(response, file, fileList) => onSuccess(response, file, fileList, 'signatureUrl')" + :show-file-list="false" + style="float: left; margin: 0 10px 0 10px;"> + <el-button slot="trigger" class="uploadFile" size="small" type="primary">涓婁紶</el-button> + </el-upload> + <el-button v-if="form.signatureUrl" class="uploadFile" size="small" + type="primary" @click="downloadFile(form.signatureUrl)">涓嬭浇</el-button> + </el-col> + </el-row> + <!-- <el-row> + <el-col :span="20"> + <el-form-item label="闄勪欢璧勬枡"> + <el-input v-model="form.attachmentInformation" size="small" disabled> + <el-button v-if="form.attachmentInformation" slot="append" + icon="el-icon-delete-solid" + @click="deleteFile(form.attachmentInformation, 'attachmentInformation')"></el-button> + </el-input> + </el-form-item> + </el-col> + <el-col :span="4"> + <el-upload ref="upload" style="float: left; margin: 0 20px;" :action="action" + :show-file-list="false" + :on-success="(response, file, fileList) => onSuccess(response, file, fileList, 'attachmentInformation')"> + <el-button class="uploadFile" slot="trigger" size="mini" type="primary">娴忚</el-button> + </el-upload> + <el-button class="uploadFile" size="mini" type="primary" @click="downloadFile(form.attachmentInformation)">涓嬭浇</el-button> + </el-col> + </el-row> --> + + <el-row> + <el-col :span="20"> + <el-form-item label="闄勪欢璧勬枡" > + </el-form-item> + </el-col> + <el-col :span="4"> + <el-button size="mini" style="float: right;margin-right: 25px" type="primary" @click="annexAdd(0)">鏂板</el-button> + </el-col> + </el-row> + <el-table :data="annexList" border height="200" style="width: 96%;float: right;"> + <el-table-column label="搴忓彿" type="index" width="80px"> + </el-table-column> + <el-table-column label="璇佷欢鍙�" prop="idNumber" width="150px"> + </el-table-column> + <el-table-column label="鍙戣瘉鍗曚綅" prop="issueUnit" width="150px"> + </el-table-column> + <el-table-column label="鏂囦欢鍚嶇О" prop="fileName" show-overflow-tooltip width="200px"> + </el-table-column> + <el-table-column label="绾у埆" prop="level" width="150px"> + </el-table-column> + <el-table-column label="鏈夋晥鏈�" prop="periodValidity" width="150px"> + </el-table-column> + <el-table-column label="娣诲姞鏃堕棿" prop="createTime" width="150px"> + </el-table-column> + <el-table-column fixed="right" label="鎿嶄綔" width="150px"> + <template slot-scope="scope"> + <el-button size="mini" type="text" @click="downloadFile(scope.row.fileName)">涓嬭浇</el-button> + <el-button size="mini" type="text" @click="annexAdd(1,scope.row)">缂栬緫</el-button> + <el-button size="mini" type="text" @click="deleteAnnex(scope.row)">鍒犻櫎</el-button> + </template> + </el-table-column> + </el-table> + </el-form> + <el-row> + </el-row> + </div> + </div> + </div> + <!-- 浜哄憳鍒嗙被寮规 --> + <el-dialog :visible.sync="dialogVisible" title="鎻愮ず" width="40%" @open="getComparisonList"> + <div style="height: 30vh;"> + <el-row> + <el-col :span="4"> + 浜哄憳鍒嗙被锛� + </el-col> + <el-col :span="20" style="text-align: left;"> + <el-checkbox-group v-model="checkList"> + <el-checkbox v-for="v in personnelClassification" :key="v.value" + :label="v.value"></el-checkbox> + </el-checkbox-group> + </el-col> + </el-row> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="dialogVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="clickPersonnelClassificationSure">纭� 瀹�</el-button> + </span> + </el-dialog> + + <!-- 鏂板闄勪欢璧勬枡 --> + <el-dialog :before-close="handleClose" :title="title" :visible.sync="dialogVisible1" width="40%" @open="getComparisonList"> + <el-form ref="annex" :model="annex" :rules="rules" label-width="100px"> + <el-row> + <el-col :span="16"> + <el-form-item label="璇佷欢鍙�" prop="idNumber"> + <el-input v-model="annex.idNumber" clearable size="small" style="width: 100%;"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row style="margin-top: 15px"> + <el-col :span="16"> + <el-form-item label="鍙戣瘉鍗曚綅" prop="issueUnit"> + <el-input v-model="annex.issueUnit" clearable size="small"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row style="margin-top: 15px"> + <el-col :span="16"> + <el-form-item label="绾у埆"> + <el-input v-model="annex.level" clearable size="small"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row style="margin-top: 15px"> + <el-col :span="16"> + <el-form-item label="鏈夋晥鏈�" prop="periodValidity"> + <el-date-picker v-model="annex.periodValidity" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" + style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + </el-row> + <el-row style="margin-top: 15px"> + <el-col :span="16"> + <el-form-item label="澶嶅嵃浠�"> + <el-input v-model="annex.copy" clearable size="small"></el-input> + </el-form-item> + </el-col> + </el-row> + + <el-row style="margin-top: 15px"> + <el-col :span="16"> + <el-form-item label="鍘熶欢"> + <el-input v-model="annex.original" clearable size="small"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row style="margin-top: 15px"> + <el-col :span="16"> + <el-form-item label="鏂囦欢"> + <el-upload + :action="action" + :before-upload="beforeAvatarUpload" + :on-success="(response,file,fileList) => onSuccess(response, file, fileList, 'fileName')" + :show-file-list="false"> + <img v-if="imageUrl" :src="imageUrl" class="avatar"> + <i v-else class="el-icon-upload avatar-uploader-icon"></i> + </el-upload> + </el-form-item> + </el-col> + </el-row> + </el-form> + <span slot="footer" class="dialog-footer"> + <el-button @click="cancellation">鍙� 娑�</el-button> + <el-button type="primary" @click="submitForm('annex')">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import fileDownload from '../../../util/file' +export default { + props: { + clickNodeVal: { + type: Object, + default: () => { return {} } + }, + }, + data() { + return { + addOrupdate: null, + title: '', + annexList: [], + imageUrl: '', + annex: { + userId: '', + idNumber: '', + issueUnit: '', + level: '', + periodValidity: '', + copy: '', + original: '', + fileName: '' + }, + rules: { + idNumber: [ + { required: true, message: '璇疯緭鍏ヨ瘉浠跺彿', trigger: 'blur' } + ], + issueUnit: [ + { required: true, message: '璇疯緭鍏ュ彂璇佸崟浣�', trigger: 'blur' } + ], + periodValidity: [ + { required: true, message: '璇烽�夋嫨鏈夋晥鏈�', trigger: 'blur' } + ] + }, + dialogVisible1: false, + form: { + userId: '', + name: '', + account: '', + currentState: '', + jobNumber: '', + subordinateNumber: '', + sex: '', + corporateName: '', + department: '', + departLimsId: [], + postType: '', + postCode: '', + postName: '', + groupTime: '', + unitTime: '', + reportingTo: '', + laborRelations: '', + trialStartTime: '', + trialEndTime: '', + personnelClassification: '', + dateBirth: '', + nativePlace: '', + nation: '', + idType: '', + identityCard: '', + age: '', + validityPeriod: '', + maritalStatus: '', + idAddress: '', + idDetailAddress: '', + currentAddress: '', + currentDetailAddress: '', + serviceAddress: '', + serviceDetailAddress: '', + retiredSoldiers: '', + politicalStatus: '', + dumplingTime: '', + telephone: '', + cornet: '', + officePhone: '', + email: '', + ncre: '', + officialAcademicRedentials: '', + highestDegree: '', + graduatedInstitutions1: '', + major1: '', + graduationTime1: '', + graduatedInstitutions2: '', + major2: '', + graduationTime2: '', + fullTime: '', + enroll: '', + collegeStudents: '', + emergencyContact: '', + emergencyContactPhone: '', + lastUpdateTime: '', + pictureUrl: '', + signatureUrl: '', + }, + department: [], + saveLoading: false, + dialogVisible: false, + personnelClassification: [], + checkList: [], + successFileList: [], // 闃叉鍚庣鍑虹幇鑴忔暟鎹� + isSave: false, + } + }, + components: { + fileDownload + }, + created() { + this.init() + }, + computed: { + action() { + return this.javaApi + this.$api.personnel.saveCNASFile + } + }, + methods: { + annexAdd(type,row) { + if(type === 1) { + this.title = '缂栬緫闄勪欢璧勬枡' + this.addOrupdate = 1 + this.$axios.get(this.$api.personnel.getAnnex + '?id=' + row.id).then(res => { + this.annex = res.data + this.imageUrl = this.javaApi + '/img/' + res.data.fileName + }) + }else { + this.title = '鏂板闄勪欢璧勬枡' + this.addOrupdate = 2 + } + this.dialogVisible1 = true + }, + submitForm(formName) { + this.$refs[formName].validate((valid) => { + if (valid) { + this.addAnnex() + } else { + return false + } + }) + }, + addAnnex() { + if(this.annex.fileName == "" || this.annex.fileName == null || this.annex.fileName == undefined) { + this.$message.error("璇蜂笂浼犳枃浠�") + return + } + this.annex.userId = this.clickNodeVal.userId + if(this.addOrupdate === 1) { + this.$axios.post(this.$api.personnel.updateAnnex, this.annex, { + headers: { + 'Content-Type': 'application/json' + } + }).then(res => { + if(res.code == 200) { + this.$axios.get(this.$api.personnel.getAnnexByUserId + '?userId=' + this.clickNodeVal.userId).then(res => { + this.dialogVisible1 = false + this.imageUrl = '' + this.resetForm('annex') + this.annexList = res.data + this.$message.success('鏇存柊鎴愬姛锛�') + }) + } + }) + }else { + this.annex.id = null + this.$axios.post(this.$api.personnel.addAnnex, this.annex, { + headers: { + 'Content-Type': 'application/json' + } + }).then(res => { + if(res.code == 200) { + this.$axios.get(this.$api.personnel.getAnnexByUserId + '?userId=' + this.clickNodeVal.userId).then(res => { + this.dialogVisible1 = false + this.imageUrl = '' + this.resetForm('annex') + this.annexList = res.data + this.$message.success('淇濆瓨鎴愬姛') + }) + } + }) + } + }, + deleteAnnex(row) { + this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ枃浠�, 鏄惁缁х画?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + this.$axios.delete(this.$api.personnel.deleteAnnex + '/' + row.id).then(res => { + this.$message.success('鍒犻櫎鎴愬姛锛�') + this.annexList = this.annexList.filter(item => item.id != row.id) + }) + }) + }, + beforeAvatarUpload(file) { + const isJPGorPNG = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/gif'; + const isLt2MB = file.size / 1024 / 1024 < 2; + if (!isJPGorPNG) { + this.$message.error('涓婁紶鍥剧墖鍙兘鏄� JPG/PNG 鏍煎紡!'); + return false; + } + if (!isLt2MB) { + this.$message.error('涓婁紶鍥剧墖澶у皬涓嶈兘瓒呰繃 2MB!'); + } + // 鏍¢獙閫氳繃鎵嶈繑鍥� true锛屽厑璁告枃浠朵笂浼� + return isJPGorPNG && isLt2MB; + }, + downloadFile(fileName) { + let url = this.javaApi + '/img/' + fileName; + fileDownload.downloadIamge(url, fileName) + }, + async onSuccess(response, file, fileList, entityVal) { + if(entityVal == 'fileName') { + this.annex.fileName = response.data + this.imageUrl = this.javaApi + '/img/' + response.data + } + // 鍦ㄤ繚瀛樿祴鍊兼柊鏂囦欢 + this.successFileList.push(response.data) + this.$set(this.form, entityVal, response.data) + }, + // 鍒濆鍖栬皟鐢� + init() { + if (!this.clickNodeVal.userId) { + let user = JSON.parse(localStorage.getItem('user')) + this.getUserBasisInfo(user.userId) + this.clickNodeVal.userId = user.userId + } else { + this.getUserBasisInfo(this.clickNodeVal.userId) + } + }, + getUserBasisInfo(userId) { + this.$axios.get(this.$api.personnel.getCNASPersonnelInfo + '?userId=' + userId).then(res => { + this.form = res.data.PersonBasicInfoDto + this.department = res.data.department + this.annexList = res.data.annexList + this.form.departLimsId = res.data.PersonBasicInfoDto.departLimsId.split(',').filter(a => a != "").map(Number) + console.log('res.data',res); + }) + }, + async save() { + this.saveLoading = true + this.form.userId = this.clickNodeVal.userId + if(Array.isArray(this.form.departLimsId)) { + if(this.form.departLimsId.length > 0) { + this.form.departLimsId = this.form.departLimsId.join(',').trim() + ',' + }else { + this.form.departLimsId = '' + } + } + this.$axios.post(this.$api.personnel.saveCNASPersonnelInfo, this.form, { + headers: { + 'Content-Type': 'application/json' + } + }).then(res => { + this.saveLoading = false + this.isSave = true + this.getUserBasisInfo(this.clickNodeVal.userId) + this.$message.success('淇濆瓨鎴愬姛锛�') + }) + }, + // 鍙栦汉鍛樺垎绫荤殑瀛楀吀 + getComparisonList() { + this.$axios.post(this.$api.enums.selectEnumByCategory, { + category: "浜哄憳鍒嗙被" + }).then(res => { + let data = res.data + this.personnelClassification = data; + this.checkList = this.form.personnelClassification.split('锛�') + }) + }, + clickPersonnelClassificationSure() { + this.dialogVisible = false + this.form.personnelClassification = this.checkList.filter(m=>m).join('锛�') + }, + async deleteFile(fileName, entityVal) { + await this.$axios.delete(this.$api.personnel.deleteCNASFile + "?fileName=" + fileName).then(res => { + this.$message.success('鍒犻櫎鎴愬姛锛�') + this.$set(this.form, entityVal, null) + let index = this.successFileList.indexOf(fileName) + if (index != -1) { + this.successFileList.splice(index, 1) + } + }) + }, + validateFileSize(rule, value, callback) { + if (!value) { + return callback(new Error('璇蜂笂浼犳枃浠�')); + }else { + callback(); + } + }, + cancellation() { + this.dialogVisible1 = false + this.imageUrl = '' + this.resetForm('annex') + }, + handleClose(done) { + this.imageUrl = '' + this.annex = { + userId: '', + idNumber: '', + issueUnit: '', + level: '', + periodValidity: '', + copy: '', + original: '', + fileName: '' + } + done(); + }, + resetForm(formName) { + this.$refs[formName].resetFields(); + } + }, + watch: { + // 鐩戝惉鐐瑰嚮el-tree鐨勬暟鎹紝杩涜鏁版嵁鍒锋柊 + clickNodeVal: { + handler(newVal, oldVal) { + if (newVal.userId) { + this.getUserBasisInfo(newVal.userId) + } + }, + } + } +} +</script> + +<style scoped> +>>>.el-form-item { + margin-bottom: 3px; +} + +.el-input { + border-radius: 15px; +} + +.el-icon-picture-outline { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); +} + +.uploadFile { + margin-top: 2px; + float: left; +} + .avatar-uploader-icon { + font-size: 28px; + color: #0f8bf1; + width: 178px; + height: 50px; + text-align: center; + border: 1px solid #d9d9d9; + } + .avatar { + width: 178px; + height: 178px; + display: block; + } +</style> diff --git a/src/components/do/a6-personnel/personnel-supervision.vue b/src/components/do/a6-personnel/personnel-supervision.vue new file mode 100644 index 0000000..5ad3091 --- /dev/null +++ b/src/components/do/a6-personnel/personnel-supervision.vue @@ -0,0 +1,100 @@ +<!-- 浜哄憳鐩戠潱 --> +<template> + <div> + <div style="text-align: left; margin-bottom: 15px;"> + <label>鍏抽敭瀛�</label> + <el-input placeholder="璇疯緭鍏ュ叧閿瓧" style="width: 20vh;" size="small"></el-input> + <el-button type="primary" size="small">鏌ヨ</el-button> + <div style="float: right;"> + <el-button type="primary" size="small">鏌ヨ</el-button> + <el-button type="primary" size="small">瀵煎嚭excel</el-button> + </div> + </div> + <div class="table"> + <el-table :data="tableData" style="width: 100%" height="70vh"> + <el-table-column prop="date" label="搴忓彿" min-width="120"> + </el-table-column> + <el-table-column prop="name" label="娴佺▼缂栧彿" min-width="180"> + </el-table-column> + <el-table-column prop="address" label="鎵�灞炲勾搴�" min-width="180"> + </el-table-column> + <el-table-column prop="address" label="缂栧埗鏃ユ湡" min-width="180"> + </el-table-column> + <el-table-column prop="address" label="鎻愪氦浜�" min-width="180"> + </el-table-column> + <el-table-column prop="address" label="褰撳墠鐘舵��" min-width="120"> + </el-table-column> + <el-table-column prop="address" label="褰撳墠璐d换浜�" min-width="180"> + </el-table-column> + <el-table-column fixed="right" label="鎿嶄綔" width="100"> + <template v-slot="scope"> + <el-button type="text" size="small">鏌ョ湅</el-button> + <el-button type="text" size="small">缂栬緫</el-button> + </template> + </el-table-column> + </el-table> + <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="1" + :page-sizes="[10, 20, 30, 50, 100]" :page-size="search.size" layout="->,total, sizes, prev, pager, next, jumper" + :total="search.total"> + </el-pagination> + </div> + </div> +</template> + +<script> +export default { + props: { + clickNodeVal: { + type: Object, + default: () => { + return {}; + } + } + }, + data() { + return { + tableData: [], + search: { + size: 20, + current: 1, + total: 0 + } + }; + }, + created() { + this.init(); + }, + methods: { + handleSizeChange(val) { + this.search.size = val + this.getPersonnelTraining(this.clickNodeVal.userId); + }, + handleCurrentChange(val) { + this.search.current = val + this.getPersonnelTraining(this.clickNodeVal.userId); + }, + // 鍒濆鍖栬皟鐢� + init() { + if (this.clickNodeVal.userId) { + this.getPersonnelTraining(this.clickNodeVal.userId ? this.clickNodeVal.userId : null, null); + } else { + this.getPersonnelTraining(null, this.clickNodeVal.id ? this.clickNodeVal.id : null); + } + }, + getPersonnelTraining(userId) { + this.search.userId = userId + this.$axios.get(this.$api.personnel.personTrainingSelect+"?userId=" + userId + "&size=" + this.search.size + "¤t=" + this.search.current).then(res => { + console.log(`output->res`,res) + }) + } + }, + watch: { + // 鐩戝惉鐐瑰嚮el-tree鐨勬暟鎹紝杩涜鏁版嵁鍒锋柊 + clickNodeVal(newVal) { + if (newVal.userId) { + this.getPersonnelTraining(newVal.userId); + } + } + } +}; +</script> \ No newline at end of file diff --git a/src/components/do/a6-personnel/reward-punishment-record.vue b/src/components/do/a6-personnel/reward-punishment-record.vue new file mode 100644 index 0000000..9bac57a --- /dev/null +++ b/src/components/do/a6-personnel/reward-punishment-record.vue @@ -0,0 +1,329 @@ +<!-- 濂栨儵璁板綍 --> +<template> + <div> + <div style="text-align: left; margin-bottom: 15px;"> + <label>濮撳悕</label> + <el-input v-model="search.userName" clearable placeholder="璇疯緭鍏ュ叧閿瓧" size="small" style="width: 20vh;"></el-input> + <label style="margin-left: 1em">濂栨儵鏃ユ湡</label> + <el-date-picker + v-model="search.searchTimeList" + :picker-options="pickerOptions" + align="right" + clearable + end-placeholder="缁撴潫鏃ユ湡" + format="yyyy-MM-dd" + range-separator="鑷�" + size="small" + start-placeholder="寮�濮嬫棩鏈�" + style="width: 20%" + type="daterange" + unlink-panels + value-format="yyyy-MM-dd 00:00:00"> + </el-date-picker> + <el-button size="small" type="primary" @click="getPersonnelTraining(departId)">鏌ヨ</el-button> + <div style="float: right;"> + <el-button :loading="outLoading" size="small" type="primary" @click="handleDown">瀵煎嚭</el-button> + <el-button size="small" type="primary" @click="dialogVisible = true">鏂板</el-button> + </div> + </div> + <div class="table"> + <el-table :data="tableData" height="70vh" style="width: 100%"> + <el-table-column label="搴忓彿" type="index" width="120"> + <template v-slot="scope"> + <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span> + </template> + </el-table-column> + <el-table-column label="鍛樺伐缂栧彿" min-width="180" prop="account"> + </el-table-column> + <el-table-column label="濮撳悕" min-width="180" prop="userName"> + </el-table-column> + <el-table-column label="濂栨儵绾у埆" min-width="180" prop="rewardPunishLevel"> + </el-table-column> + <el-table-column label="濂栨儵鏃堕棿" min-width="180" prop="rewardPunishTime"> + </el-table-column> + <el-table-column label="濂栨儵鍚嶇О" min-width="180" prop="rewardPunishName"> + </el-table-column> + <el-table-column label="濂栨儵鍏蜂綋鍐呭" min-width="120" prop="rewardPunishContent"> + </el-table-column> + <el-table-column label="濂栨儵鍗曚綅" min-width="180" prop="rewardPunishWorkUnit"> + </el-table-column> + <el-table-column label="鍒涘缓浜�" min-width="180" prop="createUserName"> + </el-table-column> + <el-table-column fixed="right" label="鎿嶄綔" width="100"> + <template v-slot="scope"> + <el-button size="small" type="text" @click="editForm(scope.row)">缂栬緫</el-button> + <el-button size="small" type="text" @click="deleteRow(scope.row)">鍒犻櫎</el-button> + </template> + </el-table-column> + </el-table> + <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" + :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" + @size-change="handleSizeChange" + @current-change="handleCurrentChange"> + </el-pagination> + </div> + <el-dialog + :visible.sync="dialogVisible" + title="鎻愮ず" + width="50%" + @open="getUserList"> + <div style="height: 40vh"> + <el-form ref="form" :model="form" :rules="rules" label-width="120px"> + <el-col :span="12"> + <el-form-item label="鍛樺伐缂栧彿"> + <el-input v-model="form.account" disabled size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鍛樺伐濮撳悕" prop="userName"> + <el-select v-model="form.userName" placeholder="璇烽�夋嫨" size="small" style="width: 100%" value-key="id" + @change="selectUserChange"> + <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item"> + </el-option> + </el-select> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="濂栨儵绾у埆" prop="rewardPunishLevel"> + <el-input v-model="form.rewardPunishLevel" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="濂栨儵鍚嶇О" prop="rewardPunishName"> + <el-input v-model="form.rewardPunishName" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="濂栨儵鏃堕棿" prop="rewardPunishTime"> + <el-date-picker + v-model="form.rewardPunishTime" + format="yyyy-MM-dd HH:mm:ss" + placeholder="閫夋嫨鏃ユ湡" + size="small" + style="width: 100%" + type="datetime" + value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="濂栨儵鍗曚綅" prop="rewardPunishWorkUnit"> + <el-input v-model="form.rewardPunishWorkUnit" size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="濂栨儵鍐呭"> + <el-input v-model="form.rewardPunishContent" :rows="2" size="small" type="textarea"></el-input> + </el-form-item> + </el-col> + </el-form> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="dialogVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="saveOrUpdate">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import { + addOrUpdateRewardPunishmentApi, + deleteRewardPunishmentApi, + rewardPunishmentExportApi, + rewardPunishmentPageApi +} from "../../../assets/api/api" +export default { + props: { + departId: { + type: Number, + default: () => { + return null; + } + }, + isDepartment: { + type: Boolean, + default: false + } + }, + data() { + return { + tableData: [], + search: { + size: 20, + current: 1, + total: 0, + userName: '', + searchTimeList: [] + }, + form: {}, + dialogVisible: false, + outLoading: false, + pickerOptions: { + shortcuts: [{ + text: '鏈�杩戜竴鍛�', + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); + picker.$emit('pick', [start, end]); + } + }, { + text: '鏈�杩戜竴涓湀', + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); + picker.$emit('pick', [start, end]); + } + }, { + text: '鏈�杩戜笁涓湀', + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); + picker.$emit('pick', [start, end]); + } + }] + }, + rules: { + userName: [{ + required: true, message: '璇烽�夋嫨鍛樺伐濮撳悕', trigger: 'change' + }], + rewardPunishLevel: [{ + required: true, message: '璇疯緭鍏ュ鎯╃骇鍒�', trigger: 'blur' + }], + rewardPunishName: [{ + required: true, message: '璇疯緭鍏ュ鎯╁悕绉�', trigger: 'blur' + }], + rewardPunishTime: [{ + required: true, message: '璇疯緭鍏ュ鎯╂椂闂�', trigger: 'blur' + }], + rewardPunishWorkUnit: [{ + required: true, message: '璇疯緭鍏ュ鎯╁崟浣�', trigger: 'blur' + }] + }, + responsibleOptions: [] + }; + }, + mounted() { + this.getPersonnelTraining(this.departId); + }, + methods: { + handleSizeChange(val) { + this.search.size = val + this.getPersonnelTraining(this.departId); + }, + handleCurrentChange(val) { + this.search.current = val + this.getPersonnelTraining(this.departId); + }, + async getPersonnelTraining() { + const {code, data} = await this.$axios({ + method: 'get', + url: rewardPunishmentPageApi, + params: { + userId: this.isDepartment ? '' : this.departId, + departmentId: this.isDepartment ? this.departId : '', + current: this.search.curent, + size: this.search.size, + userName: this.search.userName, + startTime: this.search.searchTimeList && this.search.searchTimeList[0], + endTime: this.search.searchTimeList && this.search.searchTimeList[1], + } + }) + if (code == 200) { + this.tableData = data.records + this.search.total = data.total + } + }, + handleDown(){ + this.outLoading = true + this.$axios.post(this.$api.deviceCheck.rewardPunishmentExport,{ + userId: this.isDepartment ? '' : this.departId, + departmentId: this.isDepartment ? this.departId : '', + userName: this.search.userName, + startTime: this.search.searchTimeList && this.search.searchTimeList[0], + endTime: this.search.searchTimeList && this.search.searchTimeList[1] + },{responseType: 'blob'}).then(res => { + this.outLoading = false + const blob = new Blob([res], { + type: 'application/force-download' + }) + // 鍒涘缓涓�涓秴閾炬帴锛屽皢鏂囦欢娴佽祴杩涘幓锛岀劧鍚庡疄鐜拌繖涓秴閾炬帴鐨勫崟鍑讳簨浠� + const elink = document.createElement('a') + elink.download = decodeURI('濂栨儵璁板綍'+'.xlsx') + elink.style.display = 'none' + elink.href = URL.createObjectURL(blob) + document.body.appendChild(elink) + elink.click(); + URL.revokeObjectURL(elink.href) // 閲婃斁URL 瀵硅薄 + document.body.removeChild(elink) + }) + }, + // 鑾峰彇璐熻矗浜轰俊鎭帴鍙� + getUserList() { + this.$axios.get(this.$api.deviceScope.selectUserList).then(res => { + if (res.code == 200) { + this.responsibleOptions = res.data + } + }) + }, + selectUserChange(val) { + this.form.userName = val.name + this.form.account = val.account + this.form.userId = val.id + }, + editForm(row) { + this.dialogVisible = true + this.form = {...row}; + }, + saveOrUpdate() { + this.$refs.form.validate(async (valid) => { + if (valid) { + this.dialogVisible = false + const {code, data} = await this.$axios({ + method: 'post', + url: addOrUpdateRewardPunishmentApi, + data: this.form, + headers: { + 'Content-Type': 'application/json' + } + }) + if (code == 200) { + this.$message.success("鎿嶄綔鎴愬姛锛�") + this.getPersonnelTraining(this.departId); + } + } + }) + }, + async deleteRow(row) { + const {code, data} = await this.$axios({ + method: 'delete', + url: deleteRewardPunishmentApi, + params: { + id: row.id + } + }) + if (code == 200) { + this.$message.success("鎿嶄綔鎴愬姛锛�") + this.getPersonnelTraining(this.departId); + } + } + }, + watch: { + // 鐩戝惉鐐瑰嚮el-tree鐨勬暟鎹紝杩涜鏁版嵁鍒锋柊 + departId: { + handler(newId, oldId) { + this.getPersonnelTraining(newId); + } + }, + dialogVisible(newVal) { + if (newVal === false) { + this.form = {} + this.$refs['form'].clearValidate() + } + } + } +}; +</script> diff --git a/src/components/do/a6-personnel/track-record.vue b/src/components/do/a6-personnel/track-record.vue new file mode 100644 index 0000000..60e0aed --- /dev/null +++ b/src/components/do/a6-personnel/track-record.vue @@ -0,0 +1,299 @@ +<!-- 宸ヤ綔灞ュ巻 --> +<template> + <div> + <div style="text-align: right; margin-bottom: 15px;"> + <el-button type="primary" size="small" @click="dialogVisible = true" v-if="clickNodeVal.userId">娣诲姞宸ヤ綔灞ュ巻</el-button> + <el-button type="primary" size="small" @click="exportExcel" :loading="outLoading">瀵煎嚭excel</el-button> + </div> + <div class="table"> + <el-table :data="tableData" style="width: 100%" height="70vh"> + <el-table-column type="index" label="搴忓彿" width="120"> + <template v-slot="scope"> + <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span> + </template> + </el-table-column> + <el-table-column prop="startTime" label="璧峰鏃ユ湡" min-width="180"> + </el-table-column> + <el-table-column prop="endTime" label="缁撴潫鏃ユ湡" min-width="180"> + </el-table-column> + <el-table-column prop="placeWork" label="宸ヤ綔鍗曚綅" min-width="120"> + </el-table-column> + <el-table-column prop="department" label="宸ヤ綔閮ㄩ棬" min-width="120"> + </el-table-column> + <el-table-column prop="post" label="鑱屽姟" min-width="120"> + </el-table-column> + <el-table-column prop="remarks" label="澶囨敞" min-width="180"> + </el-table-column> + <el-table-column prop="createUser" label="鍒涘缓浜�" min-width="180"> + </el-table-column> + <el-table-column prop="createTime" label="鍒涘缓鏃堕棿" min-width="180"> + </el-table-column> + <el-table-column fixed="right" label="鎿嶄綔" width="150"> + <template v-slot="scope"> + <el-button type="text" size="small" @click="downloadFile(scope.row.fileName)">涓嬭浇</el-button> + <el-button type="text" size="small" @click="checkFun(scope.row)">鏌ョ湅</el-button> + <el-button type="text" size="small" style="color: red;" @click="deleteFun(scope.row.id)">鍒犻櫎</el-button> + </template> + </el-table-column> + </el-table> + <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="1" + :page-sizes="[10, 20, 30, 50, 100]" :page-size="search.size" layout="->,total, sizes, prev, pager, next, jumper" + :total="search.total"> + </el-pagination> + </div> + <el-dialog title="鎻愮ず" :visible.sync="dialogVisible" width="45%"> + <div style="height: 30vh;"> + <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> + <el-row> + <el-col :span="12"> + <el-form-item label="璧峰鏃ユ湡" prop="startTime"> + <el-date-picker v-model="ruleForm.startTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" + style="width: 99%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" required> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="缁撴潫鏃ユ湡"> + <el-date-picker v-model="ruleForm.endTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" + style="width: 99%;" format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="12"> + <el-form-item label="宸ヤ綔鍗曚綅" prop="placeWork"> + <el-input v-model="ruleForm.placeWork" size="small" clearable required></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="宸ヤ綔閮ㄩ棬" prop="department"> + <el-input v-model="ruleForm.department" size="small" clearable required></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="12"> + <el-form-item label="鏈�楂樿亴鍔�" prop="post"> + <el-input v-model="ruleForm.post" size="small" clearable required></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="闄勪欢璧勬枡"> + <el-row> + <el-col :span="17"><el-input v-model="ruleForm.fileName" size="small" disabled></el-input></el-col> + <el-col :span="7"> + <el-upload ref="upload" style="float: left; margin: 0 20px;" :action="action" + :on-success="onSuccess" :on-change="handleChangePic" :show-file-list="false"> + <el-button class="uploadFile" slot="trigger" size="mini" type="primary">娴忚</el-button> + </el-upload> + </el-col> + </el-row> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="24"> + <el-form-item label="澶囨敞"> + <el-input v-model="ruleForm.remarks" size="small" clearable></el-input> + </el-form-item> + </el-col> + </el-row> + </el-form> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="dialogVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="saveOrUpdate">{{ isUpdate ? '鏇� 鏂�' : '淇� 瀛�' }}</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> + import fileDownload from '../../../util/file' +export default { + props: { + clickNodeVal: { + type: Object, + default: () => { + return {}; + } + } + }, + data() { + return { + tableData: [], + search: { + size: 20, + current: 1, + total: 0 + }, + dialogVisible: false, + ruleForm: { + fileName: '', + sysFileName: '' + }, + rules: { + startTime: [ + { required: true, message: '璇疯緭鍏ヨ捣濮嬫棩鏈�', trigger: 'blur' }, + { required: true, message: '璇疯緭鍏ヨ捣濮嬫棩鏈�', trigger: 'change' } + ], + placeWork: [ + { required: true, message: '璇疯緭鍏ュ伐浣滃崟浣�', trigger: 'blur' } + ], + department: [ + { required: true, message: '璇疯緭鍏ュ伐浣滈儴闂�', trigger: 'blur' } + ], + post: [ + { required: true, message: '璇疯緭鍏ユ渶楂樿亴鍔�', trigger: 'blur' } + ] + }, + isUpdate: false, + outLoading: false + }; + }, + created() { + this.init(); + }, + computed: { + action() { + return this.javaApi + this.$api.personnel.saveCNASFile + } + }, + methods: { + downloadFile(fileName) { + let url = this.javaApi + '/img/' + fileName; + fileDownload.downloadIamge(url,fileName) + }, + handleChangePic(file, fileList) { + if (fileList.length > 1) { + fileList.splice(0, 1); + } + }, + onSuccess(response, file, fileList) { + if (response.code === 200) { + this.$set(this.ruleForm, 'fileName', response.data) + } else { + this.$message.warning(response.message) + } + }, + exportExcel() { + this.outLoading = true + let userId = this.clickNodeVal.userId ? this.clickNodeVal.userId : null + let departmentId = this.clickNodeVal.id ? this.clickNodeVal.id : null + this.$axios.get(this.$api.personnel.personTrackRecordExport + "?userId=" + userId + "&departmentId=" + departmentId, { responseType: "blob" }).then(res => { + this.outLoading = false + this.$message.success('瀵煎嚭鎴愬姛') + const blob = new Blob([res], { type: 'application/octet-stream' }); + const url = URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = url; + link.download = '宸ヤ綔灞ュ巻.xlsx'; + link.click(); + }) + }, + saveOrUpdate() { + this.$refs['ruleForm'].validate((valid) => { + if (valid) { + if (this.isUpdate) { + this.$axios.put(this.$api.personnel.personTrackRecordUpdate, this.ruleForm, { + headers: { + 'Content-Type': 'application/json' + } + }).then(res => { + if (res.code = 200) { + this.dialogVisible = false + this.$message.success('鏇存柊鎴愬姛锛�') + this.init() + } + }) + } else { + this.ruleForm.userId = this.clickNodeVal.userId + this.$axios.post(this.$api.personnel.personTrackRecordSave, this.ruleForm, { + headers: { + 'Content-Type': 'application/json' + } + }).then(res => { + if (res.code = 200) { + this.dialogVisible = false + this.$message.success('鏂板鎴愬姛锛�') + this.init() + } + }) + } + } else { + return false; + } + }); + }, + deleteFun(id) { + this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + this.$axios.delete(this.$api.personnel.personTrackRecordDelete + "?id=" + id).then(res => { + this.$message.success('鍒犻櫎鎴愬姛锛�') + this.init() + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑堝垹闄�' + }); + }); + }, + handleSizeChange(val) { + this.search.size = val + this.init() + }, + handleCurrentChange(val) { + this.search.current = val + this.init() + }, + // 鍒濆鍖栬皟鐢� + init() { + if (this.clickNodeVal.userId) { + this.getPersonnelTraining(this.clickNodeVal.userId ? this.clickNodeVal.userId : null, null); + } else { + this.getPersonnelTraining(null, this.clickNodeVal.id ? this.clickNodeVal.id : null); + } + }, + getPersonnelTraining(userId, departmentId) { + this.$axios.get(this.$api.personnel.personTrackRecordSelect + "?userId=" + userId + "&size=" + this.search.size + "¤t=" + this.search.current + "&departmentId=" + departmentId).then(res => { + this.tableData = res.data.records + this.search.total = res.data.total + }) + }, + checkFun(row) { + this.ruleForm = { ...row } + this.dialogVisible = true + this.isUpdate = true + } + }, + watch: { + // 鐩戝惉鐐瑰嚮el-tree鐨勬暟鎹紝杩涜鏁版嵁鍒锋柊 + clickNodeVal(newVal) { + if (newVal.userId) { + // 鐢ㄦ埛id + this.getPersonnelTraining(newVal.userId, null); + } else { + // 閮ㄩ棬id + this.getPersonnelTraining(null, newVal.id); + } + }, + dialogVisible(newVal) { + if (!newVal) { + this.isUpdate = false + this.$refs.ruleForm.resetFields(); + this.ruleForm = {} + } + } + } +}; +</script> +<style scoped> +>>>.el-form-item { + margin-bottom: 13px; +} +</style> diff --git a/src/components/do/a6-personnel/training-record.vue b/src/components/do/a6-personnel/training-record.vue new file mode 100644 index 0000000..21ad553 --- /dev/null +++ b/src/components/do/a6-personnel/training-record.vue @@ -0,0 +1,319 @@ +<!-- 鍩硅璁板綍 --> +<template> + <div> + <div class="flex_table"> + <div v-if="isDepartment" style="width: 50%"> + <TableCard :showTitle="false"> + <template v-slot:form> + <div class="items_center"> + <span>濮撳悕</span> + <el-input v-model="trainingPagination.userName" class="search" clearable placeholder="璇疯緭鍏�" size="small"></el-input> + <el-button size="small" type="primary" @click="getPersonnelTraining(departId)">鏌ヨ</el-button> + </div> + <div> +<!-- <el-button :loading="outLoading" size="small" type="primary" @click="exportExcel">瀵煎嚭</el-button>--> + </div> + </template> + <template v-slot:table> + <ZTTable + :column="trainingColumn" + :currentChange="currentChange" + :height="'calc(100vh - 18em)'" + :highlightCurrentRow="true" + :table-data="trainingTableData" + :table-loading="trainingLoading" + style="padding: 0 15px;"> + </ZTTable> + <div class="pagination"> + <div></div> + <el-pagination + :page-size="trainingPagination.size" + :page-sizes="[10, 20, 30, 40]" + :total="trainingPagination.total" + layout="total, sizes, prev, pager, next, jumper" + @current-change="handleYearCurrentTraining" + @size-change="handleYearSizeChangeTraining"> + </el-pagination> + </div> + </template> + </TableCard> + </div> + <div :style="`width: ${isDepartment ? '50%' : '100%'};`"> + <TableCard :showTitle="false"> + <template v-slot:form> + <div class="items_center"> + <span>骞翠唤</span> + <el-date-picker + v-model="searchForm.trainingDate" + clearable + format="yyyy" + placeholder="閫夋嫨骞�" + size="small" + style="margin: 0 10px" + type="year" + value-format="yyyy"> + </el-date-picker> + <el-button size="small" type="primary" @click="queryPersonnelDetailsPage(currentChangeRow.userId)">鏌ヨ</el-button> + <el-button size="small" type="primary" @click="openDownloadDia(currentChangeRow)">瀵煎嚭</el-button> + </div> + </template> + <template v-slot:table> + <ZTTable + :column="trainingPersonColumn" + :height="'calc(100vh - 18em)'" + :table-data="trainingPersonTableData" + :table-loading="trainingPersonLoading" + style="padding: 0 15px;"> + </ZTTable> + <div class="pagination"> + <div></div> + <el-pagination + :page-size="trainingPersonPagination.size" + :page-sizes="[10, 20, 30, 40]" + :total="trainingPersonPagination.total" + layout="total, sizes, prev, pager, next, jumper" + @current-change="handleYearCurrentPagination" + @size-change="handleYearSizeChangePagination"> + </el-pagination> + </div> + </template> + </TableCard> + </div> + </div> + </div> +</template> + +<script> +import ZTTable from '../../caorui/ZTTable/index.vue'; +import TableCard from '../../caorui/TableCard/index.vue'; +import {exportPersonSupervisionRecord} from "../../../assets/api/api"; + +export default { + components: { TableCard, ZTTable }, + props: { + departId: { + type: Number, + default: () => { + return null; + } + }, + isDepartment: { + type: Boolean, + default: false + } + }, + data() { + return { + outLoading: false, + trainingForm: {}, + trainingColumn: [ + { + label: '鍛樺伐缂栧彿', + prop: 'account', + width: '100' + }, { + label: '濮撳悕', + prop: 'name' + }, { + label: '鎵�鍦ㄩ儴闂�', + prop: 'departLimsName', + width: '150' + }, { + label: '鑱岀О', + prop: 'professionalTitle' + }, { + label: '鏈�楂樺鍘�', + prop: 'officialAcademicRedentials', + width: '100' + }, { + label: '鍏ュ崟浣嶆椂闂�', + prop: 'unitTime', + width: '150' + }, + // { + // fixed: 'right', + // dataType: 'action', + // width: 80, + // label: '鎿嶄綔', + // operation: [ + // { + // name: '瀵煎嚭', + // type: 'text', + // clickFun: (row) => { + // this.openDownloadDia(row) + // } + // } + // ] + // } + ], + trainingTableData: [], + trainingLoading: false, + trainingPagination: { + size: 20, + total: 0, + current: 1, + userName: null + }, + searchForm: { + trainingDate: '' + }, + trainingPersonColumn: [ + { + label: '鍩硅鏃ユ湡', + prop: 'trainingDate' + }, { + label: '鍩硅鍐呭', + prop: 'trainingContent' + }, { + label: '鍩硅璇炬椂', + prop: 'educationBackground' + }, { + label: '璇炬椂', + prop: 'classHour' + }, { + label: '鍩硅缁撴灉', + prop: 'examinationResults', + }, { + label: '澶囨敞', + prop: 'remarks' + } + ], + trainingPersonTableData: [], + trainingPersonLoading: false, + trainingPersonPagination: { + size: 20, + current: 1, + total: 0 + }, + currentChangeRow: '', + }; + }, + mounted() { + this.getPersonnelTraining(this.departId); + }, + methods: { + exportExcel() { + this.outLoading = true; + const name = this.isDepartment ? 'departmentId' : 'userId'; + this.$axios.get(this.$api.personnel.personTrackRecordExport + `&${name}=` + this.departId, { responseType: 'blob' }).then(res => { + this.outLoading = false; + this.$message.success('瀵煎嚭鎴愬姛'); + const blob = new Blob([res], { type: 'application/octet-stream' }); + const url = URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = url; + link.download = '鍩硅璁板綍.xlsx'; + link.click(); + }).catch(err => { + this.outLoading = false; + }) + }, + // 鏌ヨ + refreshTable() { + this.getPersonnelTraining(this.departId); + }, + // 鍩硅璁板綍瀵煎嚭 + openDownloadDia (row) { + let date = this.searchForm.trainingDate + if (!date) { + date = this.$moment().format('YYYY') + } + console.log('date----', date); + this.$axios.get( this.$api.personnel.exportTrainingRecord+ '?userId=' + row.userId + '&trainingDate=' + date,{responseType: "blob"}).then(res => { + this.outLoading = false + this.$message.success('瀵煎嚭鎴愬姛') + const blob = new Blob([res],{ type: 'application/msword' }); + const url = URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = url; + link.download = '鍩硅璁板綍瀵煎嚭' + '.docx'; + link.click(); + }) + }, + // 鑾峰彇瀹為獙瀹�-鍩硅璁″垝鍒楄〃淇℃伅 + getPersonnelTraining(departId) { + // const name = this.isDepartment ? 'departmentId' : 'userId'; + this.$axios.get(`${this.$api.personnel.trainingSelectTrainingRecord}?departmentId=${departId}&size=${this.trainingPagination.size}¤t=${this.trainingPagination.current}&userName=${this.trainingPagination.userName}`).then(res => { + this.trainingTableData = res.data.records; + this.trainingPagination.total = res.data.total; + if (this.trainingTableData.length > 0) { + this.currentChange(this.trainingTableData[0]); + } + }); + }, + // 鑾峰彇涓汉-鍩硅璁″垝鍒楄〃淇℃伅 + currentChange(row) { + this.currentChangeRow = row + if (row === null) { + row = this.trainingTableData[0] + } + this.queryPersonnelDetailsPage(row.userId) + }, + queryPersonnelDetailsPage(userId) { + if (this.searchForm.trainingDate === null) { + this.searchForm.trainingDate = '' + } + this.$axios.get(`${this.$api.personnel.queryPersonnelDetails}?userId=${userId}&size=${this.trainingPersonPagination.size}¤t=${this.trainingPersonPagination.current}&trainingDate=${this.searchForm.trainingDate}`).then(res => { + this.trainingPersonTableData = res.data.records; + this.trainingPersonPagination.total = res.data.total; + }); + }, + // 鍒嗛〉 + handleYearCurrentTraining(page) { + this.trainingPagination.curent = page; + this.getPersonnelTraining(this.departId); + }, + handleYearSizeChangeTraining(size) { + this.trainingPagination.size = size; + this.getPersonnelTraining(this.departId); + }, + // 鍒嗛〉 + handleYearCurrentPagination(page) { + this.trainingPersonPagination.curent = page; + this.queryPersonnelDetailsPage(this.currentChangeRow.userId); + }, + handleYearSizeChangePagination(size) { + this.trainingPersonPagination.size = size; + this.queryPersonnelDetailsPage(this.currentChangeRow.userId); + } + }, + watch: { + departId: { + handler(newId, oldId) { + if (this.isDepartment) { + this.getPersonnelTraining(newId); + } else { + this.queryPersonnelDetailsPage(newId) + } + } + } + } +}; +</script> +<style scoped> +>>> .el-form-item { + margin-bottom: 13px; +} + +.flex_table { + display: flex; + flex-direction: row; + justify-content: space-between; +} + +.pagination { + display: flex; + justify-content: space-between; + margin-top: 10px; +} + +.items_center { + display: flex; + align-items: center; +} + +.search { + width: 150px; + padding: 0 6px; +} +</style> diff --git a/src/components/do/a8-file-handling/FileChangeRequest.vue b/src/components/do/a8-file-handling/FileChangeRequest.vue index 00f24ac..3ba9eab 100644 --- a/src/components/do/a8-file-handling/FileChangeRequest.vue +++ b/src/components/do/a8-file-handling/FileChangeRequest.vue @@ -465,6 +465,9 @@ // 褰撳墠鏂囦欢 getCurrentFile(e){ this.currentFile = this.fileList.find(m=>m.documentCode==e) + if(!this.currentFile){ + this.currentFile = {} + } }, selectEnumByCategory() { this.$axios.post(this.$api.enums.selectEnumByCategory, { diff --git a/src/components/view/a6-personnel.vue b/src/components/view/a6-personnel.vue new file mode 100644 index 0000000..9e788fa --- /dev/null +++ b/src/components/view/a6-personnel.vue @@ -0,0 +1,324 @@ +<template> + <div class="main"> + + <div class="main_left"> + <el-row> + <el-col :span="20"> + <el-input + v-model="search" + class="div_left_input" + clearable + placeholder="杈撳叆鍏抽敭瀛楄繘琛屾悳绱�" + size="small" + suffix-icon="el-icon-search" + @blur="searchFilter" + @clear="searchFilter" + @keyup.enter.native="searchFilter" + ></el-input> + </el-col> + <el-col :span="4" style="text-align: center;line-height: 30px; margin-top: 14px"> + <el-button circle icon="el-icon-plus" size="mini" type="primary" @click="handleAdd"></el-button> + </el-col> + </el-row> + <el-tree + ref="tree" + :data="list" + :default-expanded-keys="[1]" + :expand-on-click-node="false" + :filter-node-method="filterNode" + :props="{ children: 'children', label: 'name' }" + highlight-current + node-key="id" + style="height:calc(100% - 70px);overflow-y: scroll;scrollbar-width: none;" + @node-click="handleNodeClick" + @node-expand="nodeOpen" + @node-collapse="nodeClose" + > + <div slot-scope="{ node, data }" class="custom-tree-node"> + <el-row style="width: 100%;"> + <el-col :span="22" style="text-align: left;"> + <span><i + :class="`node_i ${data.children != undefined&&data.children.length>0 ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i> + {{ data.name }}</span> + </el-col> + <el-col v-if="node.level>1 && data.id !== null" :span="2" style="text-align: right;"> + <el-button size="mini" type="text" @click.stop="remove(node, data)"> + <i class="el-icon-delete"></i> + </el-button> + </el-col> + </el-row> + </div> + </el-tree> + </div> + <div style="width: 10px;"></div> + <div class="main_right"> + <!-- 閮ㄩ棬 --> + <Department + ref="departRef" + :clickNodeVal="clickNodeVal" + :currentCompaniesList="currentCompaniesList" + :departId="departId" + :isDepartment="isDepartment" + :isShowAll="isShowAll" + /> + </div> + <el-dialog :visible.sync="addDia" title="鏋舵瀯鏂板" width="400px"> + <div class="body"> + <el-row style="line-height: 50px;"> + <el-col :span="6" style="text-align: right;"> + <span class="required-span">* </span>鏋舵瀯鍚嶇О锛� + </el-col> + <el-col :offset="1" :span="16"> + <el-input v-model="addOb.name" clearable placeholder="璇疯緭鍏ユ灦鏋勫悕绉�" size="small" @keyup.enter.native="addStandardTree"></el-input> + </el-col> + </el-row> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="addDia = false">鍙� 娑�</el-button> + <el-button type="primary" @click="addStandardTree">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import Department from '../caorui/Department/index.vue'; + +export default { + components: { + Department + }, + data() { + return { + isShowAll: true, // 鏄惁灞曠ず鏍囩鏍� + departId: 0, + list: [], + addDia: false, + addOb: { + name: '', + fatherId: '' + }, + search: '', + clickNodeVal: {}, + addUserForm: { + name: '' + }, + currentCompaniesList: [], + entity: { + name: '', + departLimsId: '', + orderBy: { + field: 'id', + order: 'asc' + } + }, + overallRecord: '浜哄憳鍒楄〃', + isDepartment: false, + }; + }, + mounted() { + this.geList(); + }, + methods: { + remove(node, data) { + this.$confirm("鏄惁鍒犻櫎璇ュ眰绾�", "鎻愮ず", { + type: "error" + }).then(() => { + this.treeLoad = true + this.$axios.post(this.$api.department.delDepartmentLims, { + id: data.id + }).then(res => { + if (res.code == 201) return + this.$message.success('宸插垹闄�') + this.geList(); + }) + }).catch(e => {}) + }, + addStandardTree() { + if (this.addOb.name == null || this.addOb.factory == '') { + this.$message.error('鏋勬灦鍚嶇О鏄繀濉」') + return + } + this.$axios.post(this.$api.department.addDepartmentLims, this.addOb, { + headers: { + 'Content-Type': 'application/json' + } + }).then(res => { + if (res.code === 201) { + return + } + this.$message.success('娣诲姞鎴愬姛') + this.addDia = false + this.geList(); + this.addOb.name = '' + this.addOb.fatherId = '' + }) + }, + handleAdd() { + if (this.addOb.fatherId) { + this.addDia = true; + } else { + this.$message.error('璇烽�夋嫨涓�涓灦鏋勫眰绾�') + } + }, + // 浜哄憳鍒楄〃缂栬緫 + updatePerson(row) { + const node = this.findNodeById(this.list, row.name); + if (node) { + this.handleNodeClick(node); + } else { + this.$message.warning('鏈壘鍒拌浜哄憳'); + } + }, + // 鏂板缓浜哄憳鍚庡埛鏂版爲 + refreshTree () { + this.geList() + }, + findNodeById(treeData, name) { + for (let i = 0; i < treeData.length; i++) { + if (treeData[i].name === name) { + return treeData[i]; // 鎵惧埌鑺傜偣锛岃繑鍥炶鑺傜偣 + } + if (treeData[i].children && treeData[i].children.length > 0) { + const foundNode = this.findNodeById(treeData[i].children, name); + if (foundNode) { + return foundNode; // 鍦ㄥ瓙鑺傜偣涓壘鍒帮紝杩斿洖璇ヨ妭鐐� + } + } + } + return null; // 娌℃湁鎵惧埌鑺傜偣锛岃繑鍥瀗ull + }, + searchFilter() { + this.$refs.tree.filter(this.search); + }, + // 鑾峰彇鏍� + geList() { + this.$axios.get(this.$api.personnel.selectCNSAPersonTree).then(res => { + this.list = res.data; + if(this.list.length > 0) { + this.isDepartment = true; + this.departId = this.list[0].id + } + }); + }, + filterNode(value, data) { + if (!value) return true; + return data.name.indexOf(value) !== -1; + }, + nodeClose(data, node, el) { + $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder'); + }, + nodeOpen(data, node, el) { + $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder-opened'); + }, + handleNodeClick(val, node, el) { + //鏍戠殑鍊� + this.clickNodeVal = val; + // 瀛樺偍鐖剁骇鑺傜偣绾ф暟 + if (node) { + this.getNodeParent(node); + this.clickNodeVal.level = node.level; + this.clickNodeVal.parent = node.parent.data; + } + this.entity.departLimsId = val.id; + this.addOb.fatherId = val.id; + // 鏄惁鏄剧ず璁惧璇︽儏 + this.isShowAll = val.id !== null; + if (val.id) { // 濡傛灉鏄疄楠屽 + this.departId = val.id; + this.isDepartment = true; + } + if (val.userId) { // 鏄汉鍛� + this.departId = val.userId; + this.isDepartment = false + } + }, + getNodeParent(val) { + if (val.parent != null) { + this.currentCompaniesList[val.level - 1] = val.data.id; + this.selectTree += ' - ' + val.label; + this.getNodeParent(val.parent); + } + } + } +}; +</script> + +<style scoped> +.custom-tree-node { + width: 80%; + line-height: 32px; +} +.custom-tree-node .el-icon-delete { + color: #3A7BFA; + opacity: 0; + font-size: 15px; +} + +.custom-tree-node:hover .el-icon-delete { + opacity: 1; +} + +.node_i { + color: orange; + font-size: 18px; +} + +.main { + display: flex; + padding: 15px 0; +} + +.main_left { + background: #ffffff; + text-align: center; + height: calc(100vh - 6.5em); + width: 270px; + border-radius: 15px; +} + +.main_right { + width: calc(100% - 288px); + border-radius: 15px; +} + +.div_left_input { + margin: 15px 0; + width: 90%; +} + +>>> .el-tabs--border-card > .el-tabs__header .el-tabs__item { + border: 0 none; +} + +>>> .el-tabs--border-card > .el-tabs__header .el-tabs__item.is-active { + color: black; +} + +>>> .el-tabs--border-card > .el-tabs__header { + border-bottom: none; +} + +.search { + background-color: #fff; + height: 100%; + display: flex; + justify-content: end; +} + +.search_thing { + width: 350px; + display: flex; + align-items: center; +} + +.search_label { + width: 110px; + font-size: 14px; + text-align: right; +} + +.search_input { + width: calc(100% - 110px); +} +</style> diff --git a/src/components/view/a7-Ensure-results-validity.vue b/src/components/view/a7-Ensure-results-validity.vue index 7297006..2c6ba99 100644 --- a/src/components/view/a7-Ensure-results-validity.vue +++ b/src/components/view/a7-Ensure-results-validity.vue @@ -100,6 +100,15 @@ <el-button :loading="ratifyLoading" type="primary" @click="handleRatify(1)">鎵� 鍑�</el-button> </span> </el-dialog> + <el-dialog :visible.sync="downloadDialog" title="瀵煎嚭" width="600px"> + <span> + <el-button plain type="primary" @click="controlDown">瀹炴柦璁″垝瀵煎嚭</el-button> + <el-button plain type="primary" @click="processingDown">璇勪环瀵煎嚭</el-button> + </span> + <span slot="footer" class="dialog-footer"> + <el-button @click="downloadDialog = false">鍙� 娑�</el-button> + </span> + </el-dialog> </div> </template> @@ -333,6 +342,13 @@ } }, { + name: '瀵煎嚭', + type: 'text', + clickFun: (row) => { + this.downLoadPost(row); + }, + }, + { name: '鍒犻櫎', type: 'text', color: '#f56c6c', @@ -361,6 +377,8 @@ examineInfo: {}, ratifyInfo: {}, upLoading: false, + downloadDialog: false, + download: {}, }; }, mounted() { @@ -573,6 +591,11 @@ this.evaluateDialog = false this.getYearDetailPlanList() }, + // 鎵撳紑瀵煎嚭寮规 + downLoadPost (row) { + this.downloadDialog = true + this.download = row + }, // 鎵撳紑骞村害鏄庣粏鏂板銆佷慨鏀瑰脊妗� showDialog (type, row) { this.formDia = true @@ -584,6 +607,32 @@ this.formDia = false this.getYearDetailPlanList() }, + // 鎺у埗鍗曞鍑� + controlDown() { + this.$axios.get(this.$api.qualityMonitor.exportQualityMonitorRatify + '?qualityMonitorDetailsId=' + this.download.qualityMonitorDetailsId, { responseType: "blob" }).then(res => { + this.outLoading = false + this.$message.success('瀵煎嚭鎴愬姛') + const blob = new Blob([res], { type: 'application/msword' }); + const url = URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = url; + link.download = '璐ㄩ噺鐩戞帶瀹炴柦璁″垝.docx'; + link.click(); + }) + }, + // 澶勭悊鍗曞鍑� + processingDown() { + this.$axios.get(this.$api.qualityMonitor.exportQualityMonitorEvaluate + '?qualityMonitorDetailsId=' + this.download.qualityMonitorDetailsId, { responseType: "blob" }).then(res => { + this.outLoading = false + this.$message.success('瀵煎嚭鎴愬姛') + const blob = new Blob([res], { type: 'application/msword' }); + const url = URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = url; + link.download = '璐ㄩ噺鐩戞帶璇勪环.docx'; + link.click(); + }) + }, delYearPlanDetail (row) { this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { confirmButtonText: '纭畾', diff --git a/src/components/view/a7-changes-standard-methods.vue b/src/components/view/a7-changes-standard-methods.vue index ae0ea31..e363c45 100644 --- a/src/components/view/a7-changes-standard-methods.vue +++ b/src/components/view/a7-changes-standard-methods.vue @@ -10,7 +10,8 @@ <div class="search-background"> <span class="search-group"> <span style="width: 120px">鏍囧噯鏂规硶锛�</span> - <el-input size="small" v-model="searchForm.methodName" clearable></el-input> + <!-- <el-input size="small" v-model="searchForm.methodName" clearable></el-input> --> + <el-input v-model="searchForm.methodName" clearable size="small"></el-input> </span> <span class="search-group"> <el-button size="medium" @click="resetSearchForm">閲� 缃�</el-button> @@ -88,6 +89,13 @@ type: 'text', clickFun: (row) => { this.openFormDia('edit', row); + }, + }, + { + name: '瀵煎嚭', + type: 'text', + clickFun: (row) => { + this.downLoadPost(row); }, }, { @@ -177,6 +185,19 @@ this.formDIa = false this.searchList() }, + // 瀵煎嚭 + downLoadPost(row) { + this.$axios.get(this.$api.processMethodVerify.exportMethodVerify + '?methodVerifyId=' + row.methodVerifyId,{responseType: "blob"}).then(res => { + this.outLoading = false + this.$message.success('瀵煎嚭鎴愬姛') + const blob = new Blob([res],{ type: 'application/msword' }); + const url = URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = url; + link.download = '鏍囧噯锛堟柟娉曪級纭璁板綍.docx'; + link.click(); + }) + }, // 鍒嗛〉 handleSizeChange(val) { this.page.size = val; diff --git a/src/components/view/a7-method-verification.vue b/src/components/view/a7-method-verification.vue index a922044..152dd0d 100644 --- a/src/components/view/a7-method-verification.vue +++ b/src/components/view/a7-method-verification.vue @@ -10,7 +10,7 @@ <div class="search-background"> <span class="search-group"> <span style="width: 120px">鏍囧噯鏂规硶锛�</span> - <el-input size="small" v-model="searchForm.methodName" clearable></el-input> + <el-input v-model="searchForm.methodName" clearable size="small"></el-input> </span> <span class="search-group"> <el-button size="medium" @click="resetSearchForm">閲� 缃�</el-button> @@ -88,6 +88,13 @@ type: 'text', clickFun: (row) => { this.openFormDia('edit', row); + }, + }, + { + name: '瀵煎嚭', + type: 'text', + clickFun: (row) => { + this.downLoadPost(row); }, }, { @@ -172,6 +179,19 @@ this.$refs.formDIa.openDia(row) }) }, + // 瀵煎嚭 + downLoadPost(row) { + this.$axios.get(this.$api.processMethodVerify.exportMethodVerify + '?methodVerifyId=' + row.methodVerifyId,{responseType: "blob"}).then(res => { + this.outLoading = false + this.$message.success('瀵煎嚭鎴愬姛') + const blob = new Blob([res],{ type: 'application/msword' }); + const url = URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = url; + link.download = '鏍囧噯锛堟柟娉曪級纭璁板綍.docx'; + link.click(); + }) + }, // 鍏抽棴寮规 closeDia () { this.formDIa = false diff --git a/src/main.js b/src/main.js index b2a35c8..30cf6af 100644 --- a/src/main.js +++ b/src/main.js @@ -32,7 +32,7 @@ const javaApi = 'https://ztwxlims.ztt.cn:7443/lims/'; //浜� -// Vue.prototype.LOCATIONVUE = "http://114.132.189.42:8080"; +Vue.prototype.LOCATIONVUE = "http://114.132.189.42:8080"; const javaApi = 'http://114.132.189.42:1234'; // //妫�娴嬩腑蹇冩寮忓簱 -- Gitblit v1.9.3