| | |
| | | processTotaldeal, |
| | | processEvaluate, |
| | | qualityMonitor, |
| | | measuresAddressRisksOpportunities, |
| | | } |
| | | } |
| | | |
| | |
| | | importQualityMonitor:'/qualityMonitor/importQualityMonitor', // 导å
¥çæ§è®¡å |
| | | exportQualityMonitorDetail:'/qualityMonitor/exportQualityMonitorDetail', // 导åºçæ§è®¡å |
| | | } |
| | | |
| | | // 8.5 åºå¯¹é£é©åæºéçæªæ½ |
| | | const measuresAddressRisksOpportunities = { |
| | | getPageList: '/manageControlPlanList/getPageList', // é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å å页 |
| | | approvalOfControlPlanChecklist: "/manageControlPlanList/approvalOfControlPlanChecklist", // é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å æ¹å |
| | | riskAnalysisApprovalOfControlPlanChecklist: "/manageControlPlanList/riskAnalysisApprovalOfControlPlanChecklist", // é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å å®¡æ ¸ |
| | | importControlPlanList: "/manageControlPlanList/importControlPlanList", // é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å 导å
¥ |
| | | analysisOfMajorRiskFactorsAdded: "/manageControlPlanList/analysisOfMajorRiskFactorsAdded", // é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å æ°å¢ |
| | | deleteSignificantRiskFactorAnalysis: "/manageControlPlanList/deleteSignificantRiskFactorAnalysis", // é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å å é¤ |
| | | getPageResults: "/manageRiskAssessmentResults/getPageResults", // å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§ å页 |
| | | hazardIdentificationAndRiskApproval: "/manageRiskAssessmentResults/hazardIdentificationAndRiskApproval", // å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§ æ¹å |
| | | dangerousRiskApproval: "/manageRiskAssessmentResults/dangerousRiskApproval", // å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§ å®¡æ¹ |
| | | riskAssessmentImport: "manageRiskAssessmentResults/riskAssessmentImport", // å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§ 导å
¥ |
| | | addNewRiskFactors: "/manageRiskAssessmentResults/addNewRiskFactors", // å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§ æ°å¢ |
| | | removeRiskFactors: "/manageRiskAssessmentResults/removeRiskFactors", // å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§ å é¤ |
| | | exportHazardFactorIdentification: "/manageRiskAssessmentResults/exportHazardFactorIdentification", // å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§ å¯¼åº |
| | | exportSignificantRiskFactors: "/manageControlPlanList/exportSignificantRiskFactors", // é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å å¯¼åº |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div style="padding: 10px"> |
| | | <div class="header"> |
| | | <div>å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§</div> |
| | | <div style="min-width: 200px"> |
| | | <el-button type="primary" size="small" @click="addFun">æ° å¢</el-button> |
| | | <el-button type="primary" size="small" @click="approvalFun">审 æ¹</el-button> |
| | | <el-button type="primary" size="small" @click="approveFun">æ¹ å</el-button> |
| | | <el-upload |
| | | style="display: inline-block; padding: 0 6px" |
| | | :headers="headers" |
| | | :action="action" |
| | | :on-error="onError" |
| | | :show-file-list="false" |
| | | :on-success="onSuccess"> |
| | | <el-button size="small" type="primary">导 å
¥</el-button> |
| | | </el-upload> |
| | | <el-button size="small" @click="openDownloadDia">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | height="calc(100vh - 18em)"> |
| | | <el-table-column type="index" label="åºå·" width="120"> |
| | | <template v-slot="scope"> |
| | | <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="venue" label="å°ç¹/æ´»å¨" min-width="180"></el-table-column> |
| | | <el-table-column prop="hazard" label="å±é©å ç´ " width="testDate" min-width="180"></el-table-column> |
| | | <el-table-column prop="accidents" label="å¯è½å¯¼è´çäºæ
" min-width="180"></el-table-column> |
| | | <el-table-column prop="injury" label="对人å¯è½é æçå±å®³" min-width="180"></el-table-column> |
| | | <el-table-column label="é£é©è¯ä»·" align="center" min-width="180"> |
| | | <template> |
| | | <el-table-column prop="riskL" label="L" min-width="80"></el-table-column> |
| | | <el-table-column prop="riskE" label="E" min-width="80"></el-table-column> |
| | | <el-table-column prop="riskC" label="C" min-width="80"></el-table-column> |
| | | <el-table-column prop="riskD" label="D" min-width="80"></el-table-column> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="level" label="é£é©ç级" min-width="180"></el-table-column> |
| | | <el-table-column prop="measures" label="æ§å¶æªæ½" min-width="180"></el-table-column> |
| | | <el-table-column prop="editorName" label="ç¼å¶äººå§å" min-width="180"></el-table-column> |
| | | <el-table-column prop="editorDate" label="ç¼å¶æ¥æ" min-width="180"></el-table-column> |
| | | <el-table-column prop="approvalName" label="审æ¹äººå§å" min-width="180"></el-table-column> |
| | | <el-table-column prop="approvalDate" label="å®¡æ¹æ¥æ" min-width="180"></el-table-column> |
| | | <el-table-column prop="approvalStatus" label="审æ¹ç¶æ" min-width="180"> |
| | | <template #default="{ row }"> |
| | | {{ row.approvalStatus === 1 ? 'éè¿' : row.approvalStatus === 2 ? 'ä¸éè¿' : '' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="approveName" label="æ¹å人å§å" min-width="180"></el-table-column> |
| | | <el-table-column prop="approveStatus" label="æ¹åç¶æ" min-width="180"> |
| | | <template #default="{ row }"> |
| | | {{ row.approveStatus === 1 ? 'éè¿' : row.approveStatus === 2 ? 'ä¸éè¿' : '' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="approveDate" label="æ¹åæ¥æ" min-width="180"></el-table-column> |
| | | <el-table-column |
| | | fixed="right" |
| | | label="æä½" |
| | | width="100"> |
| | | <template v-slot="scope"> |
| | | <el-button @click="deleteClick(scope.row)" type="text" size="small">å é¤</el-button> |
| | | <el-button type="text" size="small" @click="editClick(scope.row)">ç¼è¾</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | <el-dialog |
| | | title="æç¤º" |
| | | :visible.sync="dialogVisible" |
| | | width="50%"> |
| | | <el-form ref="form" :model="form" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å°ç¹/æ´»å¨"> |
| | | <el-input v-model="form.venue" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å±é©å ç´ "> |
| | | <el-input v-model="form.hazard" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¯è½å¯¼è´çäºæ
"> |
| | | <el-input v-model="form.accidents" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="对人å¯è½é æçå±å®³" label-width="140px"> |
| | | <el-input v-model="form.injury" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é£é©è¯ä»·/L"> |
| | | <el-input v-model="form.riskL" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é£é©è¯ä»·/E"> |
| | | <el-input v-model="form.riskE" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é£é©è¯ä»·/C"> |
| | | <el-input v-model="form.riskC" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é£é©è¯ä»·/D"> |
| | | <el-input v-model="form.riskD" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é£é©ç级"> |
| | | <el-input v-model="form.level" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ§å¶æªæ½"> |
| | | <el-input v-model="form.measures" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="addApi" :loading="loading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | form: {}, |
| | | search: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0 |
| | | }, |
| | | tableData: [], |
| | | loading: false |
| | | } |
| | | }, |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | action() { |
| | | return this.javaApi + this.$api.measuresAddressRisksOpportunities.riskAssessmentImport |
| | | } |
| | | }, |
| | | methods: { |
| | | handleSizeChange(val) { |
| | | this.search.size = val; |
| | | this.initData(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.current = val; |
| | | this.initData(); |
| | | }, |
| | | // åé¡µè¡¨æ ¼åå§å |
| | | initData() { |
| | | this.tableData = [] |
| | | this.$axios.get(this.$api.measuresAddressRisksOpportunities.getPageResults + '?size=' + this.search.size + '¤t=' + this.search.current).then(res => { |
| | | if (res.code === 201) return; |
| | | this.tableData = res.data.records; |
| | | this.search.total = res.data.total; |
| | | }); |
| | | }, |
| | | // å®¡æ¹ |
| | | approvalFun() { |
| | | let user = JSON.parse(localStorage.getItem('user')) |
| | | this.$confirm('æ¯å¦å®¡æ¹éè¿?', 'æç¤º', { |
| | | confirmButtonText: 'éè¿', |
| | | cancelButtonText: 'ä¸éè¿', |
| | | type: 'warning', |
| | | closeOnClickModal: false, // ç¦æ¢ç¹å»é®ç½©å±å
³é |
| | | distinguishCancelAndClose: true, |
| | | beforeClose: (action, instance, done) => { |
| | | if (action === 'confirm') { |
| | | this.approvalApi(user.userId, 1) |
| | | done(); |
| | | } else if (action === 'cancel') { |
| | | this.approvalApi(user.userId, 2) |
| | | done(); |
| | | } else if (action === 'close') { |
| | | // ç¹å»âÃâæé®ï¼ä¸å
许å
³é |
| | | done(); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // å®¡æ¹æ¥å£ |
| | | approvalApi(userId, status) { |
| | | this.$axios.get(this.$api.measuresAddressRisksOpportunities.dangerousRiskApproval + '?approval=' + userId + '&status=' + status).then(res => { |
| | | if (res.code === 201) return; |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }); |
| | | }, |
| | | // æ¹å |
| | | approveFun() { |
| | | let user = JSON.parse(localStorage.getItem('user')) |
| | | this.$confirm('æ¯å¦æ¹åéè¿?', 'æç¤º', { |
| | | confirmButtonText: 'éè¿', |
| | | cancelButtonText: 'ä¸éè¿', |
| | | type: 'warning', |
| | | closeOnClickModal: false, // ç¦æ¢ç¹å»é®ç½©å±å
³é |
| | | distinguishCancelAndClose: true, |
| | | beforeClose: (action, instance, done) => { |
| | | if (action === 'confirm') { |
| | | this.approveApi(user.userId, 1) |
| | | done(); |
| | | } else if (action === 'cancel') { |
| | | this.approveApi(user.userId, 2) |
| | | done(); |
| | | } else if (action === 'close') { |
| | | // ç¹å»âÃâæé®ï¼ä¸å
许å
³é |
| | | done(); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // æ¹åæ¥å£ |
| | | approveApi(userId, status) { |
| | | this.$axios.get(this.$api.measuresAddressRisksOpportunities.hazardIdentificationAndRiskApproval + '?approve=' + userId + '&status=' + status).then(res => { |
| | | if (res.code === 201) return; |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }); |
| | | }, |
| | | // æä»¶ä¸ä¼ 失败 |
| | | onError() { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'æä½å¤±è´¥!' |
| | | }); |
| | | }, |
| | | // æä»¶ä¸ä¼ æå |
| | | onSuccess(response) { |
| | | if (response.code == 201) { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: response.message, |
| | | }); |
| | | return |
| | | } |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }, |
| | | addFun() { |
| | | this.dialogVisible = true |
| | | }, |
| | | // å é¤ |
| | | deleteClick(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.get(this.$api.measuresAddressRisksOpportunities.removeRiskFactors + "?id=" + row.id).then(res => { |
| | | if (res.code === 201) return; |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | addApi() { |
| | | this.loading = true |
| | | this.$axios.post(this.$api.measuresAddressRisksOpportunities.addNewRiskFactors, this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 201) return; |
| | | this.dialogVisible = false |
| | | this.loading = false |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }).catch(err => { |
| | | this.loading = false |
| | | }); |
| | | }, |
| | | // ç¼è¾ |
| | | editClick(row) { |
| | | this.form = {...row} |
| | | this.dialogVisible = true |
| | | }, |
| | | // å¯¼åº |
| | | openDownloadDia () { |
| | | this.$axios.get( this.$api.measuresAddressRisksOpportunities.exportHazardFactorIdentification,{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(); |
| | | }) |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.initData() |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .header { |
| | | height: 3em; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div style="padding: 10px"> |
| | | <div class="header"> |
| | | <div>é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å</div> |
| | | <div style="min-width: 200px"> |
| | | <el-button type="primary" size="small" @click="addFun">æ° å¢</el-button> |
| | | <el-button type="primary" size="small" @click="approvalFun">审 æ¹</el-button> |
| | | <el-button type="primary" size="small" @click="approveFun">æ¹ å</el-button> |
| | | <el-upload |
| | | style="display: inline-block; padding: 0 6px" |
| | | :action="action" |
| | | :headers="headers" |
| | | :on-error="onError" |
| | | :show-file-list="false" |
| | | :on-success="onSuccess"> |
| | | <el-button size="small" type="primary">导 å
¥</el-button> |
| | | </el-upload> |
| | | <el-button size="small" @click="openDownloadDia">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | height="calc(100vh - 18em)"> |
| | | <el-table-column type="index" label="åºå·" width="120"> |
| | | <template v-slot="scope"> |
| | | <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="jobActivity" label="ä½ä¸æ´»å¨" min-width="180"></el-table-column> |
| | | <el-table-column prop="category" label="é£é©å ç´ ç±»å«" width="testDate" min-width="180"></el-table-column> |
| | | <el-table-column prop="description" label="é£é©å ç´ æè¿°" min-width="180"></el-table-column> |
| | | <el-table-column prop="result" label="å¯å¯¼è´çäºæ
" min-width="180"></el-table-column> |
| | | <el-table-column prop="intolerable" label="æ¯å¦ä¸å¯æ¿åé£é©" min-width="180"></el-table-column> |
| | | <el-table-column prop="plan" label="æ§å¶è®¡å" min-width="180"></el-table-column> |
| | | <el-table-column prop="editorName" label="ç¼å¶äººå§å" min-width="180"></el-table-column> |
| | | <el-table-column prop="editorDate" label="ç¼å¶æ¥æ" min-width="180"></el-table-column> |
| | | <el-table-column prop="approvalName" label="审æ¹å§å" min-width="180"></el-table-column> |
| | | <el-table-column prop="approvalDate" label="å®¡æ¹æ¥æ" min-width="180"></el-table-column> |
| | | <el-table-column prop="approvalStatus" label="审æ¹ç¶æ" min-width="180"> |
| | | <template #default="{ row }"> |
| | | {{ row.approvalStatus === 1 ? 'éè¿' : row.approvalStatus === 2 ? 'ä¸éè¿' : '' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="approveName" label="æ¹åå§å" min-width="180"></el-table-column> |
| | | <el-table-column prop="approveStatus" label="æ¹åç¶æ" min-width="180"> |
| | | <template #default="{ row }"> |
| | | {{ row.approveStatus === 1 ? 'éè¿' : row.approveStatus === 2 ? 'ä¸éè¿' : '' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="approveDate" label="æ¹åäººæ¥æ" min-width="180"></el-table-column> |
| | | <el-table-column |
| | | fixed="right" |
| | | label="æä½" |
| | | width="100"> |
| | | <template v-slot="scope"> |
| | | <el-button @click="deleteClick(scope.row)" type="text" size="small">å é¤</el-button> |
| | | <el-button type="text" size="small" @click="editClick(scope.row)">ç¼è¾</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | <el-dialog |
| | | title="æç¤º" |
| | | :visible.sync="dialogVisible" |
| | | width="50%"> |
| | | <el-form ref="form" :model="form" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä½ä¸æ´»å¨"> |
| | | <el-input v-model="form.jobActivity" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é£é©å ç´ ç±»å«"> |
| | | <el-input v-model="form.category" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é£é©å ç´ æè¿°"> |
| | | <el-input v-model="form.description" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¯å¯¼è´çäºæ
"> |
| | | <el-input v-model="form.result" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¯å¦ä¸å¯æ¿åé£é©" label-width="130px"> |
| | | <el-input v-model="form.intolerable" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ§å¶è®¡å"> |
| | | <el-input v-model="form.plan" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="addApi" :loading="loading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | form: {}, |
| | | loading: false, |
| | | search: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0 |
| | | }, |
| | | tableData: [], |
| | | } |
| | | }, |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | action() { |
| | | return this.javaApi + this.$api.measuresAddressRisksOpportunities.importControlPlanList |
| | | } |
| | | }, |
| | | methods: { |
| | | handleSizeChange(val) { |
| | | this.search.size = val; |
| | | this.initData(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.current = val; |
| | | this.initData(); |
| | | }, |
| | | initData() { |
| | | this.$axios.get(this.$api.measuresAddressRisksOpportunities.getPageList + '?size=' + this.search.size + '¤t=' + this.search.current).then(res => { |
| | | if (res.code === 201) return; |
| | | this.tableData = res.data.records; |
| | | this.search.total = res.data.total; |
| | | }); |
| | | }, |
| | | // å®¡æ¹ |
| | | approvalFun() { |
| | | let user = JSON.parse(localStorage.getItem('user')) |
| | | this.$confirm('æ¯å¦å®¡æ¹éè¿?', 'æç¤º', { |
| | | confirmButtonText: 'éè¿', |
| | | cancelButtonText: 'ä¸éè¿', |
| | | type: 'warning', |
| | | closeOnClickModal: false, // ç¦æ¢ç¹å»é®ç½©å±å
³é |
| | | distinguishCancelAndClose: true, |
| | | beforeClose: (action, instance, done) => { |
| | | if (action === 'confirm') { |
| | | this.approvalApi(user.userId, 1) |
| | | done(); |
| | | } else if (action === 'cancel') { |
| | | this.approvalApi(user.userId, 2) |
| | | done(); |
| | | } else if (action === 'close') { |
| | | // ç¹å»âÃâæé®ï¼ä¸å
许å
³é |
| | | done(); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // å®¡æ¹æ¥å£ |
| | | approvalApi(userId, status) { |
| | | this.$axios.get(this.$api.measuresAddressRisksOpportunities.riskAnalysisApprovalOfControlPlanChecklist + '?approval=' + userId + '&status=' + status).then(res => { |
| | | if (res.code === 201) return; |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }); |
| | | }, |
| | | // æ¹å |
| | | approveFun() { |
| | | let user = JSON.parse(localStorage.getItem('user')) |
| | | this.$confirm('æ¯å¦æ¹åéè¿?', 'æç¤º', { |
| | | confirmButtonText: 'éè¿', |
| | | cancelButtonText: 'ä¸éè¿', |
| | | type: 'warning', |
| | | closeOnClickModal: false, // ç¦æ¢ç¹å»é®ç½©å±å
³é |
| | | distinguishCancelAndClose: true, |
| | | beforeClose: (action, instance, done) => { |
| | | if (action === 'confirm') { |
| | | this.approveApi(user.userId, 1) |
| | | done(); |
| | | } else if (action === 'cancel') { |
| | | this.approveApi(user.userId, 2) |
| | | done(); |
| | | } else if (action === 'close') { |
| | | // ç¹å»âÃâæé®ï¼ä¸å
许å
³é |
| | | done(); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // æ¹åæ¥å£ |
| | | approveApi(userId, status) { |
| | | this.$axios.get(this.$api.measuresAddressRisksOpportunities.approvalOfControlPlanChecklist + '?approve=' + userId + '&status=' + status).then(res => { |
| | | if (res.code === 201) return; |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }); |
| | | }, |
| | | onError() { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'æä½å¤±è´¥!' |
| | | }); |
| | | }, |
| | | onSuccess(response) { |
| | | if (response.code == 201) { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: response.message, |
| | | }); |
| | | return |
| | | } |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }, |
| | | addFun() { |
| | | this.dialogVisible = true |
| | | }, |
| | | // å é¤ |
| | | deleteClick(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.get(this.$api.measuresAddressRisksOpportunities.deleteSignificantRiskFactorAnalysis + "?id=" + row.id).then(res => { |
| | | if (res.code === 201) return; |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | addApi() { |
| | | this.loading = true |
| | | this.$axios.post(this.$api.measuresAddressRisksOpportunities.analysisOfMajorRiskFactorsAdded, this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if (res.code === 201) return; |
| | | this.dialogVisible = false |
| | | this.loading = false |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | }).catch(err => { |
| | | this.loading = false |
| | | }); |
| | | }, |
| | | // ç¼è¾ |
| | | editClick(row) { |
| | | this.form = {...row} |
| | | this.dialogVisible = true |
| | | }, |
| | | // å¯¼åº |
| | | openDownloadDia () { |
| | | this.$axios.get( this.$api.measuresAddressRisksOpportunities.exportSignificantRiskFactors,{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(); |
| | | }) |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.initData() |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .header { |
| | | height: 3em; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="main"> |
| | | <el-tabs v-model="activeName" type="border-card" :lazy="true"> |
| | | <el-tab-pane label="å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§" name="å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§"> |
| | | <HazardIdentificationRiskAssessment v-if="activeName === 'å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§'"/> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å" name="é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å"> |
| | | <listRiskAnalysisControlPlans v-if="activeName === 'é大é£é©å ç´ åæåæ§å¶è®¡åæ¸
å'"/> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import HazardIdentificationRiskAssessment |
| | | from "../do/a8-measures_deal_risks_opportunities/hazard_identification_risk_assessment.vue"; |
| | | import listRiskAnalysisControlPlans |
| | | from "../do/a8-measures_deal_risks_opportunities/list_risk_analysis_control_plans.vue"; |
| | | export default { |
| | | components: {HazardIdentificationRiskAssessment, listRiskAnalysisControlPlans}, |
| | | data() { |
| | | return { |
| | | activeName: 'å±é©å ç´ è¾¨è¯ä¸é£é©è¯ä»·ç»æä¸è§', |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .main { |
| | | padding: 15px 0; |
| | | width: 100%; |
| | | border-radius: 15px; |
| | | } |
| | | /deep/ .el-tabs--border-card>.el-tabs__content { |
| | | height: calc(100vh - 9em); |
| | | padding: 0; |
| | | } |
| | | </style> |