¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * @FileDescription: controller.js太乱ï¼è¿ä¸ªæ¯æ£å¸¸æ ¼å¼çapiï¼å°æ¥ç¨äºæ¿æ¢controller |
| | | * @Author: æ¹ç¿ |
| | | * @Date: 2024/09/30 |
| | | * @LastEditors: æ¹ç¿ |
| | | * @LastEditTime: 2024/09/30 |
| | | */ |
| | | |
| | | // 6.2人å |
| | | // 年度计åå表 |
| | | export const yearPlanListApi = '/superVisePlan/yearPlanList' |
| | | |
| | | // 年度计åæç» |
| | | export const yearDetailPlanListApi = '/superVisePlan/yearPlanDetailList' |
| | | |
| | | // æ°å¢æç» |
| | | export const yearPlanDetailAdd = '/superVisePlan/yearPlanDetailAdd' |
| | | |
| | | // ç¼è¾æç» |
| | | export const yearPlanDetailEdit = '/superVisePlan/yearPlanDetailEdit' |
| | | |
| | | // å é¤å¹´è®¡å |
| | | export const delYearPlanApi = '/superVisePlan/yearPlanDel' |
| | | |
| | | // å é¤å¹´è®¡åæç» |
| | | export const delYearPlanDetailApi = '/superVisePlan/yearPlanDetailDel' |
| | | |
| | | // æ¹å年度计å |
| | | export const yearPlanDetailApprovalApi = '/superVisePlan/yearPlanDetailApproval' |
| | | |
| | | // 人å çç£è®¡åå¯¼åº |
| | | export const exportSuperVisePlanApi = '/superVisePlan/exportSuperVisePlan' |
| | | |
| | | // 人å - 奿©è®°å½ å页æ¥è¯¢ |
| | | export const rewardPunishmentPageApi = '/personRewardPunishmentRecord/rewardPunishmentPage' |
| | | |
| | | // 人å - 奿©è®°å½ æ°å¢/æ´æ° |
| | | export const addOrUpdateRewardPunishmentApi = '/personRewardPunishmentRecord/addOrUpdateRewardPunishment' |
| | | |
| | | // 人å - 奿©è®°å½ å é¤ |
| | | export const deleteRewardPunishmentApi = '/personRewardPunishmentRecord/deleteRewardPunishment' |
| | | |
| | | /** |
| | | * @desc çç£è®°å½ |
| | | */ |
| | | // æ¥è¯¢ |
| | | export const personSupervisionRecordPage = '/personSupervisionRecord/personSupervisionRecordPage' |
| | | // æ°å¢-ç¼è¾ çç£è®°å½ |
| | | export const addOrUpdatePersonSupervisionRecord = '/personSupervisionRecord/addOrUpdatePersonSupervisionRecord' |
| | | // å é¤ çç£è®°å½ |
| | | export const deletePersonSupervisionRecord = '/personSupervisionRecord/deletePersonSupervisionRecord' |
| | | // æ¥è¯¢ æ§å¶å |
| | | export const personSupervisionControlSheetPage = '/personSupervisionRecord/personSupervisionControlSheetPage' |
| | | // æ°å¢-ç¼è¾ æ§å¶å |
| | | export const addOrUpdatePersonSupervisionControl = '/personSupervisionRecord/addOrUpdatePersonSupervisionControl' |
| | | // æ¥è¯¢ å¤çå |
| | | export const personSupervisionProcessingPage = '/personSupervisionRecord/personSupervisionProcessingPage' |
| | | // æ°å¢-ç¼è¾ å¤çå |
| | | export const addOrUpdatePersonnelServiceProcessing = '/personSupervisionRecord/addOrUpdatePersonnelServiceProcessing' |
| | | // æ§å¶åå¯¼åº |
| | | export const exportSupervisionControlSheet = '/personSupervisionRecord/exportSupervisionControlSheet' |
| | | // å¤çåå¯¼åº |
| | | export const exportSupervisionProcessingSheet = '/personSupervisionRecord/exportSupervisionProcessingSheet' |
| | | // çç£è®°å½å¯¼åº |
| | | export const exportPersonSupervisionRecord = '/personSupervisionRecord/exportPersonSupervisionRecord' |
| | | |
| | | /** |
| | | * @desc æ²éè®°å½ |
| | | */ |
| | | // æ¥è¯¢æ²é |
| | | export const personPersonCommunicationAbilityPage = '/personCommunicationAbility/personPersonCommunicationAbilityPage' |
| | | // æ°å¢-ç¼è¾ |
| | | export const addOrUpdatePersonCommunicationAbility = '/personCommunicationAbility/addOrUpdatePersonCommunicationAbility' |
| | | // å é¤ |
| | | export const deletePersonCommunicationAbility = '/personCommunicationAbility/deletePersonCommunicationAbility' |
| | | |
| | | /** |
| | | * @desc ä»»èææè®°å½ |
| | | */ |
| | | // æ¥è¯¢è¡¨æ ¼ |
| | | export const getPersonPostAuthorizationRecordPage = '/personPostAuthorizationRecord/PersonPostAuthorizationRecordPage' |
| | | // æ°å¢ |
| | | export const addOrUpdatePersonPostAuthorizationRecord = '/personPostAuthorizationRecord/addOrUpdatePersonPostAuthorizationRecord' |
| | | // ä¸ä¼ æä»¶ |
| | | export const saveCNASFile = '/personBasicInfo/saveCNASFile' |
| | | // 人åå表 |
| | | export const getUserListApi = '/deviceScope/selectUserList' |
| | | // å é¤ |
| | | export const deletePersonPostAuthorizationRecord = '/personPostAuthorizationRecord/deletePersonPostAuthorizationRecord' |
| | | |
| | | /** |
| | | * @desc çç£è®¡å |
| | | */ |
| | | // 导å
¥å¹´åº¦è®¡å |
| | | export const yearPlanDetailImport = '/superVisePlan/yearPlanDetailImport' |
| | | |
| | | /** |
| | | * @desc ä¾åºå管ç |
| | | */ |
| | | // ä¾åºæ |
| | | export const suppliersDirectoryContentsSuppliersDirectoryContentsListing = '/suppliersDirectoryContents/suppliersDirectoryContentsListing' |
| | | // æ°å¢èç¹ |
| | | export const suppliersDirectoryContentsAddSuppliersDirectoryContents = '/suppliersDirectoryContents/addSuppliersDirectoryContents' |
| | | // ç¼è¾èç¹ |
| | | export const suppliersDirectoryContentsUpdateSuppliersDirectoryContents = '/suppliersDirectoryContents/updateSuppliersDirectoryContents' |
| | | // å é¤èç¹ |
| | | export const suppliersDirectoryContentsDeleteSuppliersDirectoryContentsById = '/suppliersDirectoryContents/deleteSuppliersDirectoryContentsById' |
| | | // æ¥è¯¢ææèç¹ |
| | | export const suppliersDirectoryContentsGetSuppliersDirectoryContentsNodeNames = '/suppliersDirectoryContents/getSuppliersDirectoryContentsNodeNames' |
| | | // å页æ¥è¯¢åæ ¼ä¾æ¹å |
| | | export const selectQualifiedSupplierManagementPage = '/supplierManagement/selectQualifiedSupplierManagementPage' |
| | | // å页æ¥è¯¢ä¾æ¹åå½ |
| | | export const selectSupplierManagementPage = '/supplierManagement/selectSupplierManagementByParentId' |
| | | // æ°å¢ä¾åºå |
| | | export const addSupplierManagement = '/supplierManagement/addSupplierManagement' |
| | | // ç¼è¾ä¾åºå |
| | | export const updateSupplierManagement = '/supplierManagement/updateSupplierManagement' |
| | | // å é¤ä¾åºå |
| | | export const delSupplierManagement = '/supplierManagement/delSupplierManagement' |
| | | |
| | | // 导åºä¾åºå |
| | | export const exportSupplierManagement = '/supplierManagement/exportSupplierManagement' |
| | | |
| | | export const selectSupplierManagementAll = '/supplierManagement/selectSupplierManagementAll' |
| | | /** |
| | | * @desc æå¡åä¾åºåéè´ |
| | | */ |
| | | export const procurementSuppliesList = '/procurementSuppliesList/procurementSuppliesList' |
| | | export const addProcurementSuppliesList = '/procurementSuppliesList/addProcurementSuppliesList' |
| | | export const updateProcurementSuppliesList = '/procurementSuppliesList/updateProcurementSuppliesList' |
| | | export const deleteProcurementSuppliesList = '/procurementSuppliesList/deleteProcurementSuppliesList' |
| | | |
| | | /** |
| | | * @desc æ åç©è´¨æ¸
å |
| | | */ |
| | | export const getStandardSubstanceAll = '/feStandardSubstance/getStandardSubstanceAll'; |
| | | |
| | | /** |
| | | * @desc æ åç©è´¨éªæ¶ |
| | | */ |
| | | // æ¥è¯¢ |
| | | export const getPageAcceptance = '/feStandardSubstanceAcceptance/getPageAcceptance'; |
| | | // æ¥è¯¦æ
|
| | | export const getAcceptanceDetails = '/feStandardSubstanceAcceptance/getAcceptanceDetails' |
| | | // æ°å¢ |
| | | export const addAcceptance = '/feStandardSubstanceAcceptance/addAcceptance'; |
| | | // ç¼è¾ |
| | | export const updateAcceptance = '/feStandardSubstanceAcceptance/updateAcceptance'; |
| | | // å¯¼åº |
| | | export const exportAcceptance = '/feStandardSubstanceAcceptance/exportFeStandardSubstanceAcceptance'; |
| | | /** |
| | | * @desc æå¡åä¾åºåèææ¶è |
| | | */ |
| | | export const procurementSuppliesExpendsList = '/procurementSuppliesExpends/procurementSuppliesExpendlist' |
| | | export const addProcurementSuppliesExpends = '/procurementSuppliesExpends/addProcurementSuppliesExpends' |
| | | export const deleteProcurementSuppliesExpends = '/procurementSuppliesExpends/deleteProcurementSuppliesExpends' |
| | | // èæå表excel |
| | | export const procurementSuppliesListExport = '/procurementSuppliesList/exportProcurementSuppliesList' |
| | | // èæå
¥åºå¯¼åºexcel |
| | | export const procurementSuppliesStoreExportExcel = 'procurementSuppliesStore/exportExcel' |
| | | |
| | |
| | | processSample, |
| | | processTotaldeal, |
| | | processEvaluate, |
| | | qualityMonitor, |
| | | } |
| | | } |
| | | |
| | |
| | | delProcessEvaluate:'/processEvaluate/delProcessEvaluate',//å é¤ ä¼ åid |
| | | exportProcessEvaluate:'/processEvaluate/exportProcessEvaluate',//å¯¼åº |
| | | } |
| | | |
| | | // 7.7è´¨éçæ§è®¡å |
| | | const qualityMonitor = { |
| | | pageQualityMonitor:'/qualityMonitor/pageQualityMonitor', // çæ§å¹´åº¦è®¡åå表 |
| | | pageQualityMonitorDetail:'/qualityMonitor/pageQualityMonitorDetail', // çæ§è®¡å详æ
å表 |
| | | addQualityMonitorDetail:'/qualityMonitor/addQualityMonitorDetail', // æ°å¢çæ§è®¡å详æ
|
| | | updateQualityMonitorDetail:'/qualityMonitor/updateQualityMonitorDetail', // ä¿®æ¹çæ§è®¡å详æ
|
| | | delQualityMonitorDetail:'/qualityMonitor/delQualityMonitorDetail', // å é¤çæ§è®¡å详æ
|
| | | getQualityMonitorRatify:'/qualityMonitor/getQualityMonitorRatify', // æ¥è¯¢çæ§è®¡å详æ
宿½ä¿¡æ¯ |
| | | addQualityMonitorRatify:'/qualityMonitor/addQualityMonitorRatify', // æ°å¢çæ§è®¡å详æ
宿½ä¿¡æ¯ |
| | | addQualityMonitorRatifyOpinion:'/qualityMonitor/addQualityMonitorRatifyOpinion', // æäº¤çæ§è®¡å详æ
æ¹åæè§ |
| | | getQualityMonitorEvaluate:'/qualityMonitor/getQualityMonitorEvaluate', // æ¥è¯¢çæ§è¯ä»· |
| | | addQualityMonitorEvaluate:'/qualityMonitor/addQualityMonitorEvaluate', // æ°å¢çæ§è¯ä»· |
| | | addMonitorEvaluateOpinion:'/qualityMonitor/addMonitorEvaluateOpinion', // æ°å¢çæ§è¯ä»·æ¹å |
| | | getEvaluateFileList:'/qualityMonitor/getEvaluateFileList', // æ¥è¯¢çæ§è¯ä»·éä»¶å表 |
| | | delVerifyEvaluateFileList:'/qualityMonitor/delVerifyEvaluateFileList', // å é¤çæ§è¯ä»·éä»¶å表 |
| | | uploadEvaluateFile:'/qualityMonitor/uploadEvaluateFile', // æ°å¢çæ§è¯ä»·é件表 |
| | | examineQualityMonitor:'/qualityMonitor/examineQualityMonitor', // çæ§è®¡åå®¡æ ¸ |
| | | ratifyQualityMonitor:'/qualityMonitor/ratifyQualityMonitor', // çæ§è®¡åæ¹å |
| | | delQualitySupervise:'/qualityMonitor/delQualitySupervise', // çæ§è®¡åæ¹å |
| | | importQualityMonitor:'/qualityMonitor/importQualityMonitor', // 导å
¥çæ§è®¡å |
| | | exportQualityMonitorDetail:'/qualityMonitor/exportQualityMonitorDetail', // 导åºçæ§è®¡å |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="add"> |
| | | <el-dialog |
| | | :title="isEdit ?'ç¼è¾éä»¶èµæ':'æ°å¢éä»¶èµæ'" |
| | | :visible.sync="dialogVisible" |
| | | width="40%" |
| | | > |
| | | <el-form |
| | | :model="form" |
| | | label-width="80px" |
| | | size="small" |
| | | > |
| | | <el-form-item label="æ²é人"> |
| | | <el-select |
| | | v-model="form.userId" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" multiple |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ²éæ¶é´"> |
| | | <el-date-picker |
| | | v-model="form.communicationTime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="è¯·éæ©æ¥ææ¶é´" |
| | | style="width: 100%" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item > |
| | | <el-form-item label="æ²éå°ç¹"> |
| | | <el-input v-model="form.communicationPlace" placeholder="è¯·éæ©"></el-input> |
| | | </el-form-item > |
| | | <el-form-item label="æ²éå
容"> |
| | | <el-input v-model="form.communicationContent" placeholder="è¯·éæ©"></el-input> |
| | | </el-form-item > |
| | | </el-form> |
| | | <div slot="footer" class="foot"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" :loading="loading" @click="submitForm">ç¡® å®</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { |
| | | getUserListApi, |
| | | addOrUpdatePersonCommunicationAbility, |
| | | } from "../../../../../assets/api/api" |
| | | export default { |
| | | data() { |
| | | return { |
| | | isEdit: false, |
| | | dialogVisible: false, |
| | | form: { |
| | | id: undefined, |
| | | userId: [], |
| | | communicationTime: undefined, |
| | | communicationPlace: undefined, |
| | | communicationContent: undefined |
| | | }, |
| | | loading: false, |
| | | userList: [] |
| | | } |
| | | }, |
| | | methods: { |
| | | /** |
| | | * @desc æ¾ç¤ºæ¨¡ææ¡ |
| | | * @param {*} row |
| | | * @param {*} type |
| | | */ |
| | | openDialog(row, type) { |
| | | this.getUserList() |
| | | this.dialogVisible = true |
| | | if(type) { |
| | | this.isEdit = true |
| | | this.form.id = row.id |
| | | this.form.userId = row.userId.split(',').map(m=>Number(m)) |
| | | this.form.communicationTime = row.communicationTime |
| | | this.form.communicationPlace = row.communicationPlace |
| | | this.form.communicationContent = row.communicationContent |
| | | } else { |
| | | this.isEdit = false |
| | | this.form.id = undefined |
| | | this.form.userId = [] |
| | | this.form.communicationTime = undefined |
| | | this.form.communicationPlace = undefined |
| | | this.form.communicationContent = undefined |
| | | } |
| | | }, |
| | | /** |
| | | * @desc è·åç¨æ·ä¿¡æ¯ |
| | | */ |
| | | async getUserList() { |
| | | const { code, data } = await this.$axios({ |
| | | method: 'get', |
| | | url: getUserListApi, |
| | | }) |
| | | if(code == 200) { |
| | | this.userList = data |
| | | } |
| | | }, |
| | | /** |
| | | * @desc æäº¤è¡¨å |
| | | */ |
| | | async submitForm() { |
| | | this.loading = true |
| | | const { code, data } = await this.$axios({ |
| | | method: 'post', |
| | | url: addOrUpdatePersonCommunicationAbility, |
| | | data: { |
| | | id: this.form.id, |
| | | userId: this.form.userId.join(','), |
| | | communicationTime: this.form.communicationTime, |
| | | communicationPlace: this.form.communicationPlace, |
| | | communicationContent: this.form.communicationContent, |
| | | }, |
| | | noQs: true |
| | | }) |
| | | if(code == 200) { |
| | | this.$emit('submit') |
| | | this.dialogVisible = false |
| | | } else { |
| | | this.$message.error(this.isEdit ? 'ç¼è¾å¤±è´¥':'æ°å¢å¤±è´¥') |
| | | } |
| | | this.loading = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .foot { |
| | | width: 100%; |
| | | } |
| | | .add >>> .el-dialog__footer { |
| | | padding-right: 20px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="flex_column"> |
| | | <TableCard title="æ²éè®°å½" :showForm="isDepartment"> |
| | | <template v-slot:form > |
| | | <div class="w100 items_center justify_between" v-if="isDepartment"> |
| | | <div></div> |
| | | <div> |
| | | <!-- <el-button type="primary" size="small">导åº</el-button> --> |
| | | <el-button type="primary" size="small" @click="openDialog">æ°å¢</el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <ZTTable |
| | | style="margin-top: 18px; padding: 0 15px;" |
| | | :height="'calc(100vh - 21em)'" |
| | | :column="columnData" |
| | | :table-data="tableData" |
| | | :table-loading="loading" |
| | | ></ZTTable> |
| | | <el-divider></el-divider> |
| | | <div class="pagination"> |
| | | <div></div> |
| | | <el-pagination |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :page-size="pagination.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="pagination.total" |
| | | @current-change="" |
| | | @size-change="" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </template> |
| | | </TableCard> |
| | | <Add ref="communicateModal" @submit="getTableData"></Add> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import TableCard from "../../../TableCard/index.vue" |
| | | import ZTTable from "../../../ZTTable/index.vue" |
| | | import Add from "./Add.vue" |
| | | import { |
| | | personPersonCommunicationAbilityPage, |
| | | deletePersonCommunicationAbility, |
| | | exportPersonCommunicationAbility |
| | | } from "../../../../../assets/api/api.js" |
| | | |
| | | export default { |
| | | components: { |
| | | TableCard, |
| | | ZTTable, |
| | | Add |
| | | }, |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | // departId: 0, |
| | | columnData: [ |
| | | { |
| | | label: 'åºå·', |
| | | prop: 'id' |
| | | }, { |
| | | label: 'æ²é人', |
| | | prop: 'userName' |
| | | }, { |
| | | label: 'æ²éæ¶é´', |
| | | prop: 'communicationTime' |
| | | }, { |
| | | label: 'æ²éå°ç¹', |
| | | prop: 'communicationPlace' |
| | | }, { |
| | | label: 'æ²éå
容', |
| | | prop: 'communicationContent' |
| | | }, { |
| | | label: 'æä½', |
| | | dataType: 'action', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openDialog(row, true) |
| | | } |
| | | }, { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPerson(row.id) |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | | ], |
| | | tableData: [], |
| | | pagination: { |
| | | current: 1, |
| | | pageSize: 20, |
| | | total: 0 |
| | | }, |
| | | loading: false |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getTableData() |
| | | }, |
| | | methods: { |
| | | openDialog(row, type=false) { |
| | | this.$refs.communicateModal.openDialog(row, type) |
| | | }, |
| | | async getTableData() { |
| | | this.loading = true |
| | | const params = this.isDepartment ? { |
| | | departLimsId: this.departId, |
| | | current: this.pagination.current, |
| | | size: this.pagination.pageSize |
| | | } : { |
| | | userId: this.departId, |
| | | current: this.pagination.current, |
| | | size: this.pagination.pageSize |
| | | } |
| | | const { code, data } = await this.$axios({ |
| | | method: 'get', |
| | | url: personPersonCommunicationAbilityPage, |
| | | params: params |
| | | }) |
| | | if(code == 200) { |
| | | this.pagination.total = data.total |
| | | this.tableData = data.records |
| | | this.loading = false |
| | | } |
| | | }, |
| | | /** |
| | | * @desc è·å设å¤id |
| | | */ |
| | | getDepart(id) { |
| | | this.departId = id |
| | | this.getTableData() |
| | | }, |
| | | /** |
| | | * @desc å 餿²éè®°å½ |
| | | */ |
| | | delPerson(id) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | let formData = new FormData() |
| | | formData.append('id', id) |
| | | const { code } = await this.$axios({ |
| | | method: 'delete', |
| | | url: deletePersonCommunicationAbility, |
| | | data: formData |
| | | }) |
| | | if(code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'å 餿å!' |
| | | }); |
| | | this.getTableData() |
| | | } |
| | | }) |
| | | }, |
| | | async handleDown(row){ |
| | | this.$axios.post(this.$api.personCommunicationAbility.exportPersonCommunicationAbility,{id:row.id},{responseType: "blob"}).then(res => { |
| | | if(res.code == 201){ |
| | | this.$message.error(res.message) |
| | | 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 = row.userName+'-æ²éè®°å½'+'.docx'; |
| | | link.click(); |
| | | }) |
| | | } |
| | | }, |
| | | watch: { |
| | | departId: { |
| | | handler(newId, oldId) { |
| | | if (newId) { |
| | | this.getTableData(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .flex_column { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | } |
| | | .w100 { |
| | | width: 100%; |
| | | } |
| | | .pagination { |
| | | display: flex; |
| | | justify-content: space-between |
| | | } |
| | | .items_center { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .justify_between { |
| | | justify-content: space-between |
| | | } |
| | | .date_box { |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | .search { |
| | | width: 150px; |
| | | padding: 0 16px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="add"> |
| | | <el-dialog |
| | | :title="isEdit ?'ç¼è¾éä»¶èµæ':'æ°å¢éä»¶èµæ'" |
| | | :visible.sync="dialogVisible" |
| | | width="50%" |
| | | > |
| | | <el-form |
| | | ref="ruleForm" |
| | | :rules="rules" |
| | | :model="form" |
| | | label-width="100px" |
| | | size="medium" |
| | | > |
| | | <el-form-item label="è¯ä¹¦ç¼å·" prop="certificateNumber"> |
| | | <el-input v-model="form.certificateNumber" placeholder="请è¾å
¥" style="width: 100%"> |
| | | </el-input> |
| | | </el-form-item > |
| | | <el-form-item label="被任è人å" prop="userId"> |
| | | <el-select v-model="form.userId" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item > |
| | | <el-form-item label="ä»»èå²ä½" prop="post"> |
| | | <el-input v-model="form.post" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item > |
| | | <el-form-item label="ç论èè¯æç»©" prop="num1"> |
| | | <el-input v-model="form.num1" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item > |
| | | <el-form-item label="æä½æè½èè¯æç»©" prop="num2"> |
| | | <el-input v-model="form.num2" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item > |
| | | <el-form-item label="æä½ç±»å" prop="operationType"> |
| | | <el-input v-model="form.operationType" placeholder="è¯·éæ©"></el-input> |
| | | </el-form-item > |
| | | <el-row> |
| | | <el-col :span="20"> |
| | | <el-form-item label="ä¸å²è¯ä¹¦"> |
| | | <el-input v-model="form.systemFileName" size="small" disabled> |
| | | <el-button slot="append" icon="el-icon-delete-solid" |
| | | @click="deleteFile(form.systemFileName)"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-upload ref="upload" style="float: left; margin: 0 12px 0 20px;" :action="action" |
| | | :show-file-list="false" |
| | | :on-success="onSuccess"> |
| | | <el-button class="uploadFile" slot="trigger" size="small" type="primary">æµè§</el-button> |
| | | </el-upload> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- <el-form-item label="æä»¶">--> |
| | | <!-- <el-upload--> |
| | | <!-- ref="upload"--> |
| | | <!-- action="#"--> |
| | | <!-- :before-upload="beforeUpload"--> |
| | | <!-- :http-request="uploadFile"--> |
| | | <!-- :file-list="form.fileList"--> |
| | | <!-- :limit="1"--> |
| | | <!-- :auto-upload="false"--> |
| | | <!-- >--> |
| | | <!-- <el-button type="primary" plain>--> |
| | | <!-- <i class="el-icon-upload el-icon--right"></i>--> |
| | | <!-- ä¸ä¼ æä»¶--> |
| | | <!-- </el-button>--> |
| | | <!-- </el-upload>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="夿³¨"> |
| | | <el-input v-model="form.remarks" placeholder="è¯·éæ©"></el-input> |
| | | </el-form-item > |
| | | </el-form> |
| | | <div slot="footer" class="foot"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" :loading="loading" @click="submitForm">ç¡® å®</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { |
| | | addOrUpdatePersonPostAuthorizationRecord, |
| | | saveCNASFile, |
| | | getUserListApi |
| | | } from "../../../../../assets/api/api" |
| | | export default { |
| | | data() { |
| | | return { |
| | | isEdit: false, |
| | | dialogVisible: false, |
| | | form: { |
| | | id: undefined, |
| | | certificateNumber: undefined, |
| | | userId: undefined, |
| | | post: undefined, |
| | | operationType: undefined, |
| | | fileList: [], |
| | | fileName: undefined, |
| | | systemFileName: undefined, |
| | | remarks: undefined, |
| | | num2:undefined, |
| | | num1:undefined |
| | | }, |
| | | rules: { |
| | | certificateNumber: [{ required: true, message: '请è¾å
¥è¯ä¹¦ç¼å·', trigger: 'blur' }], |
| | | userId: [{ required: true, message: 'è¯·éæ©è¢«ä»»è人å', trigger: 'change' }], |
| | | post: [{ required: true, message: 'ä»»èå²ä½', trigger: 'blur' }], |
| | | operationType: [{ required: true, message: 'æä½ç±»å', trigger: 'blur' }], |
| | | |
| | | }, |
| | | loading: false, |
| | | userList: [] |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + this.$api.personnel.saveCNASFile |
| | | } |
| | | }, |
| | | methods: { |
| | | async onSuccess(response, file, fileList) { |
| | | this.$set(this.form, "systemFileName", response.data) |
| | | }, |
| | | async deleteFile(fileName) { |
| | | await this.$axios.delete(this.$api.personnel.deleteCNASFile + "?fileName=" + fileName).then(res => { |
| | | this.$message.success('å 餿åï¼') |
| | | this.$set(this.form, "systemFileName", null) |
| | | }) |
| | | }, |
| | | async openDialog(row, type) { |
| | | await this.getUserList() |
| | | this.dialogVisible = true |
| | | if(type) { |
| | | this.isEdit = true |
| | | this.form.id = row.id |
| | | this.form.certificateNumber = row.certificateNumber |
| | | this.form.userId = Number(row.userId) |
| | | this.form.post = row.post |
| | | this.form.operationType = row.operationType |
| | | this.form.systemFileName = row.systemFileName |
| | | this.form.remarks = row.remarks |
| | | this.form.num1 = row.num1 |
| | | this.form.num2 = row.num2 |
| | | } else { |
| | | this.isEdit = false |
| | | this.form.id = undefined |
| | | this.form.certificateNumber = undefined |
| | | this.form.userId = undefined |
| | | this.form.post = undefined |
| | | this.form.operationType = undefined |
| | | this.form.fileList = [] |
| | | this.form.fileName = undefined |
| | | this.form.systemFileName = undefined |
| | | this.form.remarks = undefined |
| | | this.form.num1 = undefined |
| | | this.form.num2 = undefined |
| | | } |
| | | }, |
| | | closeDialog() { |
| | | this.dialogVisible = false |
| | | }, |
| | | /** |
| | | * @desc è·åç¨æ·ä¿¡æ¯ |
| | | */ |
| | | async getUserList() { |
| | | const { code, data } = await this.$axios({ |
| | | method: 'get', |
| | | url: getUserListApi, |
| | | }) |
| | | if(code == 200) { |
| | | this.userList = data |
| | | } |
| | | }, |
| | | /** |
| | | * @desc æäº¤è¡¨å |
| | | */ |
| | | submitForm() { |
| | | this.$refs.ruleForm.validate(async (valid) => { |
| | | if(valid) { |
| | | await this.submitFormData() |
| | | } |
| | | }) |
| | | }, |
| | | /** |
| | | * @desc ä¸ä¼ æä»¶ |
| | | */ |
| | | async uploadFile() { |
| | | console.log('æä»¶', this.form.fileList[0]) |
| | | let formData = new FormData() |
| | | formData.append('file', this.form.fileList[0]) |
| | | const { code, data } = await this.$axios({ |
| | | method: 'post', |
| | | url: saveCNASFile, |
| | | data: formData, |
| | | headers: { |
| | | 'Content-Type': 'multipart/form-data;' |
| | | }, |
| | | noQs: true |
| | | }) |
| | | if(code == 200) { |
| | | this.form.systemFileName = data |
| | | } |
| | | }, |
| | | /** |
| | | * @desc ä¸ä¼ æä»¶ |
| | | */ |
| | | beforeUpload(file) { |
| | | this.form.fileList = [file] |
| | | this.form.fileName = file.name |
| | | }, |
| | | /** |
| | | * @desc æäº¤form表å |
| | | */ |
| | | async submitFormData() { |
| | | this.loading = true |
| | | const { code, data } = await this.$axios({ |
| | | method: 'post', |
| | | url: addOrUpdatePersonPostAuthorizationRecord, |
| | | data: { |
| | | id: this.form.id, |
| | | certificateNumber: this.form.certificateNumber, |
| | | userId: this.form.userId, |
| | | post: this.form.post, |
| | | operationType: this.form.operationType, |
| | | systemFileName: this.form.systemFileName, |
| | | remarks: this.form.remarks, |
| | | num1: this.form.num1, |
| | | num2: this.form.num2 |
| | | }, |
| | | noQs: true |
| | | }) |
| | | if(code == 200) { |
| | | this.closeDialog() |
| | | this.$emit('refresh') |
| | | } |
| | | this.loading = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .foot { |
| | | width: 100%; |
| | | } |
| | | .add >>> .el-dialog__footer { |
| | | padding-right: 20px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="flex_column"> |
| | | <TableCard title="ä»»èææè®°å½" :showForm="isDepartment"> |
| | | <template v-slot:form> |
| | | <div class="w100 items_center justify_between" v-if="isDepartment"> |
| | | <div></div> |
| | | <div> |
| | | <el-button type="primary" size="small" @click="openDialog">æ°å¢</el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <ZTTable |
| | | style="margin-top: 18px; padding: 0 15px;" |
| | | :height="'calc(100vh - 21em)'" |
| | | :column="columnData" |
| | | :table-data="tableData" |
| | | :table-loading="loading" |
| | | ></ZTTable> |
| | | <el-divider></el-divider> |
| | | <div class="pagination"> |
| | | <div></div> |
| | | <el-pagination |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :page-size="pagination.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="pagination.total" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </template> |
| | | </TableCard> |
| | | <Add ref="mandateModal" @refresh="getTableData"></Add> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import TableCard from "../../../TableCard/index.vue" |
| | | import ZTTable from "../../../ZTTable/index.vue" |
| | | import Add from "./Add.vue" |
| | | import { |
| | | getPersonPostAuthorizationRecordPage, |
| | | deletePersonPostAuthorizationRecord |
| | | } from "../../../../../assets/api/api" |
| | | import { nextTick } from "vue"; |
| | | |
| | | export default { |
| | | components: { |
| | | TableCard, |
| | | ZTTable, |
| | | Add |
| | | }, |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | // departId: 0, |
| | | columnData: [ |
| | | { |
| | | label: 'åºå·', |
| | | prop: 'id' |
| | | }, { |
| | | label: 'è¯ä¹¦ç¼å·', |
| | | prop: 'certificateNumber' |
| | | }, { |
| | | label: '被任è人å', |
| | | prop: 'userName' |
| | | }, { |
| | | label: 'ä»»èå²ä½', |
| | | prop: 'post' |
| | | }, { |
| | | label: 'ç论èè¯æç»©', |
| | | prop: 'num1' |
| | | },{ |
| | | label: 'æä½æè½èè¯æç»©', |
| | | prop: 'num2' |
| | | },{ |
| | | label: 'æä½æ¶é´', |
| | | prop: 'updateTime' |
| | | }, { |
| | | label: '夿³¨', |
| | | prop: 'remarks', |
| | | width: 300 |
| | | }, { |
| | | label: 'æä½', |
| | | dataType: 'action', |
| | | width: 160, |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openDialog(row, true) |
| | | } |
| | | }, { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.deleteNotify(row.id) |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | | ], |
| | | tableData: [], |
| | | pagination: { |
| | | current: 1, |
| | | pageSize: 20, |
| | | total: 0 |
| | | }, |
| | | loading: false |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getTableData() |
| | | console.log(this.departId) |
| | | }, |
| | | methods: { |
| | | openDialog(row, type=false) { |
| | | this.$refs.mandateModal.openDialog(row, type) |
| | | }, |
| | | /** |
| | | * @desc æ¥è¯¢è¡¨æ ¼æ°æ® |
| | | */ |
| | | async getTableData() { |
| | | this.loading = true |
| | | await nextTick() |
| | | const params = this.isDepartment ? { |
| | | departLimsId: this.departId, |
| | | current: this.pagination.current, |
| | | size: this.pagination.pageSize |
| | | } : { |
| | | userId: this.departId, |
| | | current: this.pagination.current, |
| | | size: this.pagination.pageSize |
| | | } |
| | | const { code, data } = await this.$axios({ |
| | | method: 'get', |
| | | url: getPersonPostAuthorizationRecordPage, |
| | | params: params |
| | | }) |
| | | if(code == 200) { |
| | | this.pagination.total = data.total |
| | | this.tableData = data.records |
| | | this.loading = false |
| | | } |
| | | }, |
| | | /** |
| | | * @desc å½å页æ¹å |
| | | */ |
| | | currentChange(current) { |
| | | this.pagination.current = current |
| | | this.getTableData() |
| | | }, |
| | | /** |
| | | * @desc æ¯é¡µä¸ªæ°æ¹å |
| | | */ |
| | | sizeChange(pageSize) { |
| | | this.pagination.pageSize = pageSize |
| | | this.getTableData() |
| | | }, |
| | | /** |
| | | * @desc å é¤ä»»èè®°å½ |
| | | */ |
| | | deleteNotify(id) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.delMandate(id) |
| | | }) |
| | | }, |
| | | /** |
| | | * @desc apiå é¤ |
| | | */ |
| | | async delMandate(id) { |
| | | const formData = new FormData() |
| | | formData.append('id', id) |
| | | const { code, data } = await this.$axios({ |
| | | method: 'delete', |
| | | url: deletePersonPostAuthorizationRecord, |
| | | data: formData, |
| | | noQs: true |
| | | }) |
| | | if(code == 200) { |
| | | this.$message({ message: 'å 餿å', type: 'success' }) |
| | | this.getTableData() |
| | | } else { |
| | | this.$message({ message: 'å é¤å¤±è´¥', type: 'error' }) |
| | | } |
| | | }, |
| | | /** |
| | | * @desc è·å设å¤id |
| | | */ |
| | | getDepart(id) { |
| | | this.departId = id |
| | | this.getTableData() |
| | | }, |
| | | handleDown(row){ |
| | | this.$axios.post(this.$api.personPostAuthorizationRecord.exportPersonPostAuthorizationRecord,{id:row.id},{responseType: "blob"}).then(res => { |
| | | if(res.code == 201){ |
| | | this.$message.error(res.message) |
| | | 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 = 'ä»»èææ-'+row.certificateNumber+'-'+row.post + '.docx'; |
| | | link.click(); |
| | | }) |
| | | } |
| | | }, |
| | | // watch: { |
| | | // departId: { |
| | | // handler(newId, oldId) { |
| | | // if (newId) { |
| | | // this.getTableData(); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .flex_column { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | } |
| | | .w100 { |
| | | width: 100%; |
| | | } |
| | | .pagination { |
| | | display: flex; |
| | | justify-content: space-between |
| | | } |
| | | .items_center { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .justify_between { |
| | | justify-content: space-between |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="add"> |
| | | <el-dialog |
| | | :title="isEdit ? 'ç¼è¾çç£è®¡åæç»':'æ°å¢çç£è®¡åæç»'" |
| | | :visible.sync="dialogVisible" |
| | | width="800px" |
| | | > |
| | | <el-form ref="formRef" :model="ruleForm" :rules="rules" label-width="100px"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çç£æ¥æ" prop="superviseDate"> |
| | | <el-date-picker |
| | | v-model="ruleForm.superviseDate" |
| | | format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" |
| | | style="width: 100%;" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çç£ç®ç" prop="superviseDes"> |
| | | <el-input v-model="ruleForm.superviseDes"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çç£é¡¹ç®" prop="superviseProject"> |
| | | <el-input v-model="ruleForm.superviseProject"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="被çç£äºº" prop="supervisePerson"> |
| | | <el-input v-model="ruleForm.supervisePerson"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="çç£åå " prop="superviseReason"> |
| | | <el-input v-model="ruleForm.superviseReason"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨" prop="remarks"> |
| | | <el-input v-model="ruleForm.remarks"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | <div slot="footer" class="foot"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button :loading="loading" type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { yearPlanDetailAdd, yearPlanDetailEdit } from '../../../../../assets/api/api' |
| | | export default { |
| | | props: { |
| | | planId: { |
| | | type: Number, |
| | | default: undefined |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | isEdit: false, |
| | | dialogVisible: false, |
| | | ruleForm: { |
| | | id: undefined, |
| | | superviseDate: undefined, // çç£æ¥æ |
| | | superviseDes: undefined, // çç£ç®ç |
| | | superviseProject: undefined, // çç£é¡¹ç® |
| | | supervisePerson: undefined, // 被çç£äºº |
| | | superviseReason: undefined, // çç£åå |
| | | remarks: undefined, // 夿³¨ |
| | | }, |
| | | rules: { |
| | | superviseDate: [{ required: true, message: 'è¯·éæ©æ¥æ', trigger: 'change' }], |
| | | superviseDes: [{ required: true, message: '请è¾å
¥çç£ç®ç', trigger: 'blur' }], |
| | | superviseProject: [{ required: true, message: '请è¾å
¥çç£é¡¹ç®', trigger: 'blur' }], |
| | | supervisePerson: [{ required: true, message: '请è¾å
¥è¢«çç£äºº', trigger: 'blur' }], |
| | | superviseReason: [{ required: true, message: '请è¾å
¥çç£åå ', trigger: 'blur' }], |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | formatForm(row) { |
| | | this.ruleForm.id = undefined |
| | | this.ruleForm.planId = row.planId |
| | | this.ruleForm.superviseDate = undefined |
| | | this.ruleForm.superviseDes = undefined |
| | | this.ruleForm.superviseProject = undefined |
| | | this.ruleForm.supervisePerson = undefined |
| | | this.ruleForm.superviseReason = undefined |
| | | this.ruleForm.remarks = undefined |
| | | }, |
| | | renderForm(row) { |
| | | this.ruleForm.id = row.id |
| | | this.ruleForm.superviseDate = row.superviseDate |
| | | this.ruleForm.superviseDes = row.superviseDes |
| | | this.ruleForm.superviseProject = row.superviseProject |
| | | this.ruleForm.supervisePerson = row.supervisePerson |
| | | this.ruleForm.superviseReason = row.superviseReason |
| | | this.ruleForm.remarks = row.remarks |
| | | }, |
| | | showDialog(row, type) { |
| | | console.log(row) |
| | | if(type) { |
| | | this.isEdit = true |
| | | this.renderForm(row) |
| | | } else { |
| | | this.formatForm(row) |
| | | this.isEdit = false |
| | | } |
| | | this.dialogVisible = true |
| | | }, |
| | | closeDialog() { |
| | | this.dialogVisible = false |
| | | }, |
| | | async addYearDetail() { |
| | | const { code, data } = await this.$axios({ |
| | | method: 'post', |
| | | url: yearPlanDetailAdd, |
| | | data: this.ruleForm, |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }) |
| | | this.loading = false |
| | | if(code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æ°å¢æå' |
| | | }) |
| | | this.closeDialog() |
| | | this.$emit('submit') |
| | | } else { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'æ°å¢å¤±è´¥' |
| | | }) |
| | | } |
| | | }, |
| | | async editYearDetail() { |
| | | const { code, data } = await this.$axios({ |
| | | method: 'post', |
| | | url: yearPlanDetailEdit, |
| | | data: this.ruleForm, |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }) |
| | | this.loading = false |
| | | if(code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'ç¼è¾æå' |
| | | }) |
| | | this.closeDialog() |
| | | this.$emit('submit') |
| | | } else { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'ç¼è¾å¤±è´¥' |
| | | }) |
| | | } |
| | | }, |
| | | submitForm() { |
| | | this.$refs.formRef.validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true |
| | | if(this.isEdit) { |
| | | this.editYearDetail() |
| | | } else { |
| | | this.addYearDetail() |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .foot { |
| | | width: 100%; |
| | | } |
| | | .add >>> .el-dialog__footer { |
| | | padding-right: 20px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-upload |
| | | ref="upload" |
| | | action="#" |
| | | :before-upload="beforeUpload" |
| | | :http-request="uploadFile" |
| | | :file-list="fileList" |
| | | :on-success="uploadFileSuccess" |
| | | accept=".xls, .xlsx" |
| | | :limit="1" |
| | | :auto-upload="true" |
| | | > |
| | | <el-button size="small" type="primary">导å
¥</el-button> |
| | | </el-upload> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { yearPlanDetailImport } from '../../../../../assets/api/api'; |
| | | export default { |
| | | data() { |
| | | return { |
| | | fileList: [] |
| | | } |
| | | }, |
| | | methods: { |
| | | /** |
| | | * @desc ä¸ä¼ æä»¶ |
| | | */ |
| | | beforeUpload(file) { |
| | | this.fileList = [file] |
| | | }, |
| | | /** |
| | | * @desc ä¸ä¼ è³æå¡å¨ |
| | | */ |
| | | async uploadFile() { |
| | | console.log('æä»¶', this.fileList[0]) |
| | | let formData = new FormData() |
| | | formData.append('file', this.fileList[0]) |
| | | const { code, data } = await this.$axios({ |
| | | method: 'post', |
| | | url: yearPlanDetailImport, |
| | | data: formData, |
| | | headers: { |
| | | 'Content-Type': 'multipart/form-data;' |
| | | }, |
| | | noQs: true |
| | | }) |
| | | if(code == 200) { |
| | | this.$emit('upload') |
| | | } |
| | | }, |
| | | uploadFileSuccess() { |
| | | this.$refs.upload.clearFiles() |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="flex_column"> |
| | | <div> |
| | | <TableCard title="年度计å表"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <span>ç¼å¶äºº</span> |
| | | <el-input v-model="yearForm.organizationPerson" class="search" placeholder="请è¾å
¥" |
| | | size="small"></el-input> |
| | | <el-button size="small" type="primary" @click="getYearPlanList">æ¥è¯¢</el-button> |
| | | <el-button size="small" @click="clearYear">æ¸
空</el-button> |
| | | </div> |
| | | <UploadExcel @upload="getYearPlanList"></UploadExcel> |
| | | </template> |
| | | <template v-slot:table> |
| | | <ZTTable |
| | | ref="yearTable" |
| | | :column="yearColumnData" |
| | | :height="'calc(100vh - 38em)'" |
| | | :highlightCurrentRow="true" |
| | | :rowClick="rowClick" |
| | | :table-data="yearTableData" |
| | | :table-loading="yearLoading" |
| | | style="margin-top: 0.5em; |
| | | padding: 0 15px;" |
| | | > |
| | | </ZTTable> |
| | | <el-divider></el-divider> |
| | | <!-- å页 --> |
| | | <div class="pagination"> |
| | | <div></div> |
| | | <el-pagination :page-size="yearPage.pageSize" :page-sizes="[10, 20, 30, 40]" |
| | | :total="yearPage.total" layout="total, sizes, prev, pager, next, jumper" |
| | | @current-change="handleYearCurrent" @size-change="handleYearSizeChange"> |
| | | </el-pagination> |
| | | </div> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <div style="width: 100%; height: 0.5em; background-color: #f5f7fb;"></div> |
| | | <div> |
| | | <TableCard title="年度计åæç»è¡¨"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <span>çç£æ¥æ</span> |
| | | <el-date-picker v-model="yearDetailForm.date" class="date_box" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="small" type="date" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | <span>çç£é¡¹ç®</span> |
| | | <el-input v-model="yearDetailForm.project" class="search" placeholder="请è¾å
¥" size="small"></el-input> |
| | | <el-button size="small" type="primary" @click="getYearDetailPlanList">æ¥è¯¢</el-button> |
| | | <el-button size="small" @click="clearDetail">æ¸
空</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button v-if="isOperation" size="small" type="primary" @click="showDialog('add')">æ°å¢</el-button> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <ZTTable :column="yearDetailColumnData" :height="'calc(100vh - 38em)'" :table-data="yearDetailTableData" |
| | | :table-loading="yearDetailLoading" style="margin-top: 18px; padding: 0 15px;"> |
| | | </ZTTable> |
| | | <el-divider></el-divider> |
| | | <!-- å页 --> |
| | | <div class="pagination"> |
| | | <div></div> |
| | | <el-pagination :page-size="yearDeatilPage.pageSize" :page-sizes="[10, 20, 30, 40]" |
| | | :total="yearDeatilPage.total" layout="total, sizes, prev, pager, next, jumper" |
| | | @current-change="handleYearDetailCurrent" @size-change="handleYearDetailSizeChange"> |
| | | </el-pagination> |
| | | </div> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <PlanAdd ref="planModal" :planId="planId" @submit="handleForm"></PlanAdd> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import TableCard from "../../../TableCard/index.vue" |
| | | import PlanAdd from "./Add.vue" |
| | | import ZTTable from '../../../ZTTable/index.vue' |
| | | import UploadExcel from "./UploadExcel.vue" |
| | | import { yearPlanListApi, yearDetailPlanListApi, delYearPlanApi, delYearPlanDetailApi, yearPlanDetailApprovalApi, exportSuperVisePlanApi} from "../../../../../assets/api/api" |
| | | |
| | | export default { |
| | | components: { |
| | | TableCard, |
| | | PlanAdd, |
| | | ZTTable, |
| | | UploadExcel |
| | | }, |
| | | data() { |
| | | return { |
| | | planId: undefined, |
| | | yearForm: { |
| | | organizationPerson: undefined, |
| | | }, |
| | | yearTableData: [], // 年表 |
| | | yearPage: { |
| | | curent: 1, |
| | | pageSize: 20, |
| | | total: 0 |
| | | }, |
| | | yearColumnData: [ |
| | | { |
| | | label: 'æä»¶åç§°', |
| | | prop: 'fileName', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: 'ç¼å¶äºº', |
| | | prop: 'organizationPerson', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'ç¼å¶æ¥æ', |
| | | prop: 'organizationDate', |
| | | minWidth: '160' |
| | | }, { |
| | | label: 'æ¹å人', |
| | | prop: 'approvalName', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'æ¹åæ¥æ', |
| | | prop: 'approvalDate', |
| | | minWidth: '160' |
| | | }, { |
| | | label: 'å®¡æ ¸äºº', |
| | | prop: 'examine' |
| | | }, { |
| | | dataType: 'tag', |
| | | label: 'æ¹åç¶æ', |
| | | prop: 'approvalStatus', |
| | | minWidth: '130', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return 'æ¹å' |
| | | } else { |
| | | return '䏿¹å' |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'success' |
| | | } else { |
| | | return 'danger' |
| | | } |
| | | } |
| | | }, { |
| | | label: 'åå»ºæ¥æ', |
| | | prop: 'createTime', |
| | | minWidth: '160' |
| | | }, { |
| | | label: 'å建人', |
| | | prop: 'createName', |
| | | minWidth: '100' |
| | | }, { |
| | | dataType: 'action', |
| | | minWidth: '160', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.downLoadPost(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'æ¹å', |
| | | type: 'text', |
| | | disabled: (row) => { |
| | | if (row.approvalStatus == 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | clickFun: (row) => { |
| | | this.approvalYearPlan(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delYearPlan(row.id) |
| | | } |
| | | } |
| | | ] |
| | | }], |
| | | yearLoading: false, |
| | | yearDetailForm: { |
| | | date: undefined, |
| | | project: undefined |
| | | }, |
| | | yearDetailTableData: [], // å¹´æç»è¡¨ |
| | | yearDeatilPage: { |
| | | curent: 1, |
| | | pageSize: 20, |
| | | total: 0 |
| | | }, |
| | | yearDetailColumnData: [ |
| | | { |
| | | label: 'çç£æ¥æ', |
| | | prop: 'superviseDate' |
| | | }, { |
| | | label: 'çç£ç®ç', |
| | | prop: 'superviseDes' |
| | | }, { |
| | | label: '被çç£äººå', |
| | | prop: 'supervisePerson' |
| | | }, { |
| | | label: '夿³¨', |
| | | prop: 'remarks' |
| | | }, { |
| | | label: 'å¹è®æ¥æ', |
| | | prop: 'trainDate' |
| | | }, { |
| | | label: 'å建', |
| | | prop: 'createBy' |
| | | }, { |
| | | dataType: 'action', |
| | | width: '180', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.$refs.planModal.showDialog(row, true) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delYearPlanDetail(row.id) |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | yearDetailLoading: false, |
| | | isOperation: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getYearPlanList() |
| | | // this.getYearDetailPlanList() |
| | | }, |
| | | methods: { |
| | | /** |
| | | * @desc æ¥è¯¢å¹´åº¦è®¡åå表 |
| | | */ |
| | | async getYearPlanList() { |
| | | this.yearLoading = true |
| | | const { code, data } = await this.$axios({ |
| | | method: 'get', |
| | | url: yearPlanListApi, |
| | | params: { |
| | | current: this.yearPage.curent, |
| | | size: this.yearPage.pageSize, |
| | | organizationPerson: this.yearForm.organizationPerson |
| | | } |
| | | }) |
| | | if (code == 200) { |
| | | this.yearTableData = data.records |
| | | this.yearPage.total = data.total |
| | | if (this.yearTableData.length > 0) { |
| | | this.rowClick(this.yearTableData[0]) |
| | | } |
| | | } |
| | | this.yearLoading = false |
| | | }, |
| | | // 年计åå页 |
| | | handleYearCurrent(page) { |
| | | this.yearPage.curent = page |
| | | this.getYearPlanList() |
| | | }, |
| | | handleYearSizeChange(size) { |
| | | this.yearPage.pageSize = size |
| | | this.getYearPlanList() |
| | | }, |
| | | // 年度计åè¡¨æ ¼ï¼ç¹å»è¡æ°æ®åå·æ°è¯¦æ
|
| | | rowClick(row) { |
| | | const now = new Date(); |
| | | const currentYear = now.getFullYear(); |
| | | if (row.createTime.slice(0,4) == currentYear) { |
| | | this.isOperation = true; |
| | | } else { |
| | | this.isOperation = false; |
| | | } |
| | | this.planId = row.id |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // æ°å¢|ç¼è¾å®æååä»ä¹ |
| | | handleForm() { |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // æ¸
é¤å¹´ |
| | | clearYear() { |
| | | this.$refs.yearTable.setCurrent() |
| | | this.yearForm.organizationPerson = undefined |
| | | this.getYearPlanList() |
| | | }, |
| | | // æ¸
é¤æç» |
| | | clearDetail() { |
| | | this.yearDetailForm.date = undefined |
| | | this.yearDetailForm.project = undefined |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | |
| | | /** |
| | | * @desc æ¥è¯¢å¹´åº¦è®¡åæç» |
| | | */ |
| | | async getYearDetailPlanList() { |
| | | this.yearDetailLoading = true |
| | | const { code, data } = await this.$axios({ |
| | | method: 'get', |
| | | url: yearDetailPlanListApi, |
| | | params: { |
| | | planId: this.planId, |
| | | current: this.yearDeatilPage.curent, |
| | | size: this.yearDeatilPage.pageSize, |
| | | date: this.yearDetailForm.date, |
| | | project: this.yearDetailForm.project |
| | | } |
| | | }) |
| | | if (code == 200) { |
| | | this.yearDetailTableData = data.records |
| | | this.yearDeatilPage.total = data.total |
| | | } |
| | | this.yearDetailLoading = false |
| | | }, |
| | | showDialog(operationType,row, type = false) { |
| | | if (operationType === 'add') { |
| | | if (!this.planId) { |
| | | this.$message.warning('è¯·éæ©ä¸æ¡è®¡åè¿è¡æ°å¢') |
| | | return |
| | | } |
| | | } |
| | | this.$refs.planModal.showDialog({planId:this.planId,...row}, type) |
| | | }, |
| | | |
| | | |
| | | |
| | | // å¹´æç»è®¡åå页 |
| | | handleYearDetailCurrent(page) { |
| | | this.yearDeatilPage.curent = page |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | handleYearDetailSizeChange(size) { |
| | | this.yearDeatilPage.pageSize = size |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // å é¤å¹´è®¡å |
| | | delYearPlan(id) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | const { code } = await this.$axios({ |
| | | method: 'delete', |
| | | url: delYearPlanApi, |
| | | params: { id } |
| | | }) |
| | | if (code == 200) { |
| | | this.$message.success('å 餿å') |
| | | this.getYearPlanList() |
| | | this.getYearDetailPlanList() |
| | | } else { |
| | | this.$message.error('å é¤å¤±è´¥') |
| | | } |
| | | }) |
| | | }, |
| | | // å é¤å¹´è®¡åæç» |
| | | delYearPlanDetail(id) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | const { code } = await this.$axios({ |
| | | method: 'delete', |
| | | url: delYearPlanDetailApi, |
| | | params: { id } |
| | | }) |
| | | if (code == 200) { |
| | | this.$message.success('å 餿å') |
| | | this.getYearDetailPlanList() |
| | | } else { |
| | | this.$message.error('å é¤å¤±è´¥') |
| | | } |
| | | }) |
| | | }, |
| | | // æ¹å年度计å |
| | | approvalYearPlan(row) { |
| | | this.$confirm('确认æ¹å该年度计å?', 'æç¤º', { |
| | | confirmButtonText: 'æ¹å', |
| | | cancelButtonText: '䏿¹å', |
| | | type: 'info' |
| | | }).then(() => { |
| | | this.approvalYearPlanFun(1, row.id) |
| | | }).catch(action => { |
| | | this.approvalYearPlanFun(0, row.id) |
| | | }) |
| | | }, |
| | | // 年度计å表-ä¸è½½ |
| | | downLoadPost(row) { |
| | | this.$axios.get(exportSuperVisePlanApi + '?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(); |
| | | }) |
| | | }, |
| | | async approvalYearPlanFun(approvalStatus, rowId) { |
| | | const { code } = await this.$axios({ |
| | | method: 'get', |
| | | url: yearPlanDetailApprovalApi, |
| | | params: { |
| | | id: rowId, |
| | | approvalStatus: approvalStatus |
| | | }, |
| | | }) |
| | | if (code == 200) { |
| | | this.$message.success('æä½æåï¼') |
| | | this.getYearPlanList() |
| | | } else { |
| | | this.$message.error('æä½æåï¼') |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </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; |
| | | padding: 0 16px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="add"> |
| | | <el-dialog |
| | | :isEdit="isEdit" |
| | | :title="isEdit ? 'ç¼è¾å·¥ä½çç£è®°å½':'æ°å¢å·¥ä½çç£è®°å½'" |
| | | :visible.sync="dialogVisible" |
| | | width="800" |
| | | > |
| | | <el-steps v-if="isEdit" :active="active" :align-center="true" finish-status="success"> |
| | | <el-step style="cursor: pointer;" title="æ£æµ" @click.native="setStep(0)"></el-step> |
| | | <el-step style="cursor: pointer;" title="审æ¹" @click.native="setStep(1)"></el-step> |
| | | </el-steps> |
| | | <SuperviseForm |
| | | v-show="pageStatus == 0" |
| | | ref="superviseFormRef" |
| | | :disabled="active != 0" |
| | | :isEdit="isEdit" |
| | | :superviseForm.sync="mainForm.superviseForm" |
| | | :userList="userList" |
| | | @addData="addData" |
| | | @close="closeDialog" |
| | | @submit="submit" |
| | | ></SuperviseForm> |
| | | <ApproveForm |
| | | v-show="pageStatus == 1" |
| | | ref="approveFormRef" |
| | | :approveForm.sync="mainForm.approveForm" |
| | | :disabled="active != 1" |
| | | :isEdit="isEdit" |
| | | :userList="userList" |
| | | @close="toClose" |
| | | @submit="submit" |
| | | ></ApproveForm> |
| | | <el-result v-show="pageStatus == 2" icon="success" subTitle="å¤ç宿" title="å®¡æ ¸å®æ"> |
| | | </el-result> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import SuperviseForm from './supervise/SuperviseForm.vue' |
| | | import ApproveForm from './supervise/ApproveForm.vue' |
| | | import { |
| | | getUserListApi, |
| | | addOrUpdatePersonSupervisionRecord |
| | | } from "../../../../../assets/api/api" |
| | | import dayjs from 'dayjs' |
| | | |
| | | export default { |
| | | components: { |
| | | SuperviseForm, |
| | | ApproveForm |
| | | }, |
| | | data() { |
| | | return { |
| | | active: 0, |
| | | pageStatus: 0, |
| | | isEdit: false, |
| | | dialogVisible: false, |
| | | userList: [], |
| | | id: undefined, |
| | | mainForm: { |
| | | superviseForm: { |
| | | testerId: undefined, |
| | | supervisorId: undefined, |
| | | testItem: undefined, |
| | | sampleNumber: undefined, |
| | | detectionDate: undefined, |
| | | personnel: [], |
| | | instrumentEquipment: undefined, |
| | | workingEnvironment: undefined, |
| | | sampleCollection: undefined, |
| | | samplePreparation: undefined, |
| | | testMethod: undefined, |
| | | testingRecords: undefined, |
| | | testReport: undefined, |
| | | evaluationSupervisionSituation: undefined, |
| | | doNotMeetTheHandlingOpinions: undefined, |
| | | }, |
| | | approveForm: { |
| | | technicalDirector: undefined |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | async openDialog(row, type=false) { |
| | | this.dialogVisible = true |
| | | this.isEdit = type |
| | | await this.getUserList() |
| | | if(this.isEdit) { |
| | | // ç¼è¾ |
| | | this.loadForm(row) |
| | | this.id = row.id |
| | | } else { |
| | | // æ°å¢ |
| | | this.resetForm(row) |
| | | this.id = undefined |
| | | } |
| | | }, |
| | | /** |
| | | * @desc å 载表å |
| | | */ |
| | | loadForm(row) { |
| | | if(row.currentState) { |
| | | this.active = Number(row.currentState) |
| | | this.pageStatus = Number(row.currentState === '2' ? 0 : row.currentState) |
| | | } |
| | | // 第1æ¥ |
| | | this.mainForm.superviseForm.testerId = row.testerId |
| | | this.mainForm.superviseForm.supervisorId = row.supervisorId |
| | | this.mainForm.superviseForm.testItem = row.testItem |
| | | this.mainForm.superviseForm.sampleNumber = row.sampleNumber |
| | | this.mainForm.superviseForm.detectionDate = row.detectionDate |
| | | let personList = row.personnel.split(',') |
| | | this.mainForm.superviseForm.personnel = personList.map(item => { |
| | | return Number(item) |
| | | }); |
| | | this.mainForm.superviseForm.instrumentEquipment = row.instrumentEquipment |
| | | this.mainForm.superviseForm.workingEnvironment = row.workingEnvironment |
| | | this.mainForm.superviseForm.sampleCollection = row.sampleCollection |
| | | this.mainForm.superviseForm.samplePreparation = row.samplePreparation |
| | | this.mainForm.superviseForm.testMethod = row.testMethod |
| | | this.mainForm.superviseForm.testingRecords = row.testingRecords |
| | | this.mainForm.superviseForm.testReport = row.testReport |
| | | this.mainForm.superviseForm.evaluationSupervisionSituation = row.evaluationSupervisionSituation |
| | | this.mainForm.superviseForm.doNotMeetTheHandlingOpinions = row.doNotMeetTheHandlingOpinions |
| | | // 第2æ¥ |
| | | this.mainForm.approveForm.technicalDirector = row.technicalDirector |
| | | }, |
| | | /** |
| | | * @desc é置表å |
| | | */ |
| | | resetForm(row) { |
| | | console.log(row) |
| | | this.active = 0 |
| | | this.pageStatus = 0 |
| | | // 第1个 |
| | | this.mainForm.superviseForm.currentState = undefined |
| | | this.mainForm.superviseForm.testerId = undefined |
| | | this.mainForm.superviseForm.supervisorId = undefined |
| | | this.mainForm.superviseForm.testItem = undefined |
| | | this.mainForm.superviseForm.sampleNumber = undefined |
| | | this.mainForm.superviseForm.detectionDate = undefined |
| | | this.mainForm.superviseForm.personnel = [row.departId] |
| | | this.mainForm.superviseForm.instrumentEquipment = undefined |
| | | this.mainForm.superviseForm.workingEnvironment = undefined |
| | | this.mainForm.superviseForm.sampleCollection = undefined |
| | | this.mainForm.superviseForm.samplePreparation = undefined |
| | | this.mainForm.superviseForm.testMethod = undefined |
| | | this.mainForm.superviseForm.testingRecords = undefined |
| | | this.mainForm.superviseForm.testReport = undefined |
| | | this.mainForm.superviseForm.evaluationSupervisionSituation = undefined |
| | | this.mainForm.superviseForm.doNotMeetTheHandlingOpinions = undefined |
| | | // 第2个 |
| | | this.mainForm.approveForm.technicalDirector = undefined |
| | | }, |
| | | closeDialog() { |
| | | this.dialogVisible = false |
| | | }, |
| | | /** |
| | | * @desc è·åç¨æ·ä¿¡æ¯ |
| | | */ |
| | | async getUserList() { |
| | | const { code, data } = await this.$axios({ |
| | | method: 'get', |
| | | url: getUserListApi, |
| | | }) |
| | | if(code == 200) { |
| | | this.userList = data |
| | | } |
| | | }, |
| | | /** |
| | | * @desc 驳å |
| | | */ |
| | | toClose() { |
| | | this.submitFormApi({ |
| | | id: this.id, |
| | | currentState: 0, |
| | | }) |
| | | }, |
| | | /** |
| | | * @desc æ°å¢ |
| | | */ |
| | | addData(step) { |
| | | let data = this.setParams(step) |
| | | this.submitFormApi(data) |
| | | }, |
| | | /** |
| | | * @desc ç¼è¾ |
| | | */ |
| | | submit(step) { |
| | | console.log('ç¼è¾', this.isEdit) |
| | | let data = this.setParams(step) |
| | | data.id = this.id |
| | | this.submitFormApi(data) |
| | | }, |
| | | // è®¾ç½®åæ° |
| | | setParams(step) { |
| | | if(step == 1) { |
| | | let result = this.mainForm.superviseForm |
| | | result.currentState = this.active + 1 |
| | | result.personnel = result.personnel.join(",") |
| | | result.technicalDirectorDate = dayjs().format('YYYY-MM-DD HH:mm:ss') |
| | | return result |
| | | } |
| | | if(step == 2) { |
| | | let result = this.mainForm.approveForm |
| | | result.currentState = this.active + 1 |
| | | return result |
| | | } |
| | | }, |
| | | // åæå¡å¨åé表å |
| | | async submitFormApi(data) { |
| | | console.log('æ¥å£è¡¨å', data) |
| | | const { code } = await this.$axios({ |
| | | method: 'post', |
| | | url: addOrUpdatePersonSupervisionRecord, |
| | | data: data, |
| | | noQs: true |
| | | }) |
| | | if(code == 200) { |
| | | this.$message.success('æä½æå') |
| | | this.dialogVisible = false |
| | | this.$emit('submit') |
| | | } |
| | | }, |
| | | setStep(e) { |
| | | this.pageStatus = e |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .foot { |
| | | width: 100%; |
| | | } |
| | | .add >>> .el-dialog__footer { |
| | | padding-right: 20px; |
| | | } |
| | | .main_right { |
| | | text-align: left; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form |
| | | label-width="160px" |
| | | :model="form" |
| | | :disabled="disabled" |
| | | style="position: relative;" |
| | | size="small" |
| | | > |
| | | <el-card :body-style="{ height: '350px', overflow: 'auto'}"> |
| | | <el-form-item label="é¨é¨è´è´£äºº"> |
| | | <el-select |
| | | v-model="form.departmentHeadId" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="被çç£äºº"> |
| | | <el-select |
| | | v-model="form.supervisedPersonId" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸ç¬¦åå·¥ä½åç°éå¾"> |
| | | <el-checkbox-group |
| | | v-model="form.discoveryApproach" |
| | | > |
| | | <el-checkbox |
| | | v-for="(item, index) in checkbox" |
| | | :key="index" |
| | | :label="item.value" |
| | | name="type" |
| | | >{{ item.label }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸ç¬¦åå·¥ä½ç详ç»è®°å½"> |
| | | <el-input |
| | | v-model="form.notConformDetails" |
| | | type="textarea" |
| | | :rows="2" |
| | | placeholder="请è¾å
¥å
容" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸ç¬¦åç便®åæ¡æ¬¾å·"> |
| | | <el-input |
| | | v-model="form.nonConformityClause" |
| | | type="textarea" |
| | | :rows="2" |
| | | placeholder="请è¾å
¥å
容" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-form-item label-width="0"> |
| | | <div style=" display: flex; width: 100%; justify-content: space-between; margin-top: 15px;"> |
| | | <div> |
| | | æä½äººï¼{{ currentResponsible }} |
| | | </div> |
| | | <div v-if="step == 0 || step == 1"> |
| | | <el-button v-if="step == 1" :disabled="false" @click="cancel">驳å</el-button> |
| | | <el-button :disabled="false" @click="save">ä¿å</el-button> |
| | | <el-button type="primary" @click="onSubmit" :disabled="false">æäº¤</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | |
| | | export default { |
| | | props: { |
| | | currentResponsible: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | userList: { |
| | | type: Array, |
| | | default: () => { |
| | | return [] |
| | | } |
| | | }, |
| | | step: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | condiForm: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | form: { |
| | | get() { |
| | | return this.condiForm |
| | | }, |
| | | set(val) { |
| | | this.$emit('update:condiForm', val) |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | checkbox: [ |
| | | { |
| | | label: '管çè¯å®¡', |
| | | value: 0 |
| | | }, { |
| | | label: 'å
é¨å®¡æ ¸', |
| | | value: 1 |
| | | }, { |
| | | label: 'æ£æµè¿ç¨æ§å¶', |
| | | value: 2 |
| | | }, { |
| | | label: 'å
é¨è´¨éæ§å¶', |
| | | value: 3 |
| | | }, { |
| | | label: 'å
é¨çç£', |
| | | value: 4 |
| | | }, { |
| | | label: 'å¤é¨è¯å®¡/æ£æ¥', |
| | | value: 5 |
| | | }, { |
| | | label: '顾客æè¯/æè§åé¦', |
| | | value: 6 |
| | | }, { |
| | | label: 'å
¶ä»', |
| | | value: 7 |
| | | } |
| | | ], |
| | | } |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | this.$emit('nextStep', 'submit') |
| | | }, |
| | | save() { |
| | | this.$emit('nextStep', 'save') |
| | | }, |
| | | cancel() { |
| | | this.$emit('cancel', 'cancel') |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form |
| | | :model="form" |
| | | label-width="160px" |
| | | style="position: relative" |
| | | :disabled="disabled" |
| | | size="small" |
| | | > |
| | | <el-card :body-style="{ height: '350px', overflow: 'auto'}"> |
| | | <el-form-item label="éç¥å®¢æ·"> |
| | | <el-radio-group v-model="form.whetherInformCustomer"> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | <el-radio :label="2">å¦</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="æ¢å¤å·¥ä½"> |
| | | <el-radio-group v-model="form.whetherResumeWork"> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | <el-radio :label="2">å¦</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="è´¨éè´è´£äºº"> |
| | | <el-select v-model="form.qualitySupervisorId" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-form-item label-width="0"> |
| | | <div style=" display: flex; width: 100%; justify-content: space-between; margin-top: 15px;"> |
| | | <div> |
| | | æä½äººï¼{{ currentResponsible }} |
| | | </div> |
| | | <div v-if="step == 4" > |
| | | <el-button @click="cancel">驳å</el-button> |
| | | <el-button type="primary" @click="onSubmit">æäº¤</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | props: { |
| | | currentResponsible: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | userList: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | step: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | inform: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | form: { |
| | | get() { |
| | | return this.inform |
| | | }, |
| | | set(val) { |
| | | this.$emit('update:inform', val) |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | this.$emit('nextStep', 'submit') |
| | | }, |
| | | save() { |
| | | this.$emit('nextStep', 'save') |
| | | }, |
| | | cancel() { |
| | | this.$emit('cancel', 'cancel') |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form |
| | | :model="form" |
| | | label-width="200px" |
| | | style="position: relative;" |
| | | :disabled="disabled" |
| | | size="small" |
| | | > |
| | | <el-card :body-style="{ height: '350px', overflow: 'auto'}"> |
| | | <el-form-item label="责任é¨é¨"> |
| | | <el-select v-model="form.responsibleDepartmentPersonId" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ¶é¤ä¸ç¬¦å工使éåçæªæ½"> |
| | | <el-input |
| | | v-model="form.treatmentMeasures" |
| | | type="textarea" |
| | | :rows="2" |
| | | placeholder="请è¾å
¥å
容" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-form-item v-if="step == 2" label-width="0px" :disabled="disabled"> |
| | | <div style=" display: flex; width: 100%; justify-content: space-between; margin-top: 15px;"> |
| | | <div> |
| | | æä½äººï¼{{ currentResponsible }} |
| | | </div> |
| | | <div> |
| | | <el-button @click="cancel">驳å</el-button> |
| | | <el-button type="primary" @click="onSubmit">æäº¤</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | props: { |
| | | currentResponsible: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | userList: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | step: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | handleForm: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | form: { |
| | | get() { |
| | | return this.handleForm |
| | | }, |
| | | set(val) { |
| | | this.$emit('update:handleForm', val) |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | } |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | this.$emit('nextStep', 'submit') |
| | | }, |
| | | save() { |
| | | this.$emit('nextStep', 'save') |
| | | }, |
| | | cancel() { |
| | | this.$emit('cancel', 'cancel') |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form |
| | | :model="form" |
| | | label-width="160px" |
| | | style="position: relative" |
| | | :disabled="disabled" |
| | | size="small" |
| | | > |
| | | <el-card :body-style="{ height: '350px', overflow: 'auto'}"> |
| | | <el-form-item label="æ¯å¦éè¦éåçº æ£æªæ½"> |
| | | <el-radio-group v-model="form.correctiveMeasure"> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | <el-radio :label="2">å¦</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="çº æ£æªæ½å¤çåè·è¸ª"> |
| | | <el-radio-group v-model="form.correctiveMeasureFollowTracks"> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | <el-radio :label="2">å¦</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="ææ¯è´è´£äºº"> |
| | | <el-select v-model="form.correctiveMeasurePersonId" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-form-item label-width="0"> |
| | | <div style=" display: flex; width: 100%; justify-content: space-between; margin-top: 15px;"> |
| | | <div> |
| | | æä½äººï¼{{ currentResponsible }} |
| | | </div> |
| | | <div v-if="step == 3"> |
| | | <el-button @click="cancel">驳å</el-button> |
| | | <el-button type="primary" @click="onSubmit">æäº¤</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | props: { |
| | | currentResponsible: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | userList: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | step: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | rectifyForm: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | form: { |
| | | get() { |
| | | return this.rectifyForm |
| | | }, |
| | | set(val) { |
| | | this.$emit('update:rectifyForm', val) |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | } |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | this.$emit('nextStep', 'submit') |
| | | }, |
| | | save() { |
| | | this.$emit('nextStep', 'save') |
| | | }, |
| | | cancel() { |
| | | this.$emit('cancel', 'cancel') |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog |
| | | :visible.sync="dialogVisible" |
| | | title="ä¸ç¬¦å工使§å¶å" |
| | | > |
| | | <el-steps :active="active" :align-center="true" finish-status="success"> |
| | | <el-step |
| | | v-for="(item, index) in stepList" |
| | | :key="index" |
| | | :title="item.label" |
| | | style="cursor: pointer;" |
| | | @click.native="setStep(item.value)" |
| | | ></el-step> |
| | | </el-steps> |
| | | <el-divider></el-divider> |
| | | <ConditionForm |
| | | v-if="pageStatus == 0" |
| | | :condiForm.sync="mainForm.condiForm" |
| | | :currentResponsible="currentResponsible" |
| | | :disabled="active != 0" |
| | | :step="active" |
| | | :userList="userList" |
| | | @nextStep="submit" |
| | | ></ConditionForm> |
| | | <ConditionForm |
| | | v-if="pageStatus == 1" |
| | | :condiForm.sync="mainForm.condiForm" |
| | | :currentResponsible="currentResponsible" |
| | | :disabled="true" |
| | | :step="active" |
| | | :userList="userList" |
| | | @cancel="cancel" |
| | | @nextStep="submit" |
| | | ></ConditionForm> |
| | | <MeasureForm |
| | | v-if="pageStatus == 2" |
| | | :currentResponsible="currentResponsible" |
| | | :disabled="active != 2" |
| | | :handleForm.sync="mainForm.handleForm" |
| | | :step="active" |
| | | :userList="userList" |
| | | @cancel="cancel" |
| | | @nextStep="submit" |
| | | ></MeasureForm> |
| | | <RectifyForm |
| | | v-if="pageStatus == 3" |
| | | :currentResponsible="currentResponsible" |
| | | :disabled="active != 3" |
| | | :rectifyForm.sync="mainForm.rectifyForm" |
| | | :step="active" |
| | | :userList="userList" |
| | | @cancel="cancel" |
| | | @nextStep="submit" |
| | | ></RectifyForm> |
| | | <Inform |
| | | v-if="pageStatus == 4" |
| | | :disabled="active != 4" |
| | | :inform.sync="mainForm.inform" |
| | | :step="active" |
| | | :userList="userList" |
| | | @cancel="cancel" |
| | | @nextStep="submit" |
| | | ></Inform> |
| | | <el-result v-if="pageStatus == 5" icon="success" subTitle="å¤ç宿" title="å®¡æ ¸å®æ"> |
| | | </el-result> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import ConditionForm from './Step/ConditionForm.vue' |
| | | import MeasureForm from './Step/MeasureForm.vue' |
| | | import RectifyForm from './Step/RectifyForm.vue' |
| | | import Inform from './Step/Inform.vue' |
| | | import { |
| | | personSupervisionControlSheetPage, |
| | | getUserListApi, |
| | | addOrUpdatePersonSupervisionControl |
| | | } from "../../../../../../assets/api/api" |
| | | |
| | | export default { |
| | | components: { |
| | | ConditionForm, MeasureForm, RectifyForm, Inform |
| | | }, |
| | | data() { |
| | | return { |
| | | active: 0, |
| | | pageStatus: 0, |
| | | dialogVisible: false, |
| | | currentResponsible: undefined, |
| | | stepList: [{ |
| | | label: '工使
åµ', |
| | | value: 0 |
| | | }, { |
| | | label: '被çç£äººç¡®è®¤', |
| | | value: 1 |
| | | }, { |
| | | label: 'å¤çæªæ½', |
| | | value: 2 |
| | | }, { |
| | | label: 'çº æ£æªæ½', |
| | | value: 3 |
| | | }, { |
| | | label: 'éç¥å®¢æ·', |
| | | value: 4 |
| | | } |
| | | ], |
| | | supervisionRecordId: undefined, |
| | | controlId: undefined, |
| | | mainForm: { |
| | | condiForm: { |
| | | departmentHeadId: undefined, |
| | | supervisedPersonId: undefined, |
| | | discoveryApproach: [], |
| | | notConformDetails: undefined, |
| | | nonConformityClause: undefined, |
| | | }, |
| | | handleForm: { |
| | | responsibleDepartmentPersonId: undefined, |
| | | treatmentMeasures: undefined |
| | | }, |
| | | rectifyForm: { |
| | | correctiveMeasure: undefined, |
| | | correctiveMeasureFollowTracks: undefined, |
| | | correctiveMeasurePersonId: undefined |
| | | }, |
| | | inform: { |
| | | whetherInformCustomer: undefined, |
| | | whetherResumeWork: undefined, |
| | | qualitySupervisorId: undefined |
| | | } |
| | | }, |
| | | userList: [], |
| | | controlType: undefined |
| | | } |
| | | }, |
| | | methods: { |
| | | /** |
| | | * @desc åå§å表å |
| | | */ |
| | | initForm() { |
| | | this.mainForm.condiForm.departmentHeadId = undefined |
| | | this.mainForm.condiForm.supervisedPersonId = undefined |
| | | this.mainForm.condiForm.discoveryApproach = [] |
| | | this.mainForm.condiForm.notConformDetails = undefined |
| | | this.mainForm.condiForm.nonConformityClause = undefined |
| | | this.mainForm.handleForm.responsibleDepartmentPersonId = undefined |
| | | this.mainForm.handleForm.treatmentMeasures = undefined |
| | | this.mainForm.rectifyForm.correctiveMeasure = undefined |
| | | this.mainForm.rectifyForm.correctiveMeasureFollowTracks = undefined |
| | | this.mainForm.rectifyForm.correctiveMeasurePersonId = undefined |
| | | this.mainForm.inform.whetherInformCustomer = undefined |
| | | this.mainForm.inform.whetherResumeWork = undefined |
| | | this.mainForm.inform.qualitySupervisorId = undefined |
| | | }, |
| | | /** |
| | | * @desc æå¼æ¨¡ææ¡ |
| | | * @param {çç£è®°å½id} id |
| | | */ |
| | | openDialog(id) { |
| | | this.dialogVisible = true |
| | | this.getUserList() |
| | | this.getControlData(id) |
| | | }, |
| | | /** |
| | | * @desc è·åç¨æ·ä¿¡æ¯ |
| | | */ |
| | | async getUserList() { |
| | | const { code, data } = await this.$axios({ |
| | | method: 'get', |
| | | url: getUserListApi, |
| | | }) |
| | | if(code == 200) { |
| | | this.userList = data |
| | | } |
| | | }, |
| | | /** |
| | | * @desc æ¥è¯¢çç£è®°å½æ§å¶å |
| | | * @param {çç£è®°å½id} id |
| | | */ |
| | | async getControlData(id) { |
| | | const { code, data } = await this.$axios({ |
| | | method: 'get', |
| | | url: personSupervisionControlSheetPage, |
| | | params: {id} |
| | | }) |
| | | if(code == 202) { |
| | | this.controlType = 'æ°å¢' |
| | | this.supervisionRecordId = id |
| | | this.active = 0 |
| | | this.pageStatus = 0 |
| | | this.controlId = undefined |
| | | this.initForm() |
| | | } |
| | | if(code == 200) { |
| | | this.currentResponsible = data.currentResponsible |
| | | this.controlType = 'ç¼è¾' |
| | | this.controlId = data.id |
| | | this.active = Number(data.currentState) |
| | | this.pageStatus = Number(data.currentState === 4 ? 0 : data.currentState) |
| | | // 第1ã2æ¥æ°æ® |
| | | this.mainForm.condiForm.departmentHeadId = data.departmentHeadId |
| | | this.mainForm.condiForm.supervisedPersonId = data.supervisedPersonId |
| | | this.mainForm.condiForm.notConformDetails = data.notConformDetails |
| | | this.mainForm.condiForm.nonConformityClause = data.nonConformityClause |
| | | // 第3æ¥æ°æ® |
| | | this.mainForm.handleForm.responsibleDepartmentPersonId = data.responsibleDepartmentPersonId |
| | | this.mainForm.handleForm.treatmentMeasures = data.treatmentMeasures |
| | | // 第4æ¥æ°æ® |
| | | this.mainForm.rectifyForm.correctiveMeasure = data.correctiveMeasure |
| | | this.mainForm.rectifyForm.correctiveMeasureFollowTracks = data.correctiveMeasureFollowTracks |
| | | this.mainForm.rectifyForm.correctiveMeasurePersonId = data.correctiveMeasurePersonId |
| | | // 第5æ¥æ°æ® |
| | | this.mainForm.whetherInformCustomer = data.whetherInformCustomer |
| | | this.mainForm.whetherResumeWork = data.whetherResumeWork |
| | | this.mainForm.qualitySupervisorId = data.qualitySupervisorId |
| | | this.supervisionRecordId = data.supervisionRecordId |
| | | } |
| | | }, |
| | | submit(type) { |
| | | let currentState = undefined |
| | | if(type == 'submit') { |
| | | currentState = this.active + 1 |
| | | } else if(type == 'save') { |
| | | currentState = undefined |
| | | } |
| | | if(this.active == 0) { |
| | | let { discoveryApproach, ...condiFormRest } = this.mainForm.condiForm |
| | | let approcahStr = discoveryApproach.join(',') |
| | | this.submitForm({ |
| | | id: this.controlId, |
| | | supervisionRecordId: this.supervisionRecordId, |
| | | discoveryApproach: approcahStr, |
| | | currentState: currentState, |
| | | discovererDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | ...condiFormRest |
| | | }) |
| | | } |
| | | if(this.active == 1) { |
| | | let { discoveryApproach, ...condiFormRest } = this.mainForm.condiForm |
| | | let approcahStr = discoveryApproach.join(',') |
| | | this.submitForm({ |
| | | id: this.controlId, |
| | | supervisionRecordId: this.supervisionRecordId, |
| | | discoveryApproach: approcahStr, |
| | | currentState: currentState, |
| | | supervisedPersonDate: this.$moment().format('YYYY-MM-DD'), |
| | | ...condiFormRest |
| | | }) |
| | | } |
| | | if(this.active == 2) { |
| | | let { handleForm } = this.mainForm |
| | | this.submitForm({ |
| | | id: this.controlId, |
| | | supervisionRecordId: this.supervisionRecordId, |
| | | currentState: currentState, |
| | | responsibleDepartmentDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | ...handleForm |
| | | }) |
| | | } |
| | | if(this.active == 3) { |
| | | let { rectifyForm } = this.mainForm |
| | | this.submitForm({ |
| | | id: this.controlId, |
| | | supervisionRecordId: this.supervisionRecordId, |
| | | currentState: currentState, |
| | | correctiveMeasureDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | ...rectifyForm |
| | | }) |
| | | } |
| | | if(this.active == 4) { |
| | | let { inform } = this.mainForm |
| | | this.submitForm({ |
| | | id: this.controlId, |
| | | supervisionRecordId: this.supervisionRecordId, |
| | | currentState: currentState, |
| | | qualitySupervisorDate: this.$moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | ...inform |
| | | }) |
| | | } |
| | | }, |
| | | /** |
| | | * @desc æäº¤è¡¨å |
| | | */ |
| | | async submitForm(form) { |
| | | let user = JSON.parse(localStorage.getItem('user')); |
| | | const { code } = await this.$axios({ |
| | | method: 'post', |
| | | url: addOrUpdatePersonSupervisionControl, |
| | | data: { |
| | | currentResponsible: user.name, |
| | | ...form |
| | | }, |
| | | noQs: true |
| | | }) |
| | | if(this.controlType == 'æ°å¢') { |
| | | if(code == 200) { |
| | | this.$message.success('æäº¤æå') |
| | | } |
| | | } else if(this.controlType == 'ç¼è¾') { |
| | | if(code == 200) { |
| | | this.$message.success('æäº¤æå') |
| | | } |
| | | } |
| | | this.dialogVisible = false |
| | | }, |
| | | /** |
| | | * @desc 驳å |
| | | */ |
| | | cancel() { |
| | | let currentState = this.active - 1 |
| | | this.submitForm({ |
| | | id: this.controlId, |
| | | supervisionRecordId: this.supervisionRecordId, |
| | | currentState: currentState, |
| | | }) |
| | | }, |
| | | setStep(e) { |
| | | this.pageStatus = e |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .dialog-footer { |
| | | width: 100%; |
| | | } |
| | | >>> .el-dialog__footer { |
| | | padding-right: 20px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form |
| | | :model="form" |
| | | :disabled="disabled" |
| | | label-width="140px" |
| | | size="small" |
| | | style="position: relative" |
| | | > |
| | | <el-card :body-style="{ height: '350px', overflow: 'auto'}"> |
| | | <el-form-item label="æåºé¨é¨"> |
| | | <el-select |
| | | v-model="form.proposingDepartmentPersonId" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸åæ ¼æå离æè¿°"> |
| | | <el-input type="textarea" |
| | | v-model="form.descriptionNonconformity" |
| | | :rows="2" |
| | | placeholder="请è¾å
¥å
容" |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-form-item label-width="0"> |
| | | <div style="display: flex; width: 100%; justify-content: space-between; margin-top: 15px;"> |
| | | <div> |
| | | æä½äººï¼{{ currentResponsible }} |
| | | </div> |
| | | <div v-if="step == 0"> |
| | | <el-button :disabled="false" @click="cancel">驳å</el-button> |
| | | <el-button @click="save">ä¿å</el-button> |
| | | <el-button type="primary" @click="submit">æäº¤</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | props: { |
| | | currentResponsible: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | factForm: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | }, |
| | | userList: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | step: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | computed: { |
| | | form: { |
| | | get() { |
| | | return this.factForm |
| | | }, |
| | | set(val) { |
| | | this.$emit('update:factForm', val) |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | } |
| | | }, |
| | | methods: { |
| | | submit() { |
| | | this.$emit('nextStep', 'submit') |
| | | }, |
| | | save() { |
| | | this.$emit('nextStep', 'save') |
| | | }, |
| | | cancel() { |
| | | this.$emit('cancel', 'cancel') |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form |
| | | :model="form" |
| | | :disabled="disabled" |
| | | label-width="130px" |
| | | size="small" |
| | | style="position: relative" |
| | | > |
| | | <el-card :body-style="{ height: '350px', overflow: 'auto'}"> |
| | | <el-form-item label="责任人"> |
| | | <el-select v-model="form.correctiveActionId" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="çº æ£æªæ½"> |
| | | <el-input type="textarea" |
| | | v-model="form.correctiveMeasure" |
| | | :rows="2" |
| | | placeholder="请è¾å
¥å
容" |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æåºè¦æ±é¨é¨ç¡®è®¤"> |
| | | <el-input type="textarea" |
| | | v-model="form.requestDepartmentConfirmation" |
| | | :rows="2" |
| | | placeholder="请è¾å
¥å
容" |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-form-item label-width="0"> |
| | | <div style="display: flex; width: 100%; justify-content: space-between; margin-top: 15px;"> |
| | | <div> |
| | | æä½äººï¼{{ currentResponsible }} |
| | | </div> |
| | | <div v-if="step == 2"> |
| | | <el-button :disabled="false" @click="cancel">驳å</el-button> |
| | | <el-button type="primary" @click="submit">æäº¤</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | props: { |
| | | currentResponsible: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | measureForm: { |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | userList: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | step: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | computed: { |
| | | form: { |
| | | get() { |
| | | return this.measureForm |
| | | }, |
| | | set(val) { |
| | | this.$emit('update:measureForm', val) |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | submit() { |
| | | this.$emit('nextStep', 'submit') |
| | | }, |
| | | save() { |
| | | this.$emit('nextStep', 'save') |
| | | }, |
| | | cancel() { |
| | | this.$emit('cancel', 'cancel') |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form |
| | | :model="form" |
| | | :disabled="disabled" |
| | | label-width="140px" |
| | | size="small" |
| | | style="position: relative;" |
| | | > |
| | | <el-card :body-style="{ height: '350px', overflow: 'auto'}"> |
| | | <el-form-item label="责任é¨é¨"> |
| | | <el-select |
| | | v-model="form.causeAnalysisPersonId" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åå åæ"> |
| | | <el-input type="textarea" |
| | | v-model="form.causeAnalysis" |
| | | :rows="2" |
| | | placeholder="请è¾å
¥å
容" |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-form-item label-width="0"> |
| | | <div style="display: flex; width: 100%; justify-content: space-between; margin-top: 15px;"> |
| | | <div> |
| | | <span>æä½äººï¼{{ currentResponsible }}</span> |
| | | </div> |
| | | <div v-if="step == 1"> |
| | | <el-button :disabled="false" @click="cancel">驳å</el-button> |
| | | <el-button type="primary" @click="submit">æäº¤</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | props: { |
| | | currentResponsible: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | userList: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | reasonForm: { |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | step: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | computed: { |
| | | form: { |
| | | get() { |
| | | return this.reasonForm |
| | | }, |
| | | set(val) { |
| | | this.$emit('update:reasonForm', val) |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | submit() { |
| | | this.$emit('nextStep', 'submit') |
| | | }, |
| | | save() { |
| | | this.$emit('nextStep', 'save') |
| | | }, |
| | | cancel() { |
| | | this.$emit('cancel', 'cancel') |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form |
| | | :model="form" |
| | | :disabled="disabled" |
| | | label-width="130px" |
| | | size="small" |
| | | style="position: relative" |
| | | > |
| | | <el-card :body-style="{ height: '350px', overflow: 'auto'}"> |
| | | <el-form-item label="éªè¯é¨é¨"> |
| | | <el-select |
| | | v-model="form.verificationDepartmentPersonId" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="宿½éªè¯ç»æ"> |
| | | <el-input type="textarea" |
| | | v-model="form.implementationVerificationResults" |
| | | :rows="2" |
| | | placeholder="请è¾å
¥å
容" |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-card> |
| | | <el-form-item label-width="0"> |
| | | <div style="display: flex; width: 100%; justify-content: space-between; margin-top: 15px;"> |
| | | <div> |
| | | æä½äººï¼{{ currentResponsible }} |
| | | </div> |
| | | <div v-if="step == 3"> |
| | | <el-button :disabled="false" @click="cancel">驳å</el-button> |
| | | <el-button type="primary" @click="submit">æäº¤</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | props: { |
| | | currentResponsible: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | resultForm: { |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | step: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | userList: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | }, |
| | | computed: { |
| | | form: { |
| | | get() { |
| | | return this.resultForm |
| | | }, |
| | | set(val) { |
| | | this.$emit('update:resultForm', val) |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | submit() { |
| | | this.$emit('nextStep', 'submit') |
| | | }, |
| | | save() { |
| | | this.$emit('nextStep', 'save') |
| | | }, |
| | | cancel() { |
| | | this.$emit('cancel', 'cancel') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped></style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog |
| | | title="çº éå¤çå" |
| | | :visible.sync="dialogVisible" |
| | | > |
| | | <el-steps |
| | | :active="active" |
| | | finish-status="success" |
| | | :align-center="true" |
| | | > |
| | | <el-step |
| | | style="cursor: pointer;" |
| | | v-for="(item, index) in stepList" |
| | | :key="index" |
| | | :title="item.label" |
| | | @click.native="setStep(item.value)" |
| | | ></el-step> |
| | | </el-steps> |
| | | <el-divider></el-divider> |
| | | <Fact |
| | | v-if="pageStatus == 0" |
| | | :factForm.sync="mainForm.factForm" |
| | | :userList="userList" |
| | | :currentResponsible="currentResponsible" |
| | | :disabled="active != 0" |
| | | :step="active" |
| | | @nextStep="submit" |
| | | @cancel="cancel" |
| | | ></Fact> |
| | | <Reason |
| | | v-if="pageStatus == 1" |
| | | :reasonForm.sync="mainForm.reasonForm" |
| | | :userList="userList" |
| | | :currentResponsible="currentResponsible" |
| | | :disabled="active != 1" |
| | | :step="active" |
| | | @nextStep="submit" |
| | | @cancel="cancel" |
| | | ></Reason> |
| | | <Measure |
| | | v-if="pageStatus == 2" |
| | | :measureForm.sync="mainForm.measureForm" |
| | | :userList="userList" |
| | | :currentResponsible="currentResponsible" |
| | | :disabled="active != 2" |
| | | :step="active" |
| | | @nextStep="submit" |
| | | @cancel="cancel" |
| | | ></Measure> |
| | | <Result |
| | | v-if="pageStatus == 3" |
| | | :resultForm.sync="mainForm.resultForm" |
| | | :userList="userList" |
| | | :currentResponsible="currentResponsible" |
| | | :disabled="active != 3" |
| | | :step="active" |
| | | @nextStep="submit" |
| | | @cancel="cancel" |
| | | ></Result> |
| | | <!-- <div slot="footer" class="dialog-footer"> |
| | | <el-button v-if="active == 4" type="primary" @click="submit(5)">宿</el-button> |
| | | </div> --> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import Fact from './Step/Fact.vue' |
| | | import Reason from './Step/Reason.vue' |
| | | import Measure from './Step/Measure.vue' |
| | | import Result from './Step/Result.vue' |
| | | import dayjs from 'dayjs' |
| | | import { |
| | | getUserListApi, |
| | | personSupervisionProcessingPage, |
| | | addOrUpdatePersonnelServiceProcessing |
| | | } from '../../../../../../assets/api/api' |
| | | |
| | | export default { |
| | | components: { |
| | | Fact, Reason, Measure, Result |
| | | }, |
| | | data() { |
| | | return { |
| | | active: 0, |
| | | pageStatus: 0, |
| | | dialogVisible: false, |
| | | currentResponsible: undefined, |
| | | stepList: [ |
| | | { |
| | | label: 'é®é¢æè¿°', |
| | | value: 0 |
| | | }, { |
| | | label: 'åå åæ', |
| | | value: 1 |
| | | }, { |
| | | label: 'çº æ£æªæ½', |
| | | value: 2 |
| | | }, { |
| | | label: 'éªè¯ç»æ', |
| | | value: 3 |
| | | } |
| | | ], |
| | | supervisionRecordId: undefined, |
| | | processId: undefined, |
| | | mainForm: { |
| | | factForm: { |
| | | proposingDepartmentPersonId: undefined, |
| | | descriptionNonconformity: undefined |
| | | }, |
| | | reasonForm: { |
| | | causeAnalysisPersonId: undefined, |
| | | causeAnalysis: undefined |
| | | }, |
| | | measureForm: { |
| | | correctiveActionId: undefined, |
| | | correctiveMeasure: undefined, |
| | | requestDepartmentConfirmation: undefined |
| | | }, |
| | | resultForm: { |
| | | verificationDepartmentPersonId: undefined, |
| | | implementationVerificationResults: undefined |
| | | } |
| | | }, |
| | | userList: [], |
| | | } |
| | | }, |
| | | methods: { |
| | | openDialog(id) { |
| | | this.dialogVisible = true |
| | | this.getUserList() |
| | | this.getProcessData(id) |
| | | }, |
| | | /** |
| | | * @desc è·åç¨æ·ä¿¡æ¯ |
| | | */ |
| | | async getUserList() { |
| | | const { code, data } = await this.$axios({ |
| | | method: 'get', |
| | | url: getUserListApi, |
| | | }) |
| | | if(code == 200) { |
| | | this.userList = data |
| | | } |
| | | }, |
| | | /** |
| | | * @desc æ¥è¯¢çç£è®°å½å¤çå |
| | | * @param {çç£è®°å½id} id |
| | | */ |
| | | async getProcessData(id) { |
| | | const { code, data } = await this.$axios({ |
| | | method: 'get', |
| | | url: personSupervisionProcessingPage, |
| | | params: {id} |
| | | }) |
| | | if(code == 202) { |
| | | this.controlType = 'æ°å¢' |
| | | this.supervisionRecordId = id |
| | | this.active = 0 |
| | | this.pageStatus = 0 |
| | | this.processId = undefined |
| | | } |
| | | if(code == 200) { |
| | | this.currentResponsible = data.currentResponsible |
| | | this.controlType = 'ç¼è¾' |
| | | this.supervisionRecordId = id |
| | | this.processId = data.processingId |
| | | this.active = Number(data.currentState) |
| | | this.pageStatus = Number(data.currentState === 2 ? 0 : data.currentState) |
| | | // 第1æ¥æ°æ® |
| | | this.mainForm.factForm.proposingDepartmentPersonId = data.proposingDepartmentPersonId |
| | | this.mainForm.factForm.descriptionNonconformity = data.descriptionNonconformity |
| | | // 第2æ¥æ°æ® |
| | | this.mainForm.reasonForm.causeAnalysisPersonId = data.causeAnalysisPersonId |
| | | this.mainForm.reasonForm.causeAnalysis = data.causeAnalysis |
| | | // 第3æ¥æ°æ® |
| | | this.mainForm.measureForm.correctiveActionId = data.correctiveActionId |
| | | this.mainForm.measureForm.correctiveMeasure = data.correctiveMeasure |
| | | this.mainForm.measureForm.requestDepartmentConfirmation = data.requestDepartmentConfirmation == '1' ? true:false |
| | | // 第4æ¥æ°æ® |
| | | this.mainForm.resultForm.verificationDepartmentPersonId = data.verificationDepartmentPersonId |
| | | this.mainForm.resultForm.implementationVerificationResults = data.implementationVerificationResults |
| | | } |
| | | }, |
| | | closeDialog() { |
| | | this.dialogVisible = false |
| | | }, |
| | | submit(type) { |
| | | let currentState = undefined |
| | | if(type == 'submit') { |
| | | currentState = this.active + 1 |
| | | } else if(type == 'save') { |
| | | currentState = undefined |
| | | } |
| | | if(this.active == 0) { |
| | | // 第1æ¥ |
| | | console.log('第1æ¥', this.active, currentState) |
| | | let { factForm } = this.mainForm |
| | | this.submitForm({ |
| | | proposingDepartmentDate: dayjs().format('YYYY-MM-DD HH:mm:ss'), |
| | | currentState: currentState, |
| | | ...factForm |
| | | }) |
| | | } else if(this.active == 1) { |
| | | // 第2æ¥ |
| | | console.log('第2æ¥', this.active, currentState) |
| | | let { reasonForm } = this.mainForm |
| | | this.submitForm({ |
| | | causeAnalysisDate: dayjs().format('YYYY-MM-DD HH:mm:ss'), |
| | | currentState: currentState, |
| | | ...reasonForm |
| | | }) |
| | | } else if(this.active == 2) { |
| | | // 第3æ¥ |
| | | console.log('第3æ¥', this.active, currentState) |
| | | let { measureForm } = this.mainForm |
| | | let { requestDepartmentConfirmation, ...measureFormRest } = measureForm |
| | | this.submitForm({ |
| | | correctiveActionDate: dayjs().format('YYYY-MM-DD HH:mm:ss'), |
| | | currentState: currentState, |
| | | requestDepartmentConfirmation: requestDepartmentConfirmation ? 1:2, |
| | | ...measureFormRest |
| | | }) |
| | | } else if(this.active == 3) { |
| | | // 第4æ¥ |
| | | console.log('第4æ¥', this.active, currentState) |
| | | let { resultForm } = this.mainForm |
| | | this.submitForm({ |
| | | verificationDepartmentDate: dayjs().format('YYYY-MM-DD HH:mm:ss'), |
| | | currentState: currentState, |
| | | ...resultForm |
| | | }) |
| | | } |
| | | }, |
| | | /** |
| | | * @desc æäº¤è¡¨å |
| | | */ |
| | | async submitForm(form) { |
| | | console.log('æäº¤è¡¨å', form) |
| | | const { code } = await this.$axios({ |
| | | method: 'post', |
| | | url: addOrUpdatePersonnelServiceProcessing, |
| | | data: { |
| | | processingId: this.processId, |
| | | supervisionRecordId: this.supervisionRecordId, |
| | | ...form |
| | | }, |
| | | noQs: true |
| | | }) |
| | | if(this.controlType == 'æ°å¢') { |
| | | if(code == 200) { |
| | | this.$message.success('æäº¤æå') |
| | | } |
| | | } else if(this.controlType == 'ç¼è¾') { |
| | | if(code == 200) { |
| | | this.$message.success('æäº¤æå') |
| | | } |
| | | } |
| | | this.dialogVisible = false |
| | | }, |
| | | /** |
| | | * @desc 驳å |
| | | */ |
| | | cancel() { |
| | | let currentState = this.active - 1 |
| | | this.submitForm({ |
| | | id: this.processId, |
| | | supervisionRecordId: this.supervisionRecordId, |
| | | currentState: currentState, |
| | | }) |
| | | }, |
| | | setStep(e) { |
| | | console.log(e) |
| | | this.pageStatus = e |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="flex_column"> |
| | | <div> |
| | | <TableCard :showTitle="false"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <!-- <span>å
³é®å</span> |
| | | <el-input size="small" class="search" v-model="superviseForm.searchVal" placeholder="请è¾å
¥"></el-input> |
| | | <el-button type="primary" size="small">æ¥è¯¢</el-button> --> |
| | | <el-button v-if="multipleSelection.length > 0" slot="reference" size="small" type="danger" |
| | | @click="delRecords">å é¤</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="addRecord">æ°å¢</el-button> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <ZTTable |
| | | :column="superviseColumnData" |
| | | :handleSelectionChange="handleSelectionChange" |
| | | :height="'calc(100vh - 19em)'" |
| | | :isSelection="true" |
| | | :table-data="superviseTableData" |
| | | :table-loading="superviseLoading" |
| | | rowKey="id" |
| | | style="margin-top: 18px; padding: 0 15px;" |
| | | > |
| | | <div slot="action" slot-scope="scope"> |
| | | <el-button type="text" @click="openDownloadDia(scope.row)"> |
| | | <span>导åº</span> |
| | | </el-button> |
| | | <el-button type="text" @click="openRecord(scope.row)"> |
| | | <span>çç£è®°å½</span> |
| | | </el-button> |
| | | <el-button type="text" @click="openControl(scope.row.id)"> |
| | | <span :style="renderBtn(scope.row.currentStateControl)">æ§å¶å</span> |
| | | </el-button> |
| | | <el-button type="text" @click="openDispose(scope.row.id)"> |
| | | <span :style="renderBtn(scope.row.currentStateProcessing)">å¤çå</span> |
| | | </el-button> |
| | | </div> |
| | | </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="currentChange" @size-change="sizeChange"> |
| | | </el-pagination> |
| | | </div> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <RecordAdd ref="recordModal" @submit="getTableData"></RecordAdd> |
| | | <ControlModal ref="controlModal"></ControlModal> |
| | | <DisposeModal ref="disposeModal"></DisposeModal> |
| | | <el-dialog :visible.sync="downloadDialog" title="导åº" width="600px"> |
| | | <span> |
| | | <el-button :disabled="!download.currentStateControl" plain type="primary" @click="controlDown">æ§å¶å导åº</el-button> |
| | | <el-button :disabled="!download.currentStateProcessing" plain type="primary" @click="processingDown">å¤çå导åº</el-button> |
| | | <el-button plain type="primary" @click="supervisoryDown">çç£è®°å½å¯¼åº</el-button> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="downloadDialog = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import TableCard from "../../../TableCard/index" |
| | | import RecordAdd from "./Add.vue" |
| | | import ZTTable from "../../../ZTTable/index.vue" |
| | | import ControlModal from "./control/index.vue" |
| | | import DisposeModal from "./dispose/index.vue" |
| | | import { |
| | | personSupervisionRecordPage, |
| | | deletePersonSupervisionRecord, |
| | | personSupervisionProcessingPage, |
| | | exportSupervisionControlSheet, |
| | | exportSupervisionProcessingSheet, |
| | | exportPersonSupervisionRecord |
| | | } from "../../../../../assets/api/api" |
| | | |
| | | export default { |
| | | props: { |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | departId: { |
| | | type: Number, |
| | | default: () => { |
| | | return null; |
| | | } |
| | | }, |
| | | }, |
| | | components: { |
| | | TableCard, |
| | | RecordAdd, |
| | | ZTTable, |
| | | ControlModal, |
| | | DisposeModal |
| | | }, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | pagination: { |
| | | current: 1, |
| | | pageSize: 20, |
| | | total: 0 |
| | | }, |
| | | // çç£è®°å½ |
| | | superviseForm: { |
| | | searchVal: undefined |
| | | }, |
| | | superviseColumnData: [ |
| | | { |
| | | label: 'id', |
| | | prop: 'id' |
| | | }, { |
| | | label: 'æ£æµäººå', |
| | | prop: 'testerName', |
| | | width: 120 |
| | | }, { |
| | | label: 'çç£äººå', |
| | | prop: 'supervisorName', |
| | | width: 120 |
| | | }, { |
| | | label: 'æ£éªé¡¹ç®', |
| | | prop: 'testItem', |
| | | width: 120 |
| | | }, { |
| | | label: 'æ ·åç¼å·', |
| | | prop: 'sampleNumber', |
| | | width: 120 |
| | | }, { |
| | | label: 'æ£éªæ¥æ', |
| | | prop: 'detectionDate', |
| | | width: 160 |
| | | }, { |
| | | label: 'æ§å¶åç¶æ', |
| | | prop: 'currentStateControl', |
| | | formatData: (item) => { |
| | | let result = undefined |
| | | switch (item) { |
| | | case '0': |
| | | result = '工使
åµ' |
| | | break; |
| | | case '1': |
| | | result = '被çç£äººç¡®è®¤' |
| | | break; |
| | | case '2': |
| | | result = 'å¤çæªæ½' |
| | | break; |
| | | case '3': |
| | | result = 'çº æ£æªæ½' |
| | | break; |
| | | case '4': |
| | | result = 'éç¥å®¢æ·' |
| | | break; |
| | | } |
| | | return result |
| | | }, |
| | | width: 140, |
| | | }, { |
| | | label: 'æµç¨åç¶æ', |
| | | prop: 'currentStateProcessing', |
| | | formatData: (item) => { |
| | | let result = undefined |
| | | switch (item) { |
| | | case '0': |
| | | result = 'é®é¢æè¿°' |
| | | break; |
| | | case '1': |
| | | result = 'åå åæ' |
| | | break; |
| | | case '2': |
| | | result = 'çº æ£æªæ½' |
| | | break; |
| | | case '3': |
| | | result = 'éªè¯ç»æ' |
| | | break; |
| | | } |
| | | return result |
| | | }, |
| | | width: 140, |
| | | }, { |
| | | label: '人å', |
| | | prop: 'personnelName', |
| | | width: 150 |
| | | }, { |
| | | label: '设å¤ä»ªå¨', |
| | | prop: 'instrumentEquipment', |
| | | width: 140 |
| | | }, { |
| | | label: 'å·¥ä½ç¯å¢', |
| | | prop: 'workingEnvironment', |
| | | width: 140 |
| | | }, { |
| | | label: 'æ ·åéé', |
| | | prop: 'sampleCollection', |
| | | width: 140 |
| | | }, { |
| | | label: 'æ ·åçåå¤', |
| | | prop: 'samplePreparation', |
| | | width: 140 |
| | | }, { |
| | | label: 'æ£éªæ¹æ³', |
| | | prop: 'testMethod', |
| | | width: 120 |
| | | }, { |
| | | label: 'æ£æµè®°å½', |
| | | prop: 'testingRecords', |
| | | width: 120 |
| | | }, { |
| | | label: 'æ£éªæ¥å', |
| | | prop: 'testReport', |
| | | width: 120 |
| | | }, { |
| | | label: 'çç£æ
åµè¯ä»·', |
| | | prop: 'evaluationSupervisionSituation', |
| | | width: 140 |
| | | }, { |
| | | label: 'ä¸ç¬¦åå¤çæè§', |
| | | prop: 'doNotMeetTheHandlingOpinions', |
| | | width: 140 |
| | | }, { |
| | | fixed: 'right', |
| | | dataType: "slot", |
| | | width: 280, |
| | | label: 'æä½', |
| | | slot: 'action', |
| | | } |
| | | ], |
| | | superviseTableData: [], |
| | | superviseLoading: false, |
| | | multipleSelection: [], |
| | | downloadDialog: false, |
| | | download: { |
| | | currentStateControl: '', |
| | | currentStateProcessing: '', |
| | | }, |
| | | downloadId: '', |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getTableData() |
| | | }, |
| | | methods: { |
| | | /** |
| | | * @desc è·åæ ç人åid |
| | | */ |
| | | getDepart() { |
| | | this.getTableData() |
| | | }, |
| | | /** |
| | | * @desc å½å页æ¹å |
| | | */ |
| | | currentChange(current) { |
| | | this.pagination.current = current |
| | | this.getTableData() |
| | | }, |
| | | /** |
| | | * @desc æ¯é¡µä¸ªæ°æ¹å |
| | | */ |
| | | sizeChange(pageSize) { |
| | | this.pagination.pageSize = pageSize |
| | | this.getTableData() |
| | | }, |
| | | // è·åçç£è®°å½ |
| | | async getTableData() { |
| | | this.loading = true |
| | | const { code, data } = await this.$axios({ |
| | | method: 'get', |
| | | url: personSupervisionRecordPage, |
| | | params: { |
| | | departLimsId: this.isDepartment ? this.departId : null, |
| | | userId: this.isDepartment ? null : this.departId, |
| | | current: this.pagination.current, |
| | | size: this.pagination.pageSize |
| | | } |
| | | }) |
| | | if (code == 200) { |
| | | this.superviseTableData = data.records |
| | | this.pagination.total = data.total |
| | | } |
| | | this.loading = false |
| | | }, |
| | | // æ°å¢çç£è®°å½ |
| | | addRecord(row, type = false) { |
| | | this.$refs.recordModal.openDialog({ departId: this.departId, ...row }, type) |
| | | }, |
| | | openRecord(row) { |
| | | this.$refs.recordModal.openDialog(row, true) |
| | | }, |
| | | // æå¼å¯¼åºå¼¹æ¡ |
| | | openDownloadDia(row) { |
| | | this.downloadDialog = true |
| | | this.download = row |
| | | this.downloadId = row.id |
| | | }, |
| | | // æ§å¶åå¯¼åº |
| | | controlDown() { |
| | | this.$axios.get(exportSupervisionControlSheet + '?supervisionRecordId=' + this.downloadId, { 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(exportSupervisionProcessingSheet + '?supervisionRecordId=' + this.downloadId, { 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(); |
| | | }) |
| | | }, |
| | | // çç£è®°å½å¯¼åº |
| | | supervisoryDown() { |
| | | this.$axios.get(exportPersonSupervisionRecord + '?id=' + this.downloadId, { 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(); |
| | | }) |
| | | }, |
| | | // æ¾ç¤ºæ§å¶å |
| | | openControl(id) { |
| | | this.$refs.controlModal.openDialog(id) |
| | | }, |
| | | // æ¾ç¤ºå¤çå |
| | | openDispose(id) { |
| | | this.$refs.disposeModal.openDialog(id) |
| | | }, |
| | | // è¡¨æ ¼å¤éæ¿æ´»ååä»ä¹ |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val |
| | | }, |
| | | /** |
| | | * @desc æ¹éå é¤çç£è®°å½ |
| | | */ |
| | | delRecords() { |
| | | this.$confirm( |
| | | 'æ¤æä½å°å é¤é䏿°æ®, æ¯å¦ç»§ç»?', |
| | | 'æç¤º', |
| | | { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | console.log(this.multipleSelection) |
| | | let ids = this.multipleSelection.map((item) => item.id) |
| | | const code = this.delTableData(ids) |
| | | this.$message({ |
| | | type: code == 200 ? 'success' : 'error', |
| | | message: code == 200 ? 'å 餿åï¼' : 'å é¤å¤±è´¥ï¼' |
| | | }); |
| | | this.getTableData() |
| | | }) |
| | | }, |
| | | // å é¤api |
| | | async delTableData(ids) { |
| | | const { code } = await this.$axios({ |
| | | method: 'delete', |
| | | url: deletePersonSupervisionRecord, |
| | | data: ids |
| | | }) |
| | | return code |
| | | }, |
| | | // è¡èæ¯è² |
| | | renderBtn(currentState) { |
| | | let status = Number(currentState) |
| | | let res = {} |
| | | switch (status) { |
| | | case 0: |
| | | break; |
| | | case 1: |
| | | res = {color: '#337ecc'} |
| | | break; |
| | | case 2: |
| | | res = {color: '#409EFF'} |
| | | break; |
| | | case 3: |
| | | res = {color: '#79bbff'} |
| | | break; |
| | | case 4: |
| | | res = {color: '#a0cfff'} |
| | | break; |
| | | } |
| | | return res; |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | departId: { |
| | | handler(newId, oldId) { |
| | | if (this.isDepartment) { |
| | | this.getTableData(); |
| | | } else { |
| | | this.getTableData() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .flex_column { |
| | | display: flex; |
| | | flex-direction: column; |
| | | 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; |
| | | padding: 0 16px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form |
| | | :model="form" |
| | | label-width="100px" |
| | | :disabled="disabled" |
| | | size="small" |
| | | > |
| | | <el-form-item label="ææ¯è´è´£äºº"> |
| | | <el-select |
| | | v-model="form.technicalDirector" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="审æ¹"> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="2" |
| | | placeholder="请è¾å
¥" |
| | | ></el-input> |
| | | </el-form-item> --> |
| | | <el-form-item v-if="!disabled" style="text-align: right;"> |
| | | <el-button size="small" type="danger" @click="close">驳å</el-button> |
| | | <el-button size="small" type="primary" @click="submit">æäº¤</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | props: { |
| | | userList: { |
| | | type: Array, |
| | | default: () => { |
| | | return [] |
| | | } |
| | | }, |
| | | approveForm: { |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | isEdit: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | computed: { |
| | | form: { |
| | | get() { |
| | | return this.approveForm |
| | | }, |
| | | set(val) { |
| | | this.$emit('approveForm', val) |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | submit() { |
| | | this.$emit('submit', 2) |
| | | }, |
| | | /** |
| | | * @desc 驳å |
| | | */ |
| | | close() { |
| | | this.$emit('close', 2) |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form |
| | | :model="ruleForm" |
| | | :disabled="disabled" |
| | | label-width="100px" |
| | | size="small" |
| | | > |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµäººå"> |
| | | <el-select v-model="ruleForm.testerId" placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çç£å"> |
| | | <el-select v-model="ruleForm.supervisorId" placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµé¡¹ç®"> |
| | | <el-input v-model="ruleForm.testItem" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ ·åç¼å·"> |
| | | <el-input v-model="ruleForm.sampleNumber" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµæ¥æ"> |
| | | <el-date-picker |
| | | v-model="ruleForm.detectionDate" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="datetime" |
| | | placeholder="éæ©æ¥æ" |
| | | style="width: 100%;" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="人å"> |
| | | <el-select |
| | | v-model="ruleForm.personnel" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | multiple |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in userList" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仪å¨è®¾å¤"> |
| | | <el-input v-model="ruleForm.instrumentEquipment" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å·¥ä½ç¯å¢"> |
| | | <el-input v-model="ruleForm.workingEnvironment" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ ·åéé"> |
| | | <el-input v-model="ruleForm.sampleCollection" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ ·åçåå¤"> |
| | | <el-input v-model="ruleForm.samplePreparation" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµæ¹æ³"> |
| | | <el-input v-model="ruleForm.testMethod" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµè®°å½"> |
| | | <el-input v-model="ruleForm.testingRecords" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµæ¥å"> |
| | | <el-input v-model="ruleForm.testReport" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çç£æ
åµè¯ä»·"> |
| | | <el-input v-model="ruleForm.evaluationSupervisionSituation" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¤çæè§"> |
| | | <el-input v-model="ruleForm.doNotMeetTheHandlingOpinions" placeholder="请è¾å
¥"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col v-show="isEdit && !disabled" :span="24"> |
| | | <el-form-item style="text-align: right;"> |
| | | <el-button size="small" @click="close">åæ¶</el-button> |
| | | <el-button size="small" type="primary" @click="approve">审æ¹</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-show="!isEdit" :span="24"> |
| | | <el-form-item style="text-align: right;"> |
| | | <el-button size="small" type="primary" @click="addData">æäº¤</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | |
| | | export default { |
| | | props: { |
| | | isEdit: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | userList: { |
| | | type: Array, |
| | | default: () => { |
| | | return [] |
| | | } |
| | | }, |
| | | superviseForm: { |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | computed: { |
| | | ruleForm: { |
| | | get() { |
| | | return this.superviseForm |
| | | }, |
| | | set(val) { |
| | | this.$emit('superviseForm', val) |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | } |
| | | }, |
| | | methods: { |
| | | close() { |
| | | this.$emit('close') |
| | | }, |
| | | approve() { |
| | | this.$emit('submit', 1) |
| | | }, |
| | | addData() { |
| | | this.$emit('addData', 1) |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-tabs v-model="activeName" :lazy="true" type="border-card"> |
| | | <el-tab-pane label="人ååºæ¬ä¿¡æ¯" name="人ååºæ¬ä¿¡æ¯"> |
| | | <PersonnelList v-if="activeName === '人ååºæ¬ä¿¡æ¯' && isShowAll" ref="personnelList" :currentCompaniesList="currentCompaniesList" |
| | | :departId="departId" @refreshTree="refreshTree" |
| | | @updatePerson="updatePerson"></PersonnelList> |
| | | <personnelInformation v-if="activeName === '人ååºæ¬ä¿¡æ¯' && !isShowAll" :clickNodeVal="clickNodeVal"></personnelInformation> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å¹è®è®¡å" name="å¹è®è®¡å"> |
| | | <PersonnelTraining v-if="activeName === 'å¹è®è®¡å'" ref="personnelTraining" |
| | | :departId="departId" :isDepartment="isDepartment"></PersonnelTraining> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="çç£è®¡å" name="çç£è®¡å"> |
| | | <Plan v-if="activeName === 'çç£è®¡å'"></Plan> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å²ä½èè´£" name="å²ä½èè´£"> |
| | | <job-responsibilities v-if="activeName === 'å²ä½èè´£'" ref="jobResponsibilities" |
| | | :departId="departId" |
| | | :isDepartment="isDepartment"></job-responsibilities> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å·¥ä½å±¥å" name="å·¥ä½å±¥å"> |
| | | <trackRecord v-if="activeName === 'å·¥ä½å±¥å'" :clickNodeVal="clickNodeVal"></trackRecord> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="奿©è®°å½" name="奿©è®°å½"> |
| | | <rewardPunishmentRecord v-if="activeName === '奿©è®°å½'" |
| | | :departId="departId" :isDepartment="isDepartment"></rewardPunishmentRecord> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å¹è®è®°å½" name="å¹è®è®°å½"> |
| | | <training-record v-if="activeName === 'å¹è®è®°å½'" ref="trainingRecord" |
| | | :departId="departId" |
| | | :isDepartment="isDepartment"></training-record> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="çç£è®°å½" name="çç£è®°å½"> |
| | | <Records v-if="activeName === 'çç£è®°å½'" ref="recordsRef" :departId="departId" :isDepartment="isDepartment"></Records> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="ä»»èææè®°å½" name="ä»»èææè®°å½"> |
| | | <Mandate v-if="activeName === 'ä»»èææè®°å½'" ref="manDateRef" :departId="departId" :isDepartment="isDepartment"></Mandate> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="人åè½å" name="人åè½å"> |
| | | <personnel-capacity v-if="activeName === '人åè½å'" ref="personnelCapacity" |
| | | :departId="departId" |
| | | :isDepartment="isDepartment"></personnel-capacity> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="æ²éè®°å½" name="æ²éè®°å½"> |
| | | <Communicate v-if="activeName === 'æ²éè®°å½'" ref="communicateRef" :departId="departId" :isDepartment="isDepartment"></Communicate> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </template> |
| | | <script> |
| | | import Plan from './components/Plan/index.vue'; |
| | | import Records from './components/Records/index.vue'; |
| | | import Communicate from './components/Communicate/index.vue'; |
| | | import Mandate from './components/Mandate/index.vue'; |
| | | import PersonnelList from '../../do/a6-personnel-collect/personnel-list.vue'; |
| | | import PersonnelTraining from '../../do/a6-personnel-training/index.vue'; |
| | | import JobResponsibilities from '../../do/a6-personnel/job-responsibilities.vue'; |
| | | import TrainingRecord from '../../do/a6-personnel/training-record.vue'; |
| | | import PersonnelCapacity from '../../do/a6-personnel/personnel-capacity.vue'; |
| | | import trackRecord from "../../do/a6-personnel/track-record.vue"; |
| | | import rewardPunishmentRecord from "../../do/a6-personnel/reward-punishment-record.vue"; |
| | | import PersonnelInformation from "../../do/a6-personnel/personnel-information.vue"; |
| | | |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | } |
| | | }, |
| | | departId: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | isDepartment: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | isShowAll: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | currentCompaniesList: { |
| | | type: Array, |
| | | default: [] |
| | | } |
| | | }, |
| | | components: { |
| | | PersonnelInformation, |
| | | rewardPunishmentRecord, |
| | | trackRecord, |
| | | PersonnelCapacity, |
| | | TrainingRecord, |
| | | JobResponsibilities, |
| | | PersonnelTraining, |
| | | PersonnelList, |
| | | Plan, |
| | | Records, |
| | | Communicate, |
| | | Mandate |
| | | }, |
| | | watch: { |
| | | departId: { |
| | | handler(newId, oldId) { |
| | | if (newId) { |
| | | switch (this.activeName) { |
| | | case 'æ²éè®°å½': |
| | | this.$refs.communicateRef.getDepart(newId); |
| | | break; |
| | | case 'ä»»èææè®°å½': |
| | | this.$refs.manDateRef.getDepart(newId); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | activeName: '人ååºæ¬ä¿¡æ¯', |
| | | } |
| | | }, |
| | | methods:{ |
| | | updatePerson (row) { |
| | | this.$parent.updatePerson(row); |
| | | }, |
| | | refreshTree () { |
| | | this.$parent.refreshTree(); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .box { |
| | | height: calc(100vh - 11em); |
| | | } |
| | | |
| | | .el-tabs >>> .el-tabs--border-card { |
| | | box-shadow: unset; |
| | | border: unset; |
| | | } |
| | | |
| | | .flex_column { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :visible.sync="filesDialogVisible" title="éä»¶ä¸ä¼ " width="80%" @closed="closeFilesLook"> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <el-upload ref='upload' |
| | | :action="fileAction" |
| | | :auto-upload="true" |
| | | :before-upload="fileBeforeUpload" :data="{detailsEvaluateId: info.detailsEvaluateId}" |
| | | :headers="headers" :on-error="onError" |
| | | :on-success="handleSuccessUp" |
| | | :show-file-list="false" |
| | | accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' style="width: 80px !important;"> |
| | | <el-button size="small" style="height: 38px" type="primary">éä»¶ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | </div> |
| | | <div> |
| | | <ZTTable |
| | | ref="yearTable" |
| | | :column="columnData" |
| | | :height="'calc(100vh - 47em)'" |
| | | :highlightCurrentRow="true" |
| | | :table-data="tableData" |
| | | :table-loading="tableLoading" |
| | | style="margin-top: 0.5em;"> |
| | | </ZTTable> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | | :visible.sync="lookDialogVisible" |
| | | fullscreen |
| | | title="æ¥çéä»¶" width="800px"> |
| | | <filePreview v-if="lookDialogVisible" :currentFile="{}" |
| | | :fileUrl="javaApi+'/word/'+currentInfo.fileUrl" style="height: 90vh;overflow-y: auto;top: 0"/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ZTTable from '../../caorui/ZTTable/index.vue'; |
| | | import file from '../../../util/file'; |
| | | import filePreview from '../../tool/file-preview.vue'; |
| | | |
| | | export default { |
| | | name: 'ViewRecord', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { filePreview, ZTTable }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | filesDialogVisible: false, |
| | | tableLoading: false, |
| | | filesLookInfo: {}, |
| | | columnData: [ |
| | | { |
| | | label: 'æä»¶åç§°', |
| | | prop: 'fileName', |
| | | minWidth: '150px' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '100', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'é¢è§', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleLook(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.upload(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delete(row) |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | info: {}, |
| | | currentInfo:{}, |
| | | lookDialogVisible: false, |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(row) { |
| | | this.filesDialogVisible = true |
| | | this.info = row |
| | | this.searchTableList() |
| | | }, |
| | | // æ¥è¯¢éä»¶å表 |
| | | searchTableList () { |
| | | this.tableLoading = true |
| | | this.$axios.get(this.$api.qualityMonitor.getEvaluateFileList + '?detailsEvaluateId=' + this.info.detailsEvaluateId).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | closeFilesLook () { |
| | | this.filesDialogVisible = false |
| | | }, |
| | | // ä¸è½½ |
| | | upload (row) { |
| | | let url = ''; |
| | | if(row.type==1){ |
| | | url = this.javaApi+'/img/'+row.fileUrl |
| | | file.downloadIamge(url,row.fileName) |
| | | }else{ |
| | | url = this.javaApi+'/word/'+row.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | } |
| | | }, |
| | | // å é¤ |
| | | delete (row) { |
| | | this.tableLoading = true |
| | | this.$axios.get(this.$api.qualityMonitor.delVerifyEvaluateFileList + '?evaluateFileId=' + row.evaluateFileId).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.searchTableList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // ä¸ä¼ éªè¯ |
| | | fileBeforeUpload(file) { |
| | | let flag = true |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | flag = false |
| | | } |
| | | if (!flag) { |
| | | return Promise.reject(flag); //æ£ç¡®çç»æ¢ |
| | | } |
| | | }, |
| | | onError(err, file, fileList,type) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | handleSuccessUp(response, ) { |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.searchTableList() |
| | | } |
| | | }, |
| | | // æ¥çæä»¶ |
| | | handleLook(row){ |
| | | this.currentInfo = row |
| | | this.lookDialogVisible = true |
| | | }, |
| | | }, |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | fileAction() { |
| | | return this.javaApi + this.$api.qualityMonitor.uploadEvaluateFile |
| | | |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="formDia" |
| | | title="宿½" |
| | | width="60%" @close="closeCarryOutDia"> |
| | | <el-steps :active="currentStep" align-center finish-status="success"> |
| | | <el-step title="宿½"></el-step> |
| | | <el-step title="æ¹å"></el-step> |
| | | </el-steps> |
| | | <div style="height: 60vh;overflow-y: auto"> |
| | | <table border="1" cellspacing="10" class="tables"> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>çæ§é¡¹ç®ï¼</p> |
| | | </td> |
| | | <td colspan="3"> |
| | | <el-input v-if="currentStep == 0" v-model="form.monitorProject" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.monitorProject }}</span> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>çæ§æ¶é´ï¼</p> |
| | | </td> |
| | | <td colspan="3"> |
| | | <el-input v-if="currentStep == 0" v-model="form.monitorData" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info"> {{ form.monitorData }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="8"> |
| | | <div> |
| | | <p>çæ§ç®çï¼</p> |
| | | </div> |
| | | <div> |
| | | <el-input v-if="currentStep == 0" v-model="form.monitorPurpose" |
| | | :rows="3" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-else class="td-info2"> {{ form.monitorPurpose }}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="8"> |
| | | <div> |
| | | <p>çæ§æ¹æ³ï¼</p> |
| | | </div> |
| | | <div> |
| | | <el-input v-if="currentStep == 0" v-model="form.monitorMethod" |
| | | :rows="4" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-else class="td-info2"> {{ form.monitorMethod }}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="8"> |
| | | <div> |
| | | <p>åå 人åï¼</p> |
| | | </div> |
| | | <div> |
| | | <el-input v-if="currentStep == 0" v-model="form.participant" |
| | | :rows="3" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-else class="td-info2"> {{ form.participant }}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="8"> |
| | | <div> |
| | | <p>è¿ç¨æ§å¶ï¼</p> |
| | | </div> |
| | | <div> |
| | | <el-input v-if="currentStep == 0" v-model="form.processControl" |
| | | :rows="3" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-else class="td-info2"> {{ form.processControl }}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="8"> |
| | | <div> |
| | | <p>ç»æè¯ä»·æ åï¼å¦ä½è¯ä»·ï¼ï¼</p> |
| | | </div> |
| | | <div> |
| | | <el-input v-if="currentStep == 0" v-model="form.howEvaluate" |
| | | :rows="3" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-else class="td-info2"> {{ form.howEvaluate }}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="8"> |
| | | <div> |
| | | <p>ç»è´¹é¢ç®ï¼</p> |
| | | </div> |
| | | <div> |
| | | <el-input v-if="currentStep == 0" v-model="form.budget" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info2"> {{ form.budget }}</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="4"> |
| | | <div> |
| | | <p>æ£æµé¨é¨ï¼</p> |
| | | </div> |
| | | <div> |
| | | <el-input v-if="currentStep == 0" v-model="form.inspectionDepartment" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-else class="td-info2"> {{ form.inspectionDepartment }}</span> |
| | | </div> |
| | | </td> |
| | | <td colspan="4"> |
| | | <div v-if="currentStep == 0"> |
| | | <div>éæ©æ¹å人ï¼</div> |
| | | <div> |
| | | <el-select v-if="currentStep == 0" v-model="form.ratifyUserId" clearable |
| | | filterable |
| | | placeholder="è¯·éæ©" size="small"> |
| | | <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <span v-else class="td-info2"> {{ form.ratifyName }}</span> |
| | | </div> |
| | | </div> |
| | | <div v-else> |
| | | <div> |
| | | <p>æ¹åæè§ï¼</p> |
| | | </div> |
| | | <div> |
| | | <el-input v-if="currentStep == 1" v-model="form.ratifyOpinion" |
| | | :rows="3" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-if="currentStep == 2" class="td-info2"> {{ form.ratifyOpinion }}</span> |
| | | <span v-if="currentStep == 2" class="td-info3"> {{ 'æ¹å人ï¼' + form.ratifyName }}</span> |
| | | </div> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeCarryOutDia">å æ¶</el-button> |
| | | <el-button v-if="currentStep != 2" :loading="editLoad" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | export default { |
| | | name: 'carryOutDialog', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | currentStep: 0, |
| | | form: { |
| | | monitorProject: '', |
| | | monitorData: '', |
| | | monitorPurpose: '', |
| | | monitorMethod: '', |
| | | participant: '', |
| | | processControl: '', |
| | | howEvaluate: '', |
| | | budget: '', |
| | | inspectionDepartment: '', |
| | | ratifyUserId: '', |
| | | ratifyOpinion: '', |
| | | qualityMonitorDetailsId: '', |
| | | ratifyName: '', |
| | | }, |
| | | personList: [], |
| | | editLoad: false, |
| | | isCarryOut: false, // æ¯å¦ä¸ºå®æ½ |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(row) { |
| | | this.formDia = true |
| | | this.searchInfo(row) |
| | | this.getAuthorizedPerson() |
| | | }, |
| | | // æ¥è¯¢çæ§è®¡å详æ
宿½ä¿¡æ¯ |
| | | searchInfo (row) { |
| | | this.$axios.get(this.$api.qualityMonitor.getQualityMonitorRatify + '?qualityMonitorDetailsId=' + row.qualityMonitorDetailsId).then(res => { |
| | | if (res.code === 201) return |
| | | // ædetailsRatifyIdå说ææäº¤è¿å®æ½ä¿¡æ¯ |
| | | if (res.data.detailsRatifyId) { |
| | | // æ¯å¦ç»æ0:æªç»æ, 1:å·²ç»æ |
| | | if (res.data.isFinish == 0) { |
| | | this.currentStep = 1 |
| | | } else if (res.data.isFinish == 1) { |
| | | this.currentStep = 2 |
| | | } |
| | | } else { |
| | | this.currentStep = 0 |
| | | } |
| | | this.form = res.data |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // æäº¤ |
| | | handleEdit() { |
| | | this.editLoad = true |
| | | if (this.currentStep == 0) { |
| | | this.addInfo() |
| | | } else { |
| | | this.editInfo() |
| | | } |
| | | }, |
| | | // æäº¤å®æ½ |
| | | addInfo () { |
| | | this.$axios.post(this.$api.qualityMonitor.addQualityMonitorRatify, this.form, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeCarryOutDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | }, |
| | | // æäº¤æ¹å |
| | | editInfo () { |
| | | this.$axios.post(this.$api.qualityMonitor.addQualityMonitorRatifyOpinion, this.form, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeCarryOutDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeCarryOutDia () { |
| | | this.formDia = false |
| | | this.$emit('closeCarryOutDia') |
| | | }, |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.getUserMenu).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 20px auto 50px !important; |
| | | } |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | .td-title { |
| | | height: 40px; |
| | | width: 100px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 6px; |
| | | } |
| | | .td-info { |
| | | display: inline-block; |
| | | width: 100%; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | } |
| | | .td-info2 { |
| | | display: inline-block; |
| | | width: 90%; |
| | | text-align: left; |
| | | font-size: 16px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | margin-left: 20px; |
| | | } |
| | | .tables td { |
| | | height: 40px; |
| | | width: 100px; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 6px; |
| | | } |
| | | .td-info3 { |
| | | width: 90%; |
| | | display: inline-block; |
| | | text-align: right; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog title="ç¼è¾" :visible.sync="formDia" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | width="80%" @close="closeDia"> |
| | | <el-form :model="form" :rules="rules" ref="form" label-width="140px"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çæ§ç®ç" prop="monitorPurpose"> |
| | | <el-input v-model="form.monitorPurpose" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="计åå¼å±æ¶é´" prop="plannedTime"> |
| | | <el-input v-model="form.plannedTime" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çæ§é¡¹ç®" prop="monitorProject"> |
| | | <el-input v-model="form.monitorProject" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åå åä½ï¼äººåï¼" prop="participant"> |
| | | <el-input v-model="form.participant" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é¢ç®ï¼å
ï¼" prop="budget"> |
| | | <el-input v-model="form.budget" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»ç»äººå" prop="organization"> |
| | | <el-input v-model="form.organization" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çæ§æ¹å¼" prop="monitorWay"> |
| | | <el-input v-model="form.monitorWay" size="small" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeDia">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm" :loading="upLoad">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'detailFormDialog', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | props: ['qualityMonitorId'], |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | form: { |
| | | qualityMonitorDetailsId: '', |
| | | monitorPurpose: '', |
| | | plannedTime: '', |
| | | monitorProject: '', |
| | | participant: '', |
| | | budget: '', |
| | | organization: '', |
| | | monitorWay: '', |
| | | }, |
| | | rules: { |
| | | monitorPurpose: [{ required: true, message: '请è¾å
¥çæ§ç®ç', trigger: 'blur' }], |
| | | monitorProject: [{ required: true, message: '请è¾å
¥çæ§é¡¹ç®', trigger: 'blur' }], |
| | | }, |
| | | upLoad: false, |
| | | operationType: '', |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia(type, row) { |
| | | this.formDia = true |
| | | this.operationType = type |
| | | if (type === 'edit') { |
| | | this.searchInfo(row) |
| | | } |
| | | }, |
| | | searchInfo (row) { |
| | | this.form = {...row} |
| | | }, |
| | | // æäº¤è¡¨å |
| | | submitForm () { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | if (this.operationType === 'add') { |
| | | this.handleAdd() |
| | | } else { |
| | | this.handleEdit() |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // æäº¤æ°å¢ |
| | | handleAdd () { |
| | | let entity = this.HaveJson(this.form) |
| | | entity.qualityMonitorId = this.qualityMonitorId |
| | | this.upLoad = true |
| | | this.$axios.post(this.$api.qualityMonitor.addQualityMonitorDetail, entity, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.upLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æ°å¢æå') |
| | | this.closeDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.upLoad = false |
| | | }) |
| | | }, |
| | | // æäº¤ä¿®æ¹ |
| | | handleEdit () { |
| | | const entity = this.HaveJson(this.form) |
| | | this.upLoad = true |
| | | this.$axios.post(this.$api.qualityMonitor.updateQualityMonitorDetail, entity, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.upLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.closeDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.upLoad = false |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeDia () { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeDia') |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog__body { |
| | | max-height: 75vh; |
| | | overflow-y: auto; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="formDia" |
| | | title="è´¨éçæ§è¯ä»·" |
| | | width="60%" @close="closeEvaDia"> |
| | | <div style="text-align: right"> |
| | | <el-button size="small" type="primary" @click="viewTestRecord">éä»¶ä¸ä¼ </el-button> |
| | | </div> |
| | | <el-steps :active="currentStep" align-center finish-status="success"> |
| | | <el-step title="çæ§è®¡å宿½æ
åµ" @click.native="setStep(0)"></el-step> |
| | | <el-step title="çæ§ç»æè¯ä»·" @click.native="setStep(1)"></el-step> |
| | | <el-step title="è¯å®¡ç»è®ºï¼æ¯å¦éåæªæ½ï¼" @click.native="setStep(2)"></el-step> |
| | | </el-steps> |
| | | <div> |
| | | <table border="1" cellspacing="10" class="tables"> |
| | | <tr v-if="showStep === 0"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>è¯å®¡ç®çï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.reviewPurpose" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.reviewPurpose }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>è¯å®¡äººåï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.reviewUser" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.reviewUser }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>è¯å®¡æ¥æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.reviewTime" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.reviewTime }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0"> |
| | | <td class="td-title"> |
| | | <p><span class="required-span">* </span>çæ§è®¡å宿½æ
åµï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.implementCondition" |
| | | :rows="5" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.implementCondition }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 0"> |
| | | <td class="td-title"> |
| | | <p>宿½é¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <span> {{ form.implementDepartment }}</span> |
| | | </td> |
| | | <td v-if="currentStep === 0" class="td-title"> |
| | | <p>è¯·éæ©ä¸ä¸æ¥è´è´£äººï¼</p> |
| | | </td> |
| | | <td v-if="currentStep === 0" class="td-info"> |
| | | <el-select v-model="form.implementUserId" clearable filterable |
| | | placeholder="è¯·éæ©" size="small"> |
| | | <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 1"> |
| | | <td class="td-title"> |
| | | <p>çæ§ç»æè¯ä»·ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="4"> |
| | | <el-input v-if="showStep === 1 && currentStep === 1" v-model="form.implementResult" |
| | | :rows="5" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 1 && currentStep !== 1" class="td-info1"> {{ form.implementResult }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 1"> |
| | | <td class="td-title"> |
| | | <p>å½åè´è´£äººï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="4"> |
| | | {{form.implementName}} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 1"> |
| | | <td v-if="currentStep === 1" class="td-title"> |
| | | <p>è¯·éæ©ä¸ä¸æ¥è´è´£äººï¼</p> |
| | | </td> |
| | | <td v-if="currentStep === 1" class="td-info" colspan="4"> |
| | | <el-select v-model="form.ratifyUserId" clearable filterable |
| | | placeholder="è¯·éæ©" size="small"> |
| | | <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2"> |
| | | <td class="td-title"> |
| | | <p>è¯å®¡ç»è®ºï¼æ¯å¦éåæªæ½ï¼ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="4"> |
| | | <el-input v-if="showStep === 2 && currentStep === 2" v-model="form.ratifyOpinion" |
| | | :rows="5" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | <span v-if="showStep === 2 && currentStep !== 2" class="td-info1"> {{ form.ratifyOpinion }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2"> |
| | | <td class="td-title"> |
| | | <p>å½åè´è´£äººï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="4"> |
| | | {{form.ratifyUserName}} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="showStep === 2"> |
| | | <td class="td-title"> |
| | | <p>å®¡æ¹æ¥æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="4"> |
| | | {{form.ratifyTime}} |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeEvaDia">å æ¶</el-button> |
| | | <el-button v-if="currentStep !== 3" :loading="editLoad" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <view-record v-if="ViewRecord" ref="ViewRecord"></view-record> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ViewRecord from '../a7-Ensure-results-validity/ViewRecord.vue'; |
| | | |
| | | export default { |
| | | name: 'evaluateDialog', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { ViewRecord }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | currentStep: 0, |
| | | showStep: 0, |
| | | form: { |
| | | implementDepartment: '', |
| | | reviewPurpose: '', |
| | | reviewUser: '', |
| | | reviewTime: '', |
| | | implementCondition: '', |
| | | implementName: '', |
| | | implementUserId: '', |
| | | implementResult: '', |
| | | ratifyUserName: '', |
| | | ratifyUserId: '', |
| | | ratifyOpinion: '', |
| | | qualityMonitorDetailsId: '', |
| | | ratifyTime: '', |
| | | detailsEvaluateId: '', |
| | | }, |
| | | editLoad: false, |
| | | personList: [], |
| | | ViewRecord: false, |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia (row) { |
| | | this.formDia = true |
| | | this.searchInfo(row) |
| | | this.getAuthorizedPerson() |
| | | this.getDepartment() |
| | | }, |
| | | // æ¥è¯¢çæ§è®¡å详æ
宿½ä¿¡æ¯ |
| | | searchInfo (row) { |
| | | this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId |
| | | this.$axios.get(this.$api.qualityMonitor.getQualityMonitorEvaluate + '?qualityMonitorDetailsId=' + row.qualityMonitorDetailsId).then(res => { |
| | | if (res.code === 201) return |
| | | if (res.data === null) { |
| | | this.showStep = 0 |
| | | this.currentStep = 0 |
| | | } else { |
| | | this.form = res.data |
| | | if (res.data.isFinish === 0) { |
| | | if (res.data.implementUserId && !res.data.ratifyUserId) { |
| | | this.showStep = 1 |
| | | this.currentStep = 1 |
| | | } else if (res.data.implementUserId && res.data.ratifyUserId) { |
| | | this.showStep = 2 |
| | | this.currentStep = 2 |
| | | } |
| | | } else { |
| | | this.currentStep = 3 |
| | | this.showStep = 2 |
| | | } |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // æäº¤ |
| | | handleEdit () { |
| | | if (this.currentStep === 2) { |
| | | this.$axios.post(this.$api.qualityMonitor.addMonitorEvaluateOpinion, this.form, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeEvaDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | } else { |
| | | if (!this.form.reviewPurpose) { |
| | | this.$message.warning('请填åè¯å®¡ç®ç') |
| | | return |
| | | } |
| | | if (!this.form.reviewUser) { |
| | | this.$message.warning('请填åè¯å®¡äººå') |
| | | return |
| | | } |
| | | if (!this.form.reviewTime) { |
| | | this.$message.warning('请填åè¯å®¡æ¥æ') |
| | | return |
| | | } |
| | | if (!this.form.implementCondition) { |
| | | this.$message.warning('请填åçæ§è®¡å宿½æ
åµ') |
| | | return |
| | | } |
| | | if (!this.form.implementUserId) { |
| | | this.$message.warning('è¯·éæ©ä¸ä¸æ¥è´è´£äºº') |
| | | return |
| | | } |
| | | if (this.currentStep === 1) { |
| | | if (!this.form.ratifyUserId) { |
| | | this.$message.warning('è¯·éæ©ä¸ä¸æ¥è´è´£äºº') |
| | | return |
| | | } |
| | | } |
| | | this.$axios.post(this.$api.qualityMonitor.addQualityMonitorEvaluate, this.form, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeEvaDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | } |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeEvaDia () { |
| | | this.formDia = false |
| | | this.$emit('closeEvaDia') |
| | | }, |
| | | setStep (step) { |
| | | this.showStep = step |
| | | }, |
| | | viewTestRecord () { |
| | | this.ViewRecord = true |
| | | this.$nextTick(() => { |
| | | this.$refs.ViewRecord.openDia( this.form) |
| | | }) |
| | | }, |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.getUserMenu).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | getDepartment() { |
| | | this.$axios.get(this.$api.user.selectUserDepartmentLimsName).then(res => { |
| | | if (res.code === 201) return |
| | | this.form.implementDepartment = res.data |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | .td-title { |
| | | height: 40px; |
| | | width: 170px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 6px; |
| | | } |
| | | .td-info { |
| | | padding: 6px; |
| | | } |
| | | .td-info1 { |
| | | display: inline-block; |
| | | width: 100%; |
| | | text-align: left; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- 7.7è´¨éçæ§è®¡å--> |
| | | <div> |
| | | <div class="table-card"> |
| | | <TableCard title="年度计å表"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <span>计ååç§°ï¼</span> |
| | | <el-input v-model="yearForm.monitorName" class="search" placeholder="请è¾å
¥" |
| | | size="small"></el-input> |
| | | <el-button size="small" type="primary" @click="getYearPlanList">æ¥è¯¢</el-button> |
| | | <el-button size="small" @click="clearYear">éç½®</el-button> |
| | | </div> |
| | | <div> |
| | | <el-upload ref='upload' :action="action" |
| | | :before-upload="beforeUpload" :headers="headers" :on-error="onError" |
| | | :on-success="handleSuccessUp" :show-file-list="false" accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'> |
| | | <el-button :loading="upLoading" size="small" type="primary">导å
¥</el-button> |
| | | </el-upload> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <ZTTable |
| | | ref="yearTable" |
| | | :column="yearColumnData" |
| | | :height="'25vh'" |
| | | :highlightCurrentRow="true" |
| | | :rowClick="rowClick" |
| | | :table-data="yearTableData" |
| | | :table-loading="yearLoading" |
| | | style="margin-top: 0.5em;padding: 0 15px;" |
| | | > |
| | | </ZTTable> |
| | | <el-divider></el-divider> |
| | | <!-- å页 --> |
| | | <div class="pagination"> |
| | | <div></div> |
| | | <el-pagination :page-size="yearPage.size" :page-sizes="[10, 20, 30, 40]" |
| | | :total="yearPage.total" layout="total, sizes, prev, pager, next, jumper" |
| | | @current-change="handleYearCurrent" @size-change="handleYearSizeChange"> |
| | | </el-pagination> |
| | | </div> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <div class="table-card"> |
| | | <TableCard title="年度计åæç»è¡¨"> |
| | | <template v-slot:form> |
| | | <div class="items_center"> |
| | | <span>çæ§ç®çï¼</span> |
| | | <el-input v-model="yearDetailForm.monitorPurpose" class="search" placeholder="请è¾å
¥" size="small"></el-input> |
| | | <span>çæ§é¡¹ç®ï¼</span> |
| | | <el-input v-model="yearDetailForm.monitorProject" class="search" placeholder="请è¾å
¥" size="small"></el-input> |
| | | <el-button size="small" type="primary" @click="getYearDetailPlanList">æ¥è¯¢</el-button> |
| | | <el-button size="small" @click="clearDetail">éç½®</el-button> |
| | | </div> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="showDialog('add')">æ°å¢</el-button> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <ZTTable :column="yearDetailColumnData" :height="'25vh'" :table-data="yearDetailTableData" |
| | | :table-loading="yearDetailLoading" style="margin-top: 18px; padding: 0 15px;"> |
| | | </ZTTable> |
| | | <el-divider></el-divider> |
| | | <!-- å页 --> |
| | | <div class="pagination"> |
| | | <div></div> |
| | | <el-pagination :page-size="yearDetailPage.size" :page-sizes="[10, 20, 30, 40]" |
| | | :total="yearDetailPage.total" layout="total, sizes, prev, pager, next, jumper" |
| | | @current-change="handleYearDetailCurrent" @size-change="handleYearDetailSizeChange"> |
| | | </el-pagination> |
| | | </div> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | <!--æ°å¢ä¿®æ¹å¼¹æ¡--> |
| | | <detail-form-dialog v-if="formDia" ref="formDia" :qualityMonitorId="qualityMonitorId" @closeDia="closeDia"></detail-form-dialog> |
| | | <!--宿½æµç¨å¼¹æ¡--> |
| | | <carry-out-dialog v-if="carryOutDia" ref="carryOutDia" :qualityMonitorId="qualityMonitorId" @closeDia="closeCarryOutDia"></carry-out-dialog> |
| | | <!--è¯ä»·æµç¨å¼¹æ¡--> |
| | | <evaluate-dialog v-if="evaluateDialog" ref="evaluateDialog" @closeEvaDia="closeEvaDia"></evaluate-dialog> |
| | | <el-dialog :visible.sync="examineDialog" title="å®¡æ ¸" width="30%" @close="closeExamineDia"> |
| | | <span> |
| | | å®¡æ ¸å¤æ³¨ï¼ |
| | | <el-input v-model="examineInfo.examineRemark" type="textarea"></el-input> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button :loading="examineLoading" @click="handleReview(0)">ä¸éè¿</el-button> |
| | | <el-button :loading="examineLoading" type="primary" @click="handleReview(1)">é è¿</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="ratifyDialog" title="æ¹å" width="30%" @close="closeRatifyDia"> |
| | | <span> |
| | | æ¹å夿³¨ï¼ |
| | | <el-input v-model="ratifyInfo.ratifyRemark" type="textarea"></el-input> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button :loading="ratifyLoading" @click="handleRatify(0)">䏿¹å</el-button> |
| | | <el-button :loading="ratifyLoading" type="primary" @click="handleRatify(1)">æ¹ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import UploadExcel from '../caorui/Department/components/Plan/UploadExcel.vue'; |
| | | import TableCard from '../caorui/TableCard/index.vue'; |
| | | import ZTTable from '../caorui/ZTTable/index.vue'; |
| | | import DetailFormDialog from '../do/a7-Ensure-results-validity/detailFormDialog.vue'; |
| | | import CarryOutDialog from '../do/a7-Ensure-results-validity/carryOutDialog.vue'; |
| | | import EvaluateDialog from '../do/a7-Ensure-results-validity/evaluateDialog.vue'; |
| | | import fileDownload from "../../util/file"; |
| | | |
| | | export default { |
| | | name: 'a7-Ensure-results-validity', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { EvaluateDialog, CarryOutDialog, DetailFormDialog, ZTTable, TableCard, UploadExcel }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | yearForm: { |
| | | monitorName: '', |
| | | }, |
| | | yearPage: { |
| | | current: 1, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | yearColumnData: [ |
| | | { |
| | | label: '计ååç§°', |
| | | prop: 'monitorName', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: 'ç¼å¶äºº', |
| | | prop: 'writeName', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'ç¼å¶æ¥æ', |
| | | prop: 'writeTime', |
| | | minWidth: '160' |
| | | }, { |
| | | dataType: 'tag', |
| | | label: 'å®¡æ ¸ç¶æ', |
| | | prop: 'examineStatus', |
| | | minWidth: '100', |
| | | formatData: (params) => { |
| | | if (params === 0) { |
| | | return 'ä¸éè¿'; |
| | | } else if (params === 1) { |
| | | return 'éè¿'; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params === 0) { |
| | | return 'danger'; |
| | | } else if (params === 1) { |
| | | return 'success'; |
| | | } else { |
| | | return null; |
| | | } |
| | | } |
| | | }, { |
| | | label: 'å®¡æ ¸å
容', |
| | | prop: 'examineRemark', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'å®¡æ ¸äºº', |
| | | prop: 'examineName', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'å®¡æ ¸æ¥æ', |
| | | prop: 'examineTime', |
| | | minWidth: '160' |
| | | },{ |
| | | dataType: 'tag', |
| | | label: 'æ¹åç¶æ', |
| | | prop: 'ratifyStatus', |
| | | minWidth: '100', |
| | | formatData: (params) => { |
| | | if (params === 0) { |
| | | return '䏿¹å'; |
| | | } else if (params === 1) { |
| | | return 'æ¹å'; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params === 0) { |
| | | return 'danger'; |
| | | } else if (params === 1) { |
| | | return 'success'; |
| | | } else { |
| | | return null; |
| | | } |
| | | } |
| | | },{ |
| | | label: 'æ¹åå
容', |
| | | prop: 'ratifyRemark', |
| | | minWidth: '100' |
| | | },{ |
| | | label: 'æ¹å人', |
| | | prop: 'ratifyName', |
| | | minWidth: '100' |
| | | },{ |
| | | label: 'æ¹åæ¥æ', |
| | | prop: 'ratifyTime', |
| | | minWidth: '160' |
| | | }, { |
| | | label: 'åå»ºæ¥æ', |
| | | prop: 'createTime', |
| | | minWidth: '160' |
| | | }, { |
| | | label: 'å建人', |
| | | prop: 'createUser', |
| | | minWidth: '100' |
| | | }, { |
| | | dataType: 'action', |
| | | minWidth: '200', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'å®¡æ ¸', |
| | | type: 'text', |
| | | disabled: (row) => { |
| | | if (row.examineStatus === 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | clickFun: (row) => { |
| | | this.examinePlan(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'æ¹å', |
| | | type: 'text', |
| | | disabled: (row) => { |
| | | if (row.ratifyStatus === 1 || row.examineStatus !== 1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | clickFun: (row) => { |
| | | this.approvalPlan(row) |
| | | } |
| | | }, |
| | | { |
| | | name: '导åº', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | } |
| | | } |
| | | ] |
| | | }], |
| | | yearTableData: [], // 年表 |
| | | yearLoading: false, |
| | | yearDetailForm: { |
| | | monitorPurpose: '', |
| | | monitorProject: '' |
| | | }, |
| | | yearDetailColumnData: [ |
| | | { |
| | | label: 'çæ§ç®ç', |
| | | prop: 'monitorPurpose', |
| | | width: '150px', |
| | | showOverflowTooltip: true, |
| | | }, { |
| | | label: '计åå¼å±æ¶é´', |
| | | prop: 'plannedTime', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: 'çæ§é¡¹ç®', |
| | | prop: 'monitorProject', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: 'åå åä½ï¼äººåï¼', |
| | | prop: 'participant', |
| | | minWidth: '150px' |
| | | }, { |
| | | label: 'é¢ç®ï¼å
ï¼', |
| | | prop: 'budget', |
| | | minWidth: '150px' |
| | | },{ |
| | | label: 'ç»ç»äººå', |
| | | prop: 'organization', |
| | | minWidth: '150px' |
| | | },{ |
| | | label: 'çæ§æ¹å¼', |
| | | prop: 'monitorWay', |
| | | minWidth: '150px' |
| | | }, { |
| | | dataType: 'action', |
| | | width: '180', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.showDialog('edit', row) |
| | | } |
| | | }, |
| | | { |
| | | name: '宿½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.carryOut(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'è¯ä»·', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.evaluate(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delYearPlanDetail(row) |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | yearDetailTableData: [], // å¹´æç»è¡¨ |
| | | yearDetailLoading: false, |
| | | yearDetailPage: { |
| | | current: 1, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | formDia: false, |
| | | qualityMonitorId: '', |
| | | carryOutDia: false, |
| | | evaluateDialog: false, |
| | | examineDialog: false, |
| | | examineLoading: false, |
| | | ratifyDialog: false, |
| | | ratifyLoading: false, |
| | | examineInfo: {}, |
| | | ratifyInfo: {}, |
| | | upLoading: false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.getYearPlanList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å¹´åº¦è®¡å表 |
| | | getYearPlanList () { |
| | | const entity = { |
| | | monitorName: this.yearForm.monitorName, |
| | | } |
| | | const page = this.yearPage |
| | | this.yearLoading = true |
| | | this.$axios.post(this.$api.qualityMonitor.pageQualityMonitor, { entity, page }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.yearLoading = false |
| | | if (res.code === 201) return |
| | | this.yearTableData = res.data.records |
| | | this.yearPage.total = res.data.total |
| | | if (this.yearTableData.length > 0) { |
| | | this.rowClick(this.yearTableData[0]) |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.yearLoading = false |
| | | }) |
| | | }, |
| | | clearYear () { |
| | | this.yearForm.monitorName = '' |
| | | this.getYearPlanList() |
| | | }, |
| | | // 导å
¥æµç¨ |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } else { |
| | | this.upLoading = true; |
| | | return true; |
| | | } |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | handleSuccessUp(response) { |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.getYearPlanList() |
| | | } |
| | | }, |
| | | // å®¡æ ¸ |
| | | examinePlan (row) { |
| | | this.examineDialog = true |
| | | this.examineInfo = row |
| | | }, |
| | | handleReview (examineStatus) { |
| | | // å®¡æ ¸ç¶æ , 0 ä¸éè¿, 1éè¿ |
| | | this.examineInfo.examineStatus = examineStatus |
| | | this.examineLoading = true |
| | | this.$axios.post(this.$api.qualityMonitor.examineQualityMonitor, this.examineInfo, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.examineLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeExamineDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.examineLoading = false |
| | | }) |
| | | }, |
| | | closeExamineDia () { |
| | | this.examineDialog = false |
| | | this.examineInfo.examineRemark = '' |
| | | this.getYearPlanList() |
| | | }, |
| | | // æ¹å |
| | | approvalPlan (row) { |
| | | this.ratifyDialog = true |
| | | this.ratifyInfo = row |
| | | }, |
| | | handleRatify (ratifyStatus) { |
| | | // æ¹åç¶æ , 0 ä¸éè¿, 1éè¿ |
| | | this.ratifyInfo.ratifyStatus = ratifyStatus |
| | | this.ratifyLoading = true |
| | | this.$axios.post(this.$api.qualityMonitor.ratifyQualityMonitor, this.ratifyInfo, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.ratifyLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeRatifyDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.ratifyLoading = false |
| | | }) |
| | | }, |
| | | closeRatifyDia () { |
| | | this.ratifyDialog = false |
| | | this.ratifyInfo.ratifyRemark = '' |
| | | this.getYearPlanList() |
| | | }, |
| | | // å¯¼åº |
| | | handleDown (row) { |
| | | this.$axios.get(this.$api.qualityMonitor.exportQualityMonitorDetail + '?qualityMonitorId=' + row.qualityMonitorId,{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.monitorName + '.docx'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | // å é¤è¿åº¦è®¡å表 |
| | | delPlan (row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.yearLoading = true |
| | | this.$axios.get(this.$api.qualityMonitor.delQualitySupervise + '?qualityMonitorId=' + row.qualityMonitorId).then(res => { |
| | | this.yearLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.getYearPlanList() |
| | | }).catch(err => { |
| | | this.yearLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // 年度计åè¡¨æ ¼ï¼ç¹å»è¡æ°æ®åå·æ°è¯¦æ
|
| | | rowClick(row) { |
| | | this.qualityMonitorId = row.qualityMonitorId |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // è·å年度æç»è¡¨ |
| | | getYearDetailPlanList () { |
| | | const entity = { |
| | | qualityMonitorId: this.qualityMonitorId, |
| | | monitorPurpose: this.yearDetailForm.monitorPurpose, |
| | | monitorProject: this.yearDetailForm.monitorProject, |
| | | } |
| | | const page = this.yearDetailPage |
| | | this.yearDetailLoading = true |
| | | this.$axios.post(this.$api.qualityMonitor.pageQualityMonitorDetail, { entity, page }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.yearDetailLoading = false |
| | | if (res.code === 201) return |
| | | this.yearDetailTableData = res.data.records |
| | | this.yearDetailPage.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.yearDetailLoading = false |
| | | }) |
| | | }, |
| | | // éç½®æç»è¡¨ |
| | | clearDetail () { |
| | | this.yearDetailForm = { |
| | | monitorPurpose: '', |
| | | monitorProject: '' |
| | | } |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // æç»è¡¨å®æ½ |
| | | carryOut (row) { |
| | | this.carryOutDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.carryOutDia.openDia(row) |
| | | }) |
| | | }, |
| | | closeCarryOutDia () { |
| | | this.carryOutDia = false |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // æå¼è¯ä»·å¼¹æ¡ |
| | | evaluate (row) { |
| | | this.evaluateDialog = true |
| | | this.$nextTick(() => { |
| | | this.$refs.evaluateDialog.openDia(row) |
| | | }) |
| | | }, |
| | | closeEvaDia () { |
| | | this.evaluateDialog = false |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | // æå¼å¹´åº¦æç»æ°å¢ãä¿®æ¹å¼¹æ¡ |
| | | showDialog (type, row) { |
| | | this.formDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.formDia.openDia(type, row) |
| | | }) |
| | | }, |
| | | closeDia () { |
| | | this.formDia = false |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | delYearPlanDetail (row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.yearDetailLoading = true |
| | | this.$axios.get(this.$api.qualityMonitor.delQualityMonitorDetail + '?qualityMonitorDetailsId=' + row.qualityMonitorDetailsId).then(res => { |
| | | this.yearDetailLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.getYearDetailPlanList() |
| | | }).catch(err => { |
| | | this.yearDetailLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }) |
| | | }, |
| | | // 年计åå页 |
| | | handleYearCurrent(page) { |
| | | this.yearPage.current = page |
| | | this.getYearPlanList() |
| | | }, |
| | | handleYearSizeChange(size) { |
| | | this.yearPage.size = size |
| | | this.getYearPlanList() |
| | | }, |
| | | // å¹´æç»è®¡åå页 |
| | | handleYearDetailCurrent(page) { |
| | | this.yearDetailPage.current = page |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | handleYearDetailSizeChange(size) { |
| | | this.yearDetailPage.size = size |
| | | this.getYearDetailPlanList() |
| | | }, |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | action() { |
| | | return this.javaApi + this.$api.qualityMonitor.importQualityMonitor |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .table-card { |
| | | background-color: #ffffff; |
| | | } |
| | | .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; |
| | | padding: 0 16px; |
| | | } |
| | | </style> |