From 840de9662167b1d7758208b9c88adda806ed8fec Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期一, 03 三月 2025 16:47:25 +0800 Subject: [PATCH] 删除导出成功提示,统一提示了 --- src/views/CNAS/personnel/personnelInfo/tabs/personnel-information.vue | 284 +++++++++++++++++++++++++++----------------------------- 1 files changed, 138 insertions(+), 146 deletions(-) diff --git a/src/views/CNAS/personnel/personnelInfo/tabs/personnel-information.vue b/src/views/CNAS/personnel/personnelInfo/tabs/personnel-information.vue index 2b71f75..7df2ab0 100644 --- a/src/views/CNAS/personnel/personnelInfo/tabs/personnel-information.vue +++ b/src/views/CNAS/personnel/personnelInfo/tabs/personnel-information.vue @@ -1,7 +1,7 @@ <template> <div> <div style="text-align: right;margin-bottom: 10px"> -<!-- <el-button size="small" @click="$emit('goBackList')">杩斿洖</el-button>--> + <!-- <el-button size="small" @click="$emit('goBackList')">杩斿洖</el-button>--> <el-button size="small" type="primary" @click="downPerson">涓嬭浇妗f</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> @@ -10,13 +10,13 @@ <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;"> + 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;"> + 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> @@ -61,7 +61,9 @@ </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-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> @@ -74,7 +76,7 @@ <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"> + style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> </el-form-item> </el-col> @@ -95,14 +97,14 @@ <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"> + 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"> + style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> </el-form-item> </el-col> @@ -123,8 +125,7 @@ <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"> + @change="getAge" style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> </el-form-item> </el-col> @@ -147,8 +148,8 @@ </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-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"> @@ -163,9 +164,8 @@ <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 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> @@ -188,9 +188,8 @@ </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 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> @@ -225,9 +224,8 @@ </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 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> @@ -245,9 +243,8 @@ </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 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> @@ -255,9 +252,8 @@ <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 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> @@ -272,20 +268,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> + @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-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-button v-if="form.pictureUrl" class="uploadFile" size="mini" type="primary" + @click="downloadFile(form.pictureUrl)">涓嬭浇</el-button> </el-col> </el-row> <el-row> @@ -293,60 +287,57 @@ <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> + @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-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-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 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-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> + <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 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-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> + <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 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-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"> @@ -356,8 +347,9 @@ </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> + <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> @@ -374,8 +366,7 @@ </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 v-for="v in dict.type.personnl_type" :key="v.value" :label="v.value"></el-checkbox> </el-checkbox-group> </el-col> </el-row> @@ -387,7 +378,8 @@ </el-dialog> <!-- 鏂板闄勪欢璧勬枡 --> - <el-dialog :before-close="handleClose" :title="title" :visible.sync="dialogVisible1" width="40%" @open="getComparisonList"> + <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"> @@ -414,9 +406,9 @@ <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-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> @@ -438,14 +430,11 @@ <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')" + <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">--> + <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> @@ -463,7 +452,8 @@ <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-input type="textarea" v-model="annex2.workExperience" clearable size="small" + style="width: 100%;"></el-input> </el-form-item> </el-col> </el-row> @@ -549,23 +539,23 @@ 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' @@ -587,7 +577,7 @@ name: '缂栬緫', type: 'text', clickFun: (row) => { - this.annexAdd(1,row) + this.annexAdd(1, row) } }, { @@ -680,7 +670,7 @@ isSave: false, } }, - components: {limsTable, fileDownload}, + components: { limsTable, fileDownload }, created() { this.init() this.searchTableList() @@ -696,11 +686,10 @@ }, methods: { // 涓嬭浇妗f - downPerson(){ - exportPersonBasicInfoById({id: this.clickNodeVal.userId}).then(res => { - const blob = new Blob([res],{ type: 'application/msword' }); + downPerson() { + exportPersonBasicInfoById({ id: this.clickNodeVal.userId }).then(res => { + const blob = new Blob([res], { type: 'application/msword' }); this.$download.saveAs(blob, '浜哄憳妗f.docx'); - this.$message.success('瀵煎嚭鎴愬姛') }) }, // 涓婁紶楠岃瘉 @@ -715,11 +704,11 @@ return Promise.reject(flag); //姝g‘鐨勭粓姝� } }, - onError(err, file, fileList,type) { + onError(err, file, fileList, type) { this.$message.error('涓婁紶澶辫触') this.$refs.upload.clearFiles() }, - handleSuccessUp(response, ) { + handleSuccessUp(response,) { this.upLoading = false; if (response.code == 200) { this.$message.success('涓婁紶鎴愬姛'); @@ -729,9 +718,9 @@ } }, // 鏌ヨ闄勪欢鍒楄〃 - searchTableList () { + searchTableList() { this.tableLoading = true - getBasicInfoFileList({userId: this.clickNodeVal.userId}).then(res => { + getBasicInfoFileList({ userId: this.clickNodeVal.userId }).then(res => { this.tableLoading = false this.tableData = res.data }).catch(err => { @@ -740,13 +729,13 @@ }) }, // 涓嬭浇 - upload (row) { + 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 + 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; @@ -754,14 +743,14 @@ } }, // 鍒犻櫎 - delete (row) { + delete(row) { this.$confirm('姝ゆ搷浣滃皢鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { this.tableLoading = true - delBasicInfoFileList({basicInfoFileId: row.basicInfoFileId}).then(res => { + delBasicInfoFileList({ basicInfoFileId: row.basicInfoFileId }).then(res => { this.tableLoading = false this.$message.success('鍒犻櫎鎴愬姛') this.searchTableList(); @@ -776,7 +765,7 @@ }) }, // 鎵撳紑宸ヤ綔缁忓巻鎺㈠喌 - annexAdd1 (type, row) { + annexAdd1(type, row) { this.operationType = type if (type === 'edit') { this.basicInfoWorkId = row.basicInfoWorkId @@ -788,7 +777,7 @@ this.dialogVisible2 = true }, // 鎻愪氦宸ヤ綔缁忓巻 - submitForm2 () { + submitForm2() { const params = { workExperience: this.annex2.workExperience, userId: this.clickNodeVal.userId, @@ -818,19 +807,19 @@ } }, // 鍏抽棴宸ヤ綔缁忓巻寮规 - handleClose2 () { + handleClose2() { this.dialogVisible2 = false this.annex2.workExperience = '' }, // 鍒犻櫎宸ヤ綔缁忓巻 - deleteAnnex1 (row) { + deleteAnnex1(row) { this.$confirm('姝ゆ搷浣滃皢鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { this.tableLoading1 = true - delBasicInfoWorkList({basicInfoWorkId: row.basicInfoWorkId}).then(res => { + delBasicInfoWorkList({ basicInfoWorkId: row.basicInfoWorkId }).then(res => { this.tableLoading1 = false this.$message.success('鍒犻櫎鎴愬姛') this.searchTableList2(); @@ -845,9 +834,9 @@ }); }, // 鏌ヨ宸ヤ綔缁忓巻鍒楄〃 - searchTableList2 () { + searchTableList2() { this.tableLoading1 = true - getBasicInfoWorkList({userId: this.clickNodeVal.userId}).then(res => { + getBasicInfoWorkList({ userId: this.clickNodeVal.userId }).then(res => { this.tableLoading1 = false this.tableData1 = res.data }).catch(err => { @@ -855,15 +844,15 @@ console.log('err---', err); }) }, - annexAdd(type,row) { - if(type === 1) { + annexAdd(type, row) { + if (type === 1) { this.title = '缂栬緫闄勪欢璧勬枡' this.addOrupdate = 1 - getAnnex({id: row.id}).then(res => { + getAnnex({ id: row.id }).then(res => { this.annex = res.data this.imageUrl = this.javaApi + '/img/' + res.data.fileName }) - }else { + } else { this.title = '鏂板闄勪欢璧勬枡' this.addOrupdate = 2 } @@ -879,15 +868,15 @@ }) }, addAnnex() { - if(this.annex.fileName == "" || this.annex.fileName == null || this.annex.fileName == undefined) { + 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) { + if (this.addOrupdate === 1) { updateAnnex(this.annex).then(res => { - if(res.code == 200) { - getAnnexByUserId({userId: this.clickNodeVal.userId}).then(res => { + if (res.code == 200) { + getAnnexByUserId({ userId: this.clickNodeVal.userId }).then(res => { this.imageUrl = '' this.resetForm('annex') this.annexList = res.data @@ -896,11 +885,11 @@ }) } }) - }else { + } else { this.annex.id = null addAnnex(this.annex).then(res => { - if(res.code == 200) { - getAnnexByUserId({userId: this.clickNodeVal.userId}).then(res => { + if (res.code == 200) { + getAnnexByUserId({ userId: this.clickNodeVal.userId }).then(res => { this.imageUrl = '' this.resetForm('annex') this.annexList = res.data @@ -917,7 +906,7 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - deleteAnnex({id: row.id}).then(res => { + deleteAnnex({ id: row.id }).then(res => { this.$message.success('鍒犻櫎鎴愬姛锛�') this.annexList = this.annexList.filter(item => item.id != row.id) }) @@ -949,7 +938,7 @@ } }, async onSuccess(response, file, fileList, entityVal) { - if(entityVal == 'fileName') { + if (entityVal == 'fileName') { this.annex.fileName = response.data } // 鍦ㄤ繚瀛樿祴鍊兼柊鏂囦欢 @@ -967,7 +956,7 @@ } }, getUserBasisInfo(userId) { - getCNASPersonnelInfo({userId: userId}).then(res => { + getCNASPersonnelInfo({ userId: userId }).then(res => { this.form = res.data.PersonBasicInfoDto this.department = res.data.department this.annexList = res.data.annexList @@ -977,10 +966,10 @@ async save() { this.saveLoading = true this.form.userId = this.clickNodeVal.userId - if(Array.isArray(this.form.departLimsId)) { - if(this.form.departLimsId.length > 0) { + if (Array.isArray(this.form.departLimsId)) { + if (this.form.departLimsId.length > 0) { this.form.departLimsId = this.form.departLimsId.join(',').trim() + ',' - }else { + } else { this.form.departLimsId = '' } } @@ -999,10 +988,10 @@ }, clickPersonnelClassificationSure() { this.dialogVisible = false - this.form.personnelClassification = this.checkList.filter(m=>m).join('锛�') + this.form.personnelClassification = this.checkList.filter(m => m).join('锛�') }, async deleteFile(fileName, entityVal) { - await deleteCNASFile({fileName: fileName}).then(res => { + await deleteCNASFile({ fileName: fileName }).then(res => { this.$message.success('鍒犻櫎鎴愬姛锛�') this.$set(this.form, entityVal, null) let index = this.successFileList.indexOf(fileName) @@ -1033,7 +1022,7 @@ resetForm(formName) { this.$refs[formName].resetFields(); }, - getAge (val) { + getAge(val) { this.form.age = this.calculateAge(val) }, calculateAge(birthDateString) { @@ -1080,36 +1069,39 @@ height: 12px; /* 璁剧疆婊氬姩鏉″搴� */ } + >>>.el-form-item { - margin-bottom: 3px; + margin-bottom: 3px; } .el-input { - border-radius: 15px; + border-radius: 15px; } .el-icon-picture-outline { - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); } .uploadFile { - margin-top: 2px; - float: left; + 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; - } + +.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> -- Gitblit v1.9.3