| | |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | @click="handleImport1" |
| | | >批量导入 |
| | | </el-button> |
| | | <el-button |
| | | type="danger" |
| | | style="display: none" |
| | | size="small" |
| | |
| | | </template> |
| | | </avue-crud> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="保安员导入" |
| | | append-to-body |
| | | :visible.sync="excelBox1" |
| | | width="555px" |
| | | > |
| | | <avue-form |
| | | :option="excelOption1" |
| | | v-model="excelForm1" |
| | | :upload-after="uploadAfter1" |
| | | > |
| | | <template slot="excelTemplate"> |
| | | <el-button type="primary" @click="handleTemplate1"> |
| | | 点击下载<i class="el-icon-download el-icon--right"></i> |
| | | </el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | } |
| | | }; |
| | | return { |
| | | excelBox1: false, |
| | | excelForm1: {}, |
| | | excelOption1: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | column: [ |
| | | { |
| | | label: "文件上传", |
| | | prop: "excelFile", |
| | | type: "upload", |
| | | drag: true, |
| | | loadText: "文件上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/examSubjectChoices/import-examSubject", |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | form: {}, |
| | | search: {}, |
| | | roleBox: false, |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | handleImport1() { |
| | | this.excelBox1 = true; |
| | | }, |
| | | uploadAfter1(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox1 = false; |
| | | // this.refreshChange(); |
| | | done(); |
| | | }, |
| | | handleTemplate1() { |
| | | window.open(`/api/examSubjectChoices/export-template`); |
| | | }, |
| | | |
| | | //行点击事件 |
| | | rowClick(row) { |
| | | this.$router.push({ |
| | |
| | | entryTime: item.entryTime, |
| | | name: row.realName, |
| | | leaving: item.leaving, |
| | | cardid: row.cardid, |
| | | securityid: row.id, |
| | | post: item.post, |
| | | responsibilities: item.responsibilities, |
| | | }; |
| | | userPractitionersList.push(info); |
| | | }); |
| | | } |
| | | var IdCardNo = row.cardid; |
| | | var IdCardNo = row.id; |
| | | add(row).then( |
| | | () => { |
| | | const experience = { |
| | | cardid: IdCardNo, |
| | | securityid: IdCardNo, |
| | | userPractitionersInfo: userPractitionersList, |
| | | }; |
| | | //新增从业信息 |
| | |
| | | entryTime: item.entryTime, |
| | | name: row.realName, |
| | | leaving: item.leaving, |
| | | cardid: row.cardid, |
| | | securityid: row.id, |
| | | post: item.post, |
| | | responsibilities: item.responsibilities, |
| | | }; |
| | | userPractitionersList.push(info); |
| | | }); |
| | | } |
| | | var IdCardNo = row.cardid; |
| | | var IdCardNo = row.id; |
| | | //值替换,education 放在页面会卡死 |
| | | row.education = row.education1; |
| | | update(row).then( |
| | | () => { |
| | | const experience = { |
| | | cardid: IdCardNo, |
| | | securityid: IdCardNo, |
| | | userPractitionersInfo: userPractitionersList, |
| | | }; |
| | | //更新从业信息 |
| | |
| | | } |
| | | var userInfo = res.data.data; |
| | | //获取用户从业信息 |
| | | getUserPractitionersInfo(userInfo.cardid).then((res1) => { |
| | | getUserPractitionersInfo(userInfo.id).then((res1) => { |
| | | that.form.UserPractitionersInfo = res1.data.data; |
| | | }); |
| | | }); |