src/InspectionWorker.worker.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/api/cnas/personal/personPersonCommunicationAbilityPage.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/api/cnas/personal/personPersonnelCapacity.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/utils/index.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/CNAS/personnel/personnelInfo/components/communicateAdd.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/CNAS/personnel/personnelInfo/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/CNAS/personnel/personnelInfo/tabs/communicate.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/CNAS/personnel/personnelInfo/tabs/personnel-capacity.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/InspectionWorker.worker.js
@@ -1815,7 +1815,7 @@ // Create version of divisor with leading zero. bz.unshift(0); // Add zeros to make remainder as long as divisor. // CommunicateAdd zeros to make remainder as long as divisor. for (; rl++ < bl; ) r.push(0); do { @@ -1853,7 +1853,7 @@ } } // Add the digit n to the result array. // CommunicateAdd the digit n to the result array. qc[qi++] = cmp ? n : ++n; // Update the remainder. src/api/cnas/personal/personPersonCommunicationAbilityPage.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,35 @@ import request from "@/utils/request"; // æ¥è¯¢äººåæ²éè®°å½ export function personPersonCommunicationAbilityPage(query) { return request({ url: "/personCommunicationAbility/personPersonCommunicationAbilityPage", method: "get", params: query }); } // å é¤äººåæ²éè®°å½ export function deletePersonCommunicationAbility(query) { return request({ url: "/personCommunicationAbility/deletePersonCommunicationAbility", method: "delete", params: query }); } // 导åºäººåæ²éè®°å½ export function exportPersonCommunicationAbility(query) { return request({ url: "/personCommunicationAbility/exportPersonCommunicationAbility", method: "get", params: query, responseType: "blob" }); } // æ°å¢-ç¼è¾äººåæ²éè®°å½ export function addOrUpdatePersonCommunicationAbility(query) { return request({ url: "/personCommunicationAbility/addOrUpdatePersonCommunicationAbility", method: "post", data: query }); } src/api/cnas/personal/personPersonnelCapacity.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,51 @@ import request from "@/utils/request"; // æ¥è¯¢äººåè½å export function personPersonnelCapacityPage(query) { return request({ url: "/personPersonnelCapacity/personPersonnelCapacityPage", method: "get", params: query }); } // æ°å¢ç¼è¾äººåè½å export function addOrUpdatePersonPersonnelCapacity(query) { return request({ url: "/personPersonnelCapacity/addOrUpdatePersonPersonnelCapacity", method: "post", data: query }); } // æ°å¢ç¼è¾äººåè½å export function submitConfirmPersonnelCapability(query) { return request({ url: "/personPersonnelCapacity/submitConfirmPersonnelCapability", method: "post", data: query }); } // 确认人åè½å export function confirmPersonnelCapability(query) { return request({ url: "/personPersonnelCapacity/confirmPersonnelCapability", method: "get", params: query }); } // å é¤äººåè½å export function deletePersonPersonnelCapacity(query) { return request({ url: "/personPersonnelCapacity/deletePersonPersonnelCapacity", method: "delete", params: query }); } // 导åºäººåè½å export function exportPersonnelCapacity(query) { return request({ url: "/personPersonnelCapacity/exportPersonnelCapacity", method: "get", params: query, responseType: "blob" }); } src/utils/index.js
@@ -307,7 +307,7 @@ } /** * Add class to element * CommunicateAdd class to element * @param {HTMLElement} elm * @param {string} cls */ src/views/CNAS/personnel/personnelInfo/components/communicateAdd.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,136 @@ <template><div class="add"> <el-dialog :title="isEdit ?'ç¼è¾éä»¶èµæ':'æ°å¢éä»¶èµæ'" :visible.sync="dialogVisible" width="40%" > <el-form :model="form" ref="form" :rules="rules" label-width="80px" size="small" > <el-form-item label="æ²é人" prop="userId"> <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="æ²éæ¶é´" prop="communicationTime"> <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="æ²éå°ç¹" prop="communicationPlace"> <el-input v-model="form.communicationPlace" placeholder="è¯·å¡«åæ²éå°ç¹"></el-input> </el-form-item > <el-form-item label="æ²éå 容" prop="communicationContent"> <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 {selectUserCondition} from "@/api/business/inspectionTask"; import {addOrUpdatePersonCommunicationAbility} from "@/api/cnas/personal/personPersonCommunicationAbilityPage"; export default { data() { return { isEdit: false, dialogVisible: false, form: { id: '', userId: [], communicationTime: undefined, communicationPlace: undefined, communicationContent: undefined }, rules: { userId: [{ required: true, message: 'è¯·éæ©æ²é人', trigger: 'change' }], communicationTime: [{ required: true, message: 'è¯·éæ©æ²éæ¶é´', trigger: 'change' }], communicationPlace: [{ required: true, message: 'è¯·å¡«åæ²éå°ç¹', trigger: 'blur' }], communicationContent: [{ required: true, message: 'è¯·å¡«åæ²éå 容', trigger: 'blur' }], }, 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.form.id = '' this.resetForm('form') } }, /** * @desc è·åç¨æ·ä¿¡æ¯ */ async getUserList() { selectUserCondition().then((res) => { this.userList = res.data; }) }, /** * @desc æäº¤è¡¨å */ async submitForm() { this.$refs.form.validate((valid) => { if (valid) { this.loading = true const params = { id: this.form.id, userId: this.form.userId.join(','), communicationTime: this.form.communicationTime, communicationPlace: this.form.communicationPlace, communicationContent: this.form.communicationContent, } addOrUpdatePersonCommunicationAbility(params).then((res) => { this.loading = false this.resetForm('form') this.$emit('submit') this.dialogVisible = false }).catch((err) => { this.loading = false }) } }) } } } </script> <style scoped> </style> src/views/CNAS/personnel/personnelInfo/index.vue
@@ -78,14 +78,14 @@ <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-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> </div> <el-dialog :visible.sync="addDia" title="æ¶ææ°å¢" width="400px"> src/views/CNAS/personnel/personnelInfo/tabs/communicate.vue
@@ -1,48 +1,28 @@ <template> <div class="flex_column"> <!-- <TableCard :showForm="isDepartment" title="æ²éè®°å½">--> <!-- <template v-slot:form >--> <!-- <div v-if="isDepartment" class="w100 items_center justify_between">--> <!-- <div></div>--> <!-- <div>--> <!-- <!– <el-button type="primary" size="small">导åº</el-button> –>--> <!-- <el-button size="small" type="primary" @click="openDialog">æ°å¢</el-button>--> <!-- </div>--> <!-- </div>--> <!-- </template>--> <!-- <template v-slot:table>--> <!-- <ZTTable--> <!-- :column="columnData"--> <!-- :height="'calc(100vh - 21em)'"--> <!-- :table-data="tableData"--> <!-- :table-loading="loading"--> <!-- style="margin-top: 18px; padding: 0 15px;"--> <!-- ></ZTTable>--> <!-- <el-divider></el-divider>--> <!-- <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=""--> <!-- @size-change=""--> <!-- >--> <!-- </el-pagination>--> <!-- </div>--> <!-- </template>--> <!-- </TableCard>--> <Add ref="communicateModal" @submit="getTableData"></Add> <div class="flex_column"> <div v-if="isDepartment" style="display: flex;justify-content: space-between;margin-bottom: 10px"> <el-button size="small" type="primary" @click="getTableData">å·æ°</el-button> <el-button size="small" type="primary" icon="el-icon-plus" @click="openDialog">æ°å¢</el-button> </div> <lims-table :tableData="tableData" :column="columnData" @pagination="page" :height="'calc(100vh - 18em)'" :page="pagination" :tableLoading="loading"></lims-table> <Add ref="communicateModal" @submit="getTableData"></Add> </div> </template> <script> // import Add from "./Add.vue" import CommunicateAdd from "../components/communicateAdd.vue" import limsTable from "@/components/Table/lims-table.vue"; import { deletePersonCommunicationAbility, exportPersonCommunicationAbility, personPersonCommunicationAbilityPage } from "@/api/cnas/personal/personPersonCommunicationAbilityPage"; export default { components: { // Add }, components: { limsTable, Add: CommunicateAdd }, props: { departId: { type: Number, @@ -55,158 +35,109 @@ 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 } const blob = new Blob([res],{ type: 'application/octet-stream' }); //å°Blob å¯¹è±¡è½¬æ¢æå符串 let reader = new FileReader(); reader.readAsText(blob, 'utf-8'); reader.onload = () => { try { let result = JSON.parse(reader.result); if (result.message) { this.$message.error(result.message); } else { const url = URL.createObjectURL(blob); const link = document.createElement('a'); link.href = url; link.download = row.userName+'-æ²éè®°å½'+'.docx'; link.click(); this.$message.success('å¯¼åºæå') } } catch (err) { console.log(err); const url = URL.createObjectURL(blob); const link = document.createElement('a'); link.href = url; link.download = row.userName+'-æ²éè®°å½'+'.docx'; link.click(); this.$message.success('å¯¼åºæå') data() { return { columnData: [ { 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, size: 20, total: 0 }, loading: false } }, mounted() { this.getTableData() }, methods: { openDialog(row, type=false) { this.$refs.communicateModal.openDialog(row, type) }, getTableData() { this.loading = true const params = this.isDepartment ? { departLimsId: this.departId, current: this.pagination.current, size: this.pagination.size } : { userId: this.departId, current: this.pagination.current, size: this.pagination.size } personPersonCommunicationAbilityPage(params).then(res => { this.loading = false this.tableData = res.data.records this.pagination.total = res.data.total }).catch(err => { this.loading = false }) }, page (page) { this.pagination.size = page.limit this.getTableData() }, /** * @desc å 餿²éè®°å½ */ delPerson(id) { this.$confirm('æ¤æä½å°æ°¸ä¹ å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { confirmButtonText: 'ç¡®å®', cancelButtonText: 'åæ¶', type: 'warning' }).then(async () => { deletePersonCommunicationAbility({id: id}).then(res => { this.$message.success('å 餿å!'); this.getTableData() }) }) }, async handleDown(row){ exportPersonCommunicationAbility({id:row.id}).then(res => { const blob = new Blob([res],{ type: 'application/octet-stream' }); this.$download.saveAs(blob, row.userName+'-æ²éè®°å½'+'.docx'); }) } }, watch: { departId: { handler(newId, oldId) { @@ -219,31 +150,4 @@ } </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> src/views/CNAS/personnel/personnelInfo/tabs/personnel-capacity.vue
@@ -1,39 +1,29 @@ <!-- 人åè½å --> <template> <div> <div style="text-align: left; margin-bottom: 15px;padding: 0 16px"> <label>å§å</label> <el-input v-model="userName" placeholder="请è¾å ¥å§å" size="small" style="width: 20vh;"></el-input> <el-button size="small" type="primary" @click="refreshTable">æ¥è¯¢</el-button> <div v-if="!isDepartment" style="float: right;"> <el-button size="small" type="primary" @click="addAppointPost('add')">æ°å¢</el-button> <div style="display: flex;justify-content: space-between;"> <el-form ref="page" size="small" :inline="true"> <el-form-item label="å§å"> <el-input v-model="userName" placeholder="请è¾å ¥å§å" size="small" clearable></el-input> </el-form-item> <el-form-item> <el-button size="small" type="primary" @click="refreshTable">æ¥ è¯¢</el-button> </el-form-item> </el-form> <div> <el-button v-if="!isDepartment" size="small" type="primary" @click="addAppointPost('add')">æ°å¢</el-button> </div> </div> <div class="table"> <TableCard :showForm="false" :showTitle="false"> <template v-slot:table> <ZTTable :column="yearColumnData" :height="'calc(100vh - 20em)'" :table-data="tableData" :table-loading="yearLoading" style="padding: 0 15px;margin-bottom: 16px" > <div slot="jobResponsibilities" slot-scope="scope"> <div v-html="changeLine(scope.row.responsibilities)"></div> </div> <div slot="placeWorkSlot" slot-scope="scope"> <div v-html="changeLine(scope.row.placeWork)"></div> </div> </ZTTable> </template> </TableCard> <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange" @current-change="handleCurrentChange"> </el-pagination> </div> <lims-table :tableData="tableData" :column="yearColumnData" @pagination="pagination" :height="'calc(100vh - 20em)'" :page="search" :tableLoading="yearLoading"> <div slot="jobResponsibilities" slot-scope="scope"> <div v-html="changeLine(scope.row.responsibilities)"></div> </div> <div slot="placeWorkSlot" slot-scope="scope"> <div v-html="changeLine(scope.row.placeWork)"></div> </div> </lims-table> <!--æ°å¢è½å认å®å¼¹æ¡--> <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="title" :visible.sync="dialogVisible" @@ -48,11 +38,6 @@ </el-select> </el-form-item> </el-col> <!-- <el-col :span="12">--> <!-- <el-form-item label="èç§°ï¼" label-width="110px" prop="technicalPost">--> <!-- <el-input v-model="form.technicalPost" :disabled="operationType === 'view'" clearable size="small" style="width: 100%;"/>--> <!-- </el-form-item>--> <!-- </el-col>--> <el-col :span="24"> <div style="display: flex;justify-content: space-evenly;font-weight: 600"> <span>æ¥æ ¸ç»æ</span> @@ -67,7 +52,7 @@ </el-col> <el-col :span="8"> <el-form-item class="radio-group" prop="academicConformNot" style="text-align: center"> <el-radio-group v-model="form.academicConformNot" :disabled="operationType === 'view' || operationType === 'confirm'"> <el-radio-group v-model="form.academicConformNot" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden> <el-radio :label="1">符å</el-radio> <el-radio :label="2">ä¸ç¬¦å</el-radio> <el-radio :label="3">ä¸éç¨</el-radio> @@ -86,7 +71,7 @@ </el-col> <el-col :span="8"> <el-form-item class="radio-group" prop="relatedYearsConformNot" style="text-align: center"> <el-radio-group v-model="form.relatedYearsConformNot" :disabled="operationType === 'view' || operationType === 'confirm'"> <el-radio-group v-model="form.relatedYearsConformNot" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden> <el-radio :label="1">符å</el-radio> <el-radio :label="2">ä¸ç¬¦å</el-radio> <el-radio :label="3">ä¸éç¨</el-radio> @@ -105,7 +90,7 @@ </el-col> <el-col :span="8"> <el-form-item class="radio-group" prop="relatedTrainingConformNot" style="text-align: center"> <el-radio-group v-model="form.relatedTrainingConformNot" :disabled="operationType === 'view' || operationType === 'confirm'"> <el-radio-group v-model="form.relatedTrainingConformNot" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden> <el-radio :label="1">符å</el-radio> <el-radio :label="2">ä¸ç¬¦å</el-radio> <el-radio :label="3">ä¸éç¨</el-radio> @@ -125,7 +110,7 @@ </el-col> <el-col :span="8"> <el-form-item class="radio-group" prop="relevantExperienceConformNot" style="text-align: center"> <el-radio-group v-model="form.relevantExperienceConformNot" :disabled="operationType === 'view' || operationType === 'confirm'"> <el-radio-group v-model="form.relevantExperienceConformNot" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden> <el-radio :label="1">符å</el-radio> <el-radio :label="2">ä¸ç¬¦å</el-radio> <el-radio :label="3">ä¸éç¨</el-radio> @@ -147,7 +132,7 @@ </el-col> <el-col :span="8"> <el-form-item class="radio-group" prop="workLicenseConformNot" style="text-align: center"> <el-radio-group v-model="form.workLicenseConformNot" :disabled="operationType === 'view' || operationType === 'confirm'"> <el-radio-group v-model="form.workLicenseConformNot" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden> <el-radio :label="1">符å</el-radio> <el-radio :label="2">ä¸ç¬¦å</el-radio> <el-radio :label="3">ä¸éç¨</el-radio> @@ -163,7 +148,7 @@ <el-form-item label="å²ä½èè´£ï¼" label-width="110px" prop="jobResponsibilitiesTem" style="height: 450px"> <el-checkbox-group v-model="form.jobResponsibilitiesTem" :disabled="operationType === 'view' || operationType === 'confirm'" @change="selectResponsibilities"> <el-checkbox v-for="city in responsibilities" :key="city.value" :label="city.label" <el-checkbox v-for="city in dict.type.responsibilities_list" :key="city.value" :label="city.label" :value="city.value"></el-checkbox> </el-checkbox-group> </el-form-item> @@ -171,7 +156,7 @@ <el-col :span="8"> <el-form-item class="radio-group" prop="jobResponsibilitiesConformNot" style="text-align: center;height: 420px"> <el-radio-group v-model="form.jobResponsibilitiesConformNot" :disabled="operationType === 'view' || operationType === 'confirm'"> <el-radio-group v-model="form.jobResponsibilitiesConformNot" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden> <el-radio :label="1">符å</el-radio> <el-radio :label="2">ä¸ç¬¦å</el-radio> <el-radio :label="3">ä¸éç¨</el-radio> @@ -189,7 +174,7 @@ </el-col> <el-col :span="16"> <el-form-item label="综åè¯ä»·ï¼" label-width="110px" prop="comprehensiveAssessment"> <el-radio-group v-model="form.comprehensiveAssessment" :disabled="operationType === 'view' || operationType === 'confirm'"> <el-radio-group v-model="form.comprehensiveAssessment" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden> <el-radio label="Qualified this position">å¯è任该å²ä½</el-radio> <el-radio label="You can work while training">å¯è¾¹å¹è®è¾¹ä¸å²</el-radio> <el-radio label="Iconpetent for the position">ä¸è任该å²ä½</el-radio> @@ -218,6 +203,18 @@ <script> import limsTable from "@/components/Table/lims-table.vue"; import { addOrUpdatePersonPersonnelCapacity, confirmPersonnelCapability, deletePersonPersonnelCapacity, exportPersonnelCapacity, personPersonnelCapacityPage, submitConfirmPersonnelCapability } from "@/api/cnas/personal/personPersonnelCapacity"; import {selectUserCondition} from "@/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment"; import {mapGetters} from "vuex"; export default { props: { departId: { @@ -232,8 +229,12 @@ } }, components: { limsTable }, computed: { ...mapGetters(["userId"]), }, dicts: ['responsibilities_list'], data() { return { userName: '', @@ -344,7 +345,7 @@ this.handleViewClick('confirm', row); }, disabled: (row) => { if (row.confirmDate || JSON.parse(localStorage.getItem("user")).userId != row.confirmOperatingPersonnelId) { if (row.confirmDate || this.userId != row.confirmOperatingPersonnelId) { return true } else { return false @@ -401,35 +402,10 @@ methods: { // ä¸è½½ downLoadPost(row) { this.$axios.get(this.$api.personnel.exportPersonnelCapacity + '?id=' + row.id,{responseType: "blob"}).then(res => { exportPersonnelCapacity({id: row.id}).then(res => { this.outLoading = false const blob = new Blob([res],{ type: 'application/msword' }); //å°Blob å¯¹è±¡è½¬æ¢æå符串 let reader = new FileReader(); reader.readAsText(blob, 'utf-8'); reader.onload = () => { try { let result = JSON.parse(reader.result); if (result.message) { this.$message.error(result.message); } else { const url = URL.createObjectURL(blob); const link = document.createElement('a'); link.href = url; link.download = "人åè½å导åº" + '.docx'; link.click(); this.$message.success('å¯¼åºæå') } } catch (err) { console.log(err); const url = URL.createObjectURL(blob); const link = document.createElement('a'); link.href = url; link.download = "人åè½å导åº" + '.docx'; link.click(); this.$message.success('å¯¼åºæå') } } this.$download.saveAs(blob, '人åè½å导åº.docx') }) }, // æ¥è¯¢ @@ -439,11 +415,21 @@ // è·å人åè½ååè¡¨ä¿¡æ¯ getList(userId) { this.search.userId = userId; const name = this.isDepartment ? 'departmentId' : 'userId'; const params = this.isDepartment ? { departmentId: this.search.userId, size: this.search.size, current: this.search.current, userName: this.userName, }: { userId: this.search.userId, size: this.search.size, current: this.search.current, userName: this.userName, } this.yearLoading = true this.$axios.get(this.$api.personnel.personPersonnelCapacityPage + '?userName=' + this.userName + `&${name}=` + this.search.userId + '&size=' + this.search.size + '¤t=' + this.search.current).then(res => { personPersonnelCapacityPage(params).then(res => { this.yearLoading = false if (res.code === 201) return; this.tableData = res.data.records; this.search.total = res.data.total; }).catch(err => { @@ -451,22 +437,19 @@ this.yearLoading = false }) }, pagination (page) { this.search.size = page.limit this.refreshTable() }, selectResponsibilities(arr) { let arrTem = []; arr.map(val => { const index = this.responsibilities.findIndex(item => item.label === val); const index = this.dict.type.responsibilities_list.findIndex(item => item.label === val); if (index > -1) { arrTem.push(this.responsibilities[index].value); arrTem.push(this.dict.type.responsibilities_list[index].value); } }); this.form.jobResponsibilities = arrTem.join(','); }, getResponsibilities() { this.$axios.post(this.$api.enums.selectEnumByCategory, { category: 'å²ä½èè´£' }).then(res => { this.responsibilities = res.data; }); }, changeLine (val) { if(val) { @@ -480,13 +463,11 @@ this.operationType = type; this.title = 'æ°å¢è½å认å®' this.dialogVisible = true; console.log('this.departId---', this.departId) this.form = { jobResponsibilitiesTem: [] } this.form.userId = this.departId this.getUserList(); this.getResponsibilities(); }, // ç¼è¾/æ¥ç @@ -502,17 +483,12 @@ this.$set(this.form, 'jobResponsibilitiesTem', []) } this.getUserList(); this.getResponsibilities(); }, // ä¿å submitForm() { this.$refs.infoForm.validate((valid) => { if (valid) { this.$axios.post(this.$api.personnel.addOrUpdatePersonPersonnelCapacity, this.form, { headers: { 'Content-Type': 'application/json' } }).then(res => { addOrUpdatePersonPersonnelCapacity(this.form).then(res => { if (res.code == 200) { this.$message.success('æäº¤æå'); this.getList(this.departId); @@ -526,11 +502,7 @@ submitForm1() { this.$refs.infoForm.validate((valid) => { if (valid) { this.$axios.post(this.$api.personnel.submitConfirmPersonnelCapability, this.form, { headers: { 'Content-Type': 'application/json' } }).then(res => { submitConfirmPersonnelCapability(this.form).then(res => { if (res.code == 200) { this.$message.success('æäº¤æå'); this.getList(this.departId); @@ -541,7 +513,7 @@ }); }, verifyGet () { this.$axios.get(this.$api.personnel.confirmPersonnelCapability + '?id=' + this.verifyGetId).then(res => { confirmPersonnelCapability({id: this.verifyGetId}).then(res => { if (res.code == 200) { this.$message.success('确认æå'); this.resetForm() @@ -556,7 +528,7 @@ cancelButtonText: 'åæ¶', type: 'warning' }).then(() => { this.$axios.delete(this.$api.personnel.deletePersonPersonnelCapacity + '?id=' + id).then(res => { deletePersonPersonnelCapacity({id: id}).then(res => { if (res.code == 200) { this.$message.success('å 餿å'); this.getList(this.departId); @@ -571,20 +543,12 @@ this.dialogVisible = false; }, getUserList(){ this.$axios.get(this.$api.user.selectDepartmentLimsUserList).then(res => { selectUserCondition().then(res => { if (res.code == 200) { this.responsibleOptions = res.data } }) }, handleSizeChange(val) { this.search.size = val; this.getList(this.departId); }, handleCurrentChange(val) { this.search.current = val; this.getList(this.departId); } }, watch: { // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° @@ -593,21 +557,12 @@ this.getList(newId); } }, // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° isDepartment: { handler(newId, oldId) { this.getList(this.departId); } }, } }; </script> <style scoped> >>>.el-dialog { margin: 6vh auto 50px !important; } >>> .el-dialog__body { max-height: 70vh; max-height: 74vh; overflow-y: auto; }