| | |
| | | :data="data1" |
| | | :page.sync="page1" |
| | | :table-loading="loading1" |
| | | @row-save="rowSave1" |
| | | @row-update="rowUpdate1" |
| | | @row-del="rowDel1" |
| | | @refresh-change="refreshChange1" |
| | | > |
| | | </avue-crud> |
| | |
| | | practitionersColumn, |
| | | trackRecordColumn, |
| | | } from "./data"; |
| | | import { getUserPractitionersInfo } from "@/api/system/user"; |
| | | import { |
| | | addExperience, |
| | | updateExperience, |
| | | getExperienceDetail, |
| | | experienceRemove, |
| | | getExperienceList |
| | | } from "@/api/experience/experience"; |
| | | |
| | | import { |
| | | getPerformanceInfo, |
| | | add, |
| | |
| | | total: 0, |
| | | }, |
| | | query1: {}, |
| | | query2: {}, |
| | | data1: [], |
| | | data2: [], |
| | | option1: { |
| | | card: true, |
| | | menu: false, |
| | | addBtn: false, |
| | | menu: true, |
| | | height: "auto", |
| | | widtd: "auto", |
| | | calcHeight: 54, |
| | |
| | | }, |
| | | //查询当前保安员的从业记录信息 |
| | | getPractitionersPageInfo() { |
| | | var that = this; |
| | | var param = { |
| | | securityid: this.id, |
| | | }; |
| | | //获取用户从业信息 |
| | | console.log(this.id, "cid"); |
| | | getUserPractitionersInfo(this.id).then((res1) => { |
| | | that.data1 = res1.data.data; |
| | | getExperienceList(this.current, this.size,param).then((res1) => { |
| | | const data = res1.data.data; |
| | | this.page1.total = data.total; |
| | | this.data1 = data.records; |
| | | this.loading1 = false; |
| | | }); |
| | | }, |
| | | //查询当前保安员的现实表现记录信息 |
| | | getPerformancePageInfo() { |
| | | //获取现实表现信息 |
| | | // getPerformanceInfo(this.id).then((res) => { |
| | | // that.data2 = res1.data.data; |
| | | // console.log(that.data2, 1); |
| | | // }); |
| | | var param = { |
| | | securityid: this.id, |
| | | }; |
| | |
| | | this.loading2 = false; |
| | | }); |
| | | }, |
| | | |
| | | |
| | | rowSave2(form, done, loading) { |
| | | form.securityid = this.id; |
| | | add(form).then( |
| | | (res) => { |
| | | this.getPerformancePageInfo(this.page2); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | // } |
| | | }, |
| | | //从业记录新增 |
| | | rowSave1(form, done, loading) { |
| | | form.securityid = this.id; |
| | | addExperience(form).then( |
| | | (res) => { |
| | | this.getPractitionersPageInfo(this.page1); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | |
| | | } |
| | | ); |
| | | }, |
| | | rowUpdate1(row, index, done, loading) { |
| | | row.securityid = this.id; |
| | | updateExperience(row).then( |
| | | () => { |
| | | this.getPractitionersPageInfo(this.page1); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel2(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | rowDel1(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return experienceRemove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.getPractitionersPageInfo(this.page1); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.typeTABS = this.optionTABS.column[0]; |