¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div style="text-align: right;margin-bottom: 10px"> |
| | | <!-- <el-button size="small" @click="$emit('goBackList')">è¿å</el-button>--> |
| | | <el-button size="small" type="primary" @click="downPerson">ä¸è½½æ¡£æ¡</el-button> |
| | | <el-button size="small" type="primary" @click="dialogVisible = true">人ååç±»</el-button> |
| | | <el-button :loading="saveLoading" size="small" type="primary" @click="save">ä¿å</el-button> |
| | | </div> |
| | | <div> |
| | | <div style="display: flex;flex-direction: row;"> |
| | | <div style="width: 12em"> |
| | | <el-image :src="javaApi + '/img/' + form.pictureUrl" fit="fill" |
| | | style="width:100%;height: 300px;border: 1px solid #000;border-radius: 10px;margin-left: 6px;margin-top: 10px;"> |
| | | <div slot="error" class="image-slot"> |
| | | <i class="el-icon-picture-outline" style="font-size: 40px;"></i> |
| | | </div> |
| | | </el-image> |
| | | <el-image :src="javaApi + '/img/' + form.signatureUrl" fit="fill" |
| | | style="width:80%;height: 50px;border: 1px solid #000;border-radius: 10px;margin-left: 22px;margin-top: 20px;"> |
| | | <div slot="error" class="image-slot"> |
| | | <i class="el-icon-picture-outline" style="font-size: 40px;"></i> |
| | | </div> |
| | | </el-image> |
| | | </div> |
| | | <div style="height: calc(100vh - 14em);overflow-y: auto"> |
| | | <el-form ref="form" :model="form" label-width="110px"> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å§å"> |
| | | <el-input disabled v-model="form.name" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å·¥å·"> |
| | | <el-input disabled v-model="form.account" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å½åç¶æ"> |
| | | <el-radio-group v-model="form.currentState"> |
| | | <el-radio label="1formal" size="mini">æ£å¼</el-radio> |
| | | <el-radio label="2intern" size="mini">å®ä¹ </el-radio> |
| | | <el-radio label="3leaveOffice" size="mini">离è</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ§å«"> |
| | | <el-radio-group v-model="form.sex"> |
| | | <el-radio label="1" size="mini">ç·</el-radio> |
| | | <el-radio label="0" size="mini">女</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å
¬å¸åç§°"> |
| | | <el-input v-model="form.corporateName" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æå±é¨é¨"> |
| | | <el-cascader v-model="form.departLimsId" :options="department" :props="{ label: 'name', value: 'id',checkStrictly: true }" filterable style="width: 100%;"></el-cascader> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å²ä½åç§°"> |
| | | <el-input v-model="form.postName" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å
¥é墿¶é´"> |
| | | <el-date-picker v-model="form.groupTime" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å³å¨å
³ç³»"> |
| | | <el-radio-group v-model="form.laborRelations"> |
| | | <el-radio :label=0 size="mini">ååå·¥</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å
¬å¸é®ç®±"> |
| | | <el-input v-model="form.email" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="工使¶é´"> |
| | | <el-date-picker v-model="form.workingTime" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ååå°ææ¶é´"> |
| | | <el-date-picker v-model="form.contractLifeTime" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="èç§°"> |
| | | <el-input v-model="form.professionalTitle" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="16" style="text-align: left;"> |
| | | <el-form-item label="人ååç±»"> |
| | | <span style="color: #000;">{{ form.personnelClassification }}</span> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="åºçæ¥æ"> |
| | | <el-date-picker v-model="form.dateBirth" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" |
| | | @change="getAge" |
| | | style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç±è´¯"> |
| | | <el-input v-model="form.nativePlace" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ°æ"> |
| | | <el-input v-model="form.nation" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="身份è¯å·"> |
| | | <el-input v-model="form.identityCard" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å¹´é¾"> |
| | | <el-input-number v-model="form.age" :max="130" :min="1" |
| | | controls-position="right" size="small" style="width: 99%;"></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å©å§»ç¶åµ"> |
| | | <el-radio-group v-model="form.maritalStatus"> |
| | | <el-radio :label=0 size="mini">å·²å©</el-radio> |
| | | <el-radio :label=1 size="mini">æªå©</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è¯ä»¶æææ"> |
| | | <el-date-picker v-model="form.validityPeriod" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 99%;" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è¯ä»¶å°å"> |
| | | <el-input v-model="form.idAddress" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è¯ä»¶è¯¦ç»å°å"> |
| | | <el-input v-model="form.idDetailAddress" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¿æ²»é¢è²"> |
| | | <el-input v-model="form.politicalStatus" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å
¥å
/墿¶é´"> |
| | | <el-date-picker v-model="form.dumplingTime" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 99%;" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ææºå·"> |
| | | <el-input v-model="form.telephone" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æé«å¦å"> |
| | | <el-input v-model="form.officialAcademicRedentials" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æé«å¦ä½"> |
| | | <el-input v-model="form.highestDegree" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¯ä¸é¢æ ¡1"> |
| | | <el-input v-model="form.graduatedInstitutions1" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ä¸ä¸1"> |
| | | <el-input v-model="form.major1" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¯ä¸æ¶é´1"> |
| | | <el-date-picker v-model="form.graduationTime1" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 99%;" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¯ä¸é¢æ ¡2"> |
| | | <el-input v-model="form.graduatedInstitutions2" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ä¸ä¸2"> |
| | | <el-input v-model="form.major2" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¯ä¸æ¶é´2"> |
| | | <el-date-picker v-model="form.graduationTime2" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 99%;" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç»è®°æ¶é´"> |
| | | <el-date-picker v-model="form.lastUpdateTime" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 99%;" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="夿³¨"> |
| | | <el-input type="textarea" v-model="form.remarks" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="18"> |
| | | <el-form-item label="个人ç
§ç"> |
| | | <el-input v-model="form.pictureUrl" disabled size="small"> |
| | | <el-button v-if="form.pictureUrl" slot="append" icon="el-icon-delete-solid" |
| | | @click="deleteFile(form.pictureUrl, 'pictureUrl')"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-upload ref="upload" :action="action" |
| | | :headers="uploadHeader" |
| | | :on-success="(response, file, fileList) => onSuccess(response, file, fileList, 'pictureUrl')" |
| | | :show-file-list="false" |
| | | style="float: left; margin: 0 10px 0 10px;"> |
| | | <el-button slot="trigger" class="uploadFile" size="mini" type="primary">ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | <el-button v-if="form.pictureUrl" class="uploadFile" size="mini" |
| | | type="primary" @click="downloadFile(form.pictureUrl)">ä¸è½½</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="18"> |
| | | <el-form-item label="çµåç¾å"> |
| | | <el-input v-model="form.signatureUrl" disabled size="small"> |
| | | <el-button v-if="form.signatureUrl" slot="append" icon="el-icon-delete-solid" |
| | | @click="deleteFile(form.signatureUrl, 'signatureUrl')"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-upload ref="upload" :action="action" |
| | | :headers="uploadHeader" |
| | | :on-success="(response, file, fileList) => onSuccess(response, file, fileList, 'signatureUrl')" |
| | | :show-file-list="false" |
| | | style="float: left; margin: 0 10px 0 10px;"> |
| | | <el-button slot="trigger" class="uploadFile" size="small" type="primary">ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | <el-button v-if="form.signatureUrl" class="uploadFile" size="small" |
| | | type="primary" @click="downloadFile(form.signatureUrl)">ä¸è½½</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="20"> |
| | | <el-form-item label="è¯ä¹¦èµæ" > |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-button size="mini" style="float: right;margin-right: 25px" type="primary" @click="annexAdd(0)">æ°å¢</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <lims-table :tableData="annexList" :column="columnData2" style="width: 96%;margin-left: 34px" |
| | | height="200" :tableLoading="tableLoading2"></lims-table> |
| | | <el-row style="margin-top: 10px"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="éä»¶èµæ" > |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-upload ref='upload' |
| | | :action="fileAction" |
| | | :auto-upload="true" :data="{userId: clickNodeVal.userId}" |
| | | :before-upload="fileBeforeUpload" |
| | | :headers="uploadHeader" :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" type="primary">éä»¶ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | </el-col> |
| | | </el-row> |
| | | <lims-table :tableData="tableData" :column="columnData" style="width: 96%;float: right;" |
| | | height="200" :tableLoading="tableLoading"></lims-table> |
| | | <el-row style="margin-top: 10px"> |
| | | <el-col :span="20"> |
| | | <el-form-item label="å·¥ä½ç»å" > |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-button size="mini" style="float: right;margin-right: 25px" type="primary" @click="annexAdd1('add')">æ°å¢</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="tableData1" border height="200" style="width: 96%;float: right;" v-loading="tableLoading1"> |
| | | <el-table-column label="åºå·" type="index" width="55px" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥ä½ç»å" prop="workExperience"> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="æä½"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="mini" @click="annexAdd1('edit',scope.row)">ç¼è¾</el-button> |
| | | <el-button type="text" size="mini" @click="deleteAnnex1(scope.row)" style="color: #f56c6c">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 人ååç±»å¼¹æ¡ --> |
| | | <el-dialog :visible.sync="dialogVisible" title="æç¤º" width="40%" @open="getComparisonList"> |
| | | <div style="height: 30vh;"> |
| | | <el-row> |
| | | <el-col :span="4"> |
| | | 人ååç±»ï¼ |
| | | </el-col> |
| | | <el-col :span="20" style="text-align: left;"> |
| | | <el-checkbox-group v-model="checkList"> |
| | | <el-checkbox v-for="v in dict.type.personnl_type" :key="v.value" |
| | | :label="v.value"></el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="clickPersonnelClassificationSure">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- æ°å¢éä»¶èµæ --> |
| | | <el-dialog :before-close="handleClose" :title="title" :visible.sync="dialogVisible1" width="40%" @open="getComparisonList"> |
| | | <el-form ref="annex" :model="annex" :rules="rules" label-width="100px"> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-form-item label="è¯ä»¶å·" prop="idNumber"> |
| | | <el-input v-model="annex.idNumber" clearable size="small" style="width: 100%;"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col :span="16"> |
| | | <el-form-item label="åè¯åä½" prop="issueUnit"> |
| | | <el-input v-model="annex.issueUnit" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col :span="16"> |
| | | <el-form-item label="级å«"> |
| | | <el-input v-model="annex.level" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col :span="16"> |
| | | <el-form-item label="æææ" prop="periodValidity"> |
| | | <el-input v-model="annex.periodValidity" clearable size="small"></el-input> |
| | | <!-- <el-date-picker v-model="annex.periodValidity" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small"--> |
| | | <!-- style="width: 99%;" type="date" value-format="yyyy-MM-dd">--> |
| | | <!-- </el-date-picker>--> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col :span="16"> |
| | | <el-form-item label="å¤å°ä»¶"> |
| | | <el-input v-model="annex.copy" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col :span="16"> |
| | | <el-form-item label="åä»¶"> |
| | | <el-input v-model="annex.original" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col :span="16"> |
| | | <el-form-item label="æä»¶"> |
| | | <el-upload |
| | | :action="action" |
| | | :before-upload="beforeAvatarUpload" |
| | | :headers="uploadHeader" |
| | | :on-success="(response,file,fileList) => onSuccess(response, file, fileList, 'fileName')" |
| | | :show-file-list="false"> |
| | | <span v-if="annex.fileName">{{annex.fileName}}</span> |
| | | <!-- <img v-if="imageUrl" :src="imageUrl" class="avatar">--> |
| | | <i v-else class="el-icon-upload avatar-uploader-icon"></i> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="cancellation">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- æ°å¢å·¥ä½ç»å --> |
| | | <el-dialog @close="handleClose2" title="æ·»å å·¥ä½ç»å" :visible.sync="dialogVisible2" width="40%"> |
| | | <el-form ref="annex2" :model="annex2" label-width="100px"> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <el-form-item label="å·¥ä½ç»å" prop="idNumber"> |
| | | <el-input type="textarea" v-model="annex2.workExperience" clearable size="small" style="width: 100%;"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleClose2">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm2">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import fileDownload from '@/utils/file' |
| | | import { |
| | | addAnnex, |
| | | addBasicInfoWork, |
| | | delBasicInfoFileList, |
| | | delBasicInfoWorkList, |
| | | deleteAnnex, deleteCNASFile, |
| | | exportPersonBasicInfoById, |
| | | getAnnex, |
| | | getAnnexByUserId, |
| | | getBasicInfoFileList, |
| | | getBasicInfoWorkList, |
| | | getCNASPersonnelInfo, |
| | | saveCNASPersonnelInfo, |
| | | updateAnnex, |
| | | updateBasicInfoWorkList |
| | | } from "@/api/cnas/personal/personalList"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | | default: () => { return {} } |
| | | }, |
| | | }, |
| | | dicts: ['personnl_type'], |
| | | data() { |
| | | return { |
| | | operationType: '', |
| | | basicInfoWorkId: '', |
| | | dialogVisible2: false, |
| | | annex2: { |
| | | workExperience: '' |
| | | }, |
| | | tableLoading: false, |
| | | tableData: [], |
| | | columnData: [ |
| | | { |
| | | label: 'æä»¶åç§°', |
| | | prop: 'fileName', |
| | | minWidth: '150px' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '100', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.upload(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delete(row) |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | columnData2: [ |
| | | { |
| | | label: 'è¯ä»¶å·', |
| | | prop: 'idNumber', |
| | | minWidth: '150px' |
| | | },{ |
| | | label: 'åè¯åä½', |
| | | prop: 'issueUnit', |
| | | minWidth: '150px' |
| | | },{ |
| | | label: 'æä»¶åç§°', |
| | | prop: 'fileName', |
| | | minWidth: '200px' |
| | | },{ |
| | | label: '级å«', |
| | | prop: 'level', |
| | | minWidth: '150px' |
| | | },{ |
| | | label: 'æææ', |
| | | prop: 'periodValidity', |
| | | minWidth: '150px' |
| | | },{ |
| | | label: 'æ·»å æ¶é´', |
| | | prop: 'createTime', |
| | | minWidth: '150px' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '130', |
| | | label: 'æä½', |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.downloadFile(row.fileName) |
| | | } |
| | | }, |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.annexAdd(1,row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.deleteAnnex(row) |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableLoading1: false, |
| | | tableLoading2: false, |
| | | tableData1: [], |
| | | addOrupdate: null, |
| | | title: '', |
| | | annexList: [], |
| | | imageUrl: '', |
| | | annex: { |
| | | userId: '', |
| | | idNumber: '', |
| | | issueUnit: '', |
| | | level: '', |
| | | periodValidity: '', |
| | | copy: '', |
| | | original: '', |
| | | fileName: '' |
| | | }, |
| | | rules: { |
| | | idNumber: [ |
| | | { required: true, message: '请è¾å
¥è¯ä»¶å·', trigger: 'blur' } |
| | | ], |
| | | issueUnit: [ |
| | | { required: true, message: '请è¾å
¥åè¯åä½', trigger: 'blur' } |
| | | ], |
| | | periodValidity: [ |
| | | { required: false, message: 'è¯·éæ©æææ', trigger: 'blur' } |
| | | ] |
| | | }, |
| | | dialogVisible1: false, |
| | | form: { |
| | | userId: '', |
| | | name: '', |
| | | account: '', |
| | | currentState: '', |
| | | sex: '', |
| | | corporateName: '', |
| | | department: '', |
| | | departLimsId: [], |
| | | postName: '', |
| | | groupTime: '', |
| | | laborRelations: '', |
| | | workingTime: '', |
| | | contractLifeTime: '', |
| | | personnelClassification: '', |
| | | dateBirth: '', |
| | | nativePlace: '', |
| | | nation: '', |
| | | identityCard: '', |
| | | age: '', |
| | | validityPeriod: '', |
| | | maritalStatus: '', |
| | | idAddress: '', |
| | | idDetailAddress: '', |
| | | politicalStatus: '', |
| | | dumplingTime: '', |
| | | telephone: '', |
| | | email: '', |
| | | officialAcademicRedentials: '', |
| | | highestDegree: '', |
| | | graduatedInstitutions1: '', |
| | | major1: '', |
| | | graduationTime1: '', |
| | | graduatedInstitutions2: '', |
| | | major2: '', |
| | | graduationTime2: '', |
| | | lastUpdateTime: '', |
| | | pictureUrl: '', |
| | | signatureUrl: '', |
| | | professionalTitle: '', |
| | | remarks: '', |
| | | }, |
| | | department: [], |
| | | saveLoading: false, |
| | | dialogVisible: false, |
| | | checkList: [], |
| | | successFileList: [], // 鲿¢å端åºç°èæ°æ® |
| | | isSave: false, |
| | | } |
| | | }, |
| | | components: {limsTable, fileDownload}, |
| | | created() { |
| | | this.init() |
| | | this.searchTableList() |
| | | this.searchTableList2() |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | }, |
| | | fileAction() { |
| | | return this.javaApi + '/personBasicInfo/uploadBasicInfoFile' |
| | | }, |
| | | }, |
| | | methods: { |
| | | // ä¸è½½æ¡£æ¡ |
| | | downPerson(){ |
| | | exportPersonBasicInfoById({id: this.clickNodeVal.userId}).then(res => { |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | this.$download.saveAs(blob, 'äººåæ¡£æ¡.docx'); |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | // ä¸ä¼ éªè¯ |
| | | 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() |
| | | } else { |
| | | this.$message.error(response.message); |
| | | } |
| | | }, |
| | | // æ¥è¯¢éä»¶å表 |
| | | searchTableList () { |
| | | this.tableLoading = true |
| | | getBasicInfoFileList({userId: this.clickNodeVal.userId}).then(res => { |
| | | this.tableLoading = false |
| | | this.tableData = res.data |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | // ä¸è½½ |
| | | upload (row) { |
| | | let url = ''; |
| | | if(row.type==1){ |
| | | url = this.javaApi+'/img/'+row.fileUrl |
| | | fileDownload.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.$confirm('æ¤æä½å°å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | delBasicInfoFileList({basicInfoFileId: row.basicInfoFileId}).then(res => { |
| | | this.tableLoading = false |
| | | this.$message.success('å 餿å') |
| | | this.searchTableList(); |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }) |
| | | }, |
| | | // æå¼å·¥ä½ç»åæ¢åµ |
| | | annexAdd1 (type, row) { |
| | | this.operationType = type |
| | | if (type === 'edit') { |
| | | this.basicInfoWorkId = row.basicInfoWorkId |
| | | this.annex2.workExperience = row.workExperience |
| | | } else { |
| | | this.basicInfoWorkId = '' |
| | | this.annex2.workExperience = '' |
| | | } |
| | | this.dialogVisible2 = true |
| | | }, |
| | | // æäº¤å·¥ä½ç»å |
| | | submitForm2 () { |
| | | const params = { |
| | | workExperience: this.annex2.workExperience, |
| | | userId: this.clickNodeVal.userId, |
| | | basicInfoWorkId: this.basicInfoWorkId |
| | | } |
| | | this.tableLoading1 = true |
| | | if (this.operationType === 'add') { |
| | | addBasicInfoWork(params).then(res => { |
| | | this.tableLoading1 = false |
| | | if (res.code == 200) { |
| | | this.dialogVisible2 = false |
| | | this.$message.success('æ°å¢æå') |
| | | this.searchTableList2(); |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading1 = false |
| | | }) |
| | | } else { |
| | | updateBasicInfoWorkList(params).then(res => { |
| | | this.tableLoading1 = false |
| | | this.dialogVisible2 = false |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.searchTableList2(); |
| | | }).catch(err => { |
| | | this.tableLoading1 = false |
| | | }) |
| | | } |
| | | }, |
| | | // å
³éå·¥ä½ç»åå¼¹æ¡ |
| | | handleClose2 () { |
| | | this.dialogVisible2 = false |
| | | this.annex2.workExperience = '' |
| | | }, |
| | | // å é¤å·¥ä½ç»å |
| | | deleteAnnex1 (row) { |
| | | this.$confirm('æ¤æä½å°å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading1 = true |
| | | delBasicInfoWorkList({basicInfoWorkId: row.basicInfoWorkId}).then(res => { |
| | | this.tableLoading1 = false |
| | | this.$message.success('å 餿å') |
| | | this.searchTableList2(); |
| | | }).catch(err => { |
| | | this.tableLoading1 = false |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // æ¥è¯¢å·¥ä½ç»åå表 |
| | | searchTableList2 () { |
| | | this.tableLoading1 = true |
| | | getBasicInfoWorkList({userId: this.clickNodeVal.userId}).then(res => { |
| | | this.tableLoading1 = false |
| | | this.tableData1 = res.data |
| | | }).catch(err => { |
| | | this.tableLoading1 = false |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | annexAdd(type,row) { |
| | | if(type === 1) { |
| | | this.title = 'ç¼è¾éä»¶èµæ' |
| | | this.addOrupdate = 1 |
| | | getAnnex({id: row.id}).then(res => { |
| | | this.annex = res.data |
| | | this.imageUrl = this.javaApi + '/img/' + res.data.fileName |
| | | }) |
| | | }else { |
| | | this.title = 'æ°å¢éä»¶èµæ' |
| | | this.addOrupdate = 2 |
| | | } |
| | | this.dialogVisible1 = true |
| | | }, |
| | | submitForm() { |
| | | this.$refs['annex'].validate((valid) => { |
| | | if (valid) { |
| | | this.addAnnex() |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | addAnnex() { |
| | | if(this.annex.fileName == "" || this.annex.fileName == null || this.annex.fileName == undefined) { |
| | | this.$message.error("请ä¸ä¼ æä»¶") |
| | | return |
| | | } |
| | | this.annex.userId = this.clickNodeVal.userId |
| | | if(this.addOrupdate === 1) { |
| | | updateAnnex(this.annex).then(res => { |
| | | if(res.code == 200) { |
| | | getAnnexByUserId({userId: this.clickNodeVal.userId}).then(res => { |
| | | this.imageUrl = '' |
| | | this.resetForm('annex') |
| | | this.annexList = res.data |
| | | this.dialogVisible1 = false |
| | | this.$message.success('æ´æ°æåï¼') |
| | | }) |
| | | } |
| | | }) |
| | | }else { |
| | | this.annex.id = null |
| | | addAnnex(this.annex).then(res => { |
| | | if(res.code == 200) { |
| | | getAnnexByUserId({userId: this.clickNodeVal.userId}).then(res => { |
| | | this.imageUrl = '' |
| | | this.resetForm('annex') |
| | | this.annexList = res.data |
| | | this.dialogVisible1 = false |
| | | this.$message.success('ä¿åæå') |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | deleteAnnex(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteAnnex({id: row.id}).then(res => { |
| | | this.$message.success('å 餿åï¼') |
| | | this.annexList = this.annexList.filter(item => item.id != row.id) |
| | | }) |
| | | }) |
| | | }, |
| | | beforeAvatarUpload(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); //æ£ç¡®çç»æ¢ |
| | | } |
| | | }, |
| | | downloadFile(fileName) { |
| | | let state = /\.(jpg|jpeg|png|gif)$/i.test(fileName) |
| | | if (state) { |
| | | let url = this.javaApi + '/img/' + fileName; |
| | | fileDownload.downloadIamge(url, fileName) |
| | | } else { |
| | | const url = this.javaApi + '/word/' + fileName |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = fileName; |
| | | link.click(); |
| | | this.$message.success('ä¸è½½æå') |
| | | } |
| | | }, |
| | | async onSuccess(response, file, fileList, entityVal) { |
| | | if(entityVal == 'fileName') { |
| | | this.annex.fileName = response.data |
| | | } |
| | | // å¨ä¿åèµå¼æ°æä»¶ |
| | | this.successFileList.push(response.data) |
| | | this.$set(this.form, entityVal, response.data) |
| | | }, |
| | | // åå§åè°ç¨ |
| | | init() { |
| | | if (!this.clickNodeVal.userId) { |
| | | let user = JSON.parse(localStorage.getItem('user')) |
| | | this.getUserBasisInfo(user.userId) |
| | | this.clickNodeVal.userId = user.userId |
| | | } else { |
| | | this.getUserBasisInfo(this.clickNodeVal.userId) |
| | | } |
| | | }, |
| | | getUserBasisInfo(userId) { |
| | | getCNASPersonnelInfo({userId: userId}).then(res => { |
| | | this.form = res.data.PersonBasicInfoDto |
| | | this.department = res.data.department |
| | | this.annexList = res.data.annexList |
| | | this.form.departLimsId = res.data.PersonBasicInfoDto.departLimsId.split(',').filter(a => a != "").map(Number) |
| | | }) |
| | | }, |
| | | async save() { |
| | | this.saveLoading = true |
| | | this.form.userId = this.clickNodeVal.userId |
| | | if(Array.isArray(this.form.departLimsId)) { |
| | | if(this.form.departLimsId.length > 0) { |
| | | this.form.departLimsId = this.form.departLimsId.join(',').trim() + ',' |
| | | }else { |
| | | this.form.departLimsId = '' |
| | | } |
| | | } |
| | | saveCNASPersonnelInfo(this.form).then(res => { |
| | | this.saveLoading = false |
| | | this.isSave = true |
| | | this.getUserBasisInfo(this.clickNodeVal.userId) |
| | | this.$message.success('ä¿åæåï¼') |
| | | }) |
| | | }, |
| | | // å人ååç±»çåå
¸ |
| | | getComparisonList() { |
| | | if (this.checkList.length > 0) { |
| | | this.form.personnelClassification = this.checkList.split('ï¼') |
| | | } |
| | | }, |
| | | clickPersonnelClassificationSure() { |
| | | this.dialogVisible = false |
| | | this.form.personnelClassification = this.checkList.filter(m=>m).join('ï¼') |
| | | }, |
| | | async deleteFile(fileName, entityVal) { |
| | | await deleteCNASFile({fileName: fileName}).then(res => { |
| | | this.$message.success('å 餿åï¼') |
| | | this.$set(this.form, entityVal, null) |
| | | let index = this.successFileList.indexOf(fileName) |
| | | if (index != -1) { |
| | | this.successFileList.splice(index, 1) |
| | | } |
| | | }) |
| | | }, |
| | | cancellation() { |
| | | this.dialogVisible1 = false |
| | | this.imageUrl = '' |
| | | this.resetForm('annex') |
| | | }, |
| | | handleClose(done) { |
| | | this.imageUrl = '' |
| | | this.annex = { |
| | | userId: '', |
| | | idNumber: '', |
| | | issueUnit: '', |
| | | level: '', |
| | | periodValidity: '', |
| | | copy: '', |
| | | original: '', |
| | | fileName: '' |
| | | } |
| | | done(); |
| | | }, |
| | | resetForm(formName) { |
| | | this.$refs[formName].resetFields(); |
| | | }, |
| | | getAge (val) { |
| | | this.form.age = this.calculateAge(val) |
| | | }, |
| | | calculateAge(birthDateString) { |
| | | // è§£æåºçæ¥æåç¬¦ä¸²ä¸ºæ¥æå¯¹è±¡ |
| | | const birthDate = new Date(birthDateString); |
| | | |
| | | // è·åå½åæ¥æ |
| | | const currentDate = new Date(); |
| | | |
| | | // 计ç®å¹´ä»½å·® |
| | | let age = currentDate.getFullYear() - birthDate.getFullYear(); |
| | | |
| | | // æ£æ¥æ¯å¦å·²ç»è¿äºä»å¹´ççæ¥ |
| | | const currentMonth = currentDate.getMonth(); |
| | | const currentDay = currentDate.getDate(); |
| | | const birthMonth = birthDate.getMonth(); |
| | | const birthDay = birthDate.getDate(); |
| | | |
| | | if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) { |
| | | // å¦æè¿æ²¡å°ä»å¹´ççæ¥ï¼å¹´é¾å1 |
| | | age--; |
| | | } |
| | | |
| | | return age; |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° |
| | | clickNodeVal: { |
| | | handler(newVal, oldVal) { |
| | | if (newVal.userId) { |
| | | this.getUserBasisInfo(newVal.userId) |
| | | this.searchTableList() |
| | | this.searchTableList2() |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-table__body-wrapper::-webkit-scrollbar { |
| | | height: 12px; |
| | | /* 设置æ»å¨æ¡å®½åº¦ */ |
| | | } |
| | | >>>.el-form-item { |
| | | margin-bottom: 3px; |
| | | } |
| | | |
| | | .el-input { |
| | | border-radius: 15px; |
| | | } |
| | | |
| | | .el-icon-picture-outline { |
| | | position: absolute; |
| | | left: 50%; |
| | | top: 50%; |
| | | transform: translate(-50%, -50%); |
| | | } |
| | | |
| | | .uploadFile { |
| | | margin-top: 2px; |
| | | float: left; |
| | | } |
| | | .avatar-uploader-icon { |
| | | font-size: 28px; |
| | | color: #0f8bf1; |
| | | width: 178px; |
| | | height: 50px; |
| | | text-align: center; |
| | | border: 1px solid #d9d9d9; |
| | | } |
| | | .avatar { |
| | | width: 178px; |
| | | height: 178px; |
| | | display: block; |
| | | } |
| | | </style> |