| | |
| | | :option="option2" |
| | | :data="data2" |
| | | :page.sync="page2" |
| | | @row-save="rowSave2" |
| | | @row-update="rowUpdate2" |
| | | @row-del="rowDel2" |
| | | :table-loading="loading2" |
| | | @refresh-change="refreshChange2" |
| | | > |
| | |
| | | <script> |
| | | import { securityBaseInfoColumn, practitionersColumn,trackRecordColumn } from "./data"; |
| | | import {getUserPractitionersInfo} from "@/api/system/user"; |
| | | import {add,update,page,remove,getPerformanceInfo} from "@/api/performance/performance"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | current:1, |
| | | size:10, |
| | | cardid: "", |
| | | name: "", |
| | | dispatcherCompany: "", |
| | |
| | | column: practitionersColumn, |
| | | }, |
| | | option2: { |
| | | card: false, |
| | | menu:false, |
| | | addBtn:false, |
| | | card: true, |
| | | menu:true, |
| | | height:'auto', |
| | | widtd:"auto", |
| | | calcHeight: 54, |
| | |
| | | this.loading1 = false; |
| | | } else if (column.prop == "tab3") { |
| | | //查询当前保安员的现实表现记录 |
| | | this.getPractitionersPageInfo(); |
| | | this.getPerformancePageInfo(); |
| | | this.loading2 = false; |
| | | } |
| | | }, |
| | |
| | | that.data1 = res1.data.data; |
| | | }) |
| | | }, |
| | | currentChange1(val) { |
| | | this.page1.currentPage = val; |
| | | this.onLoad1(this.page1, this.query1); |
| | | //查询当前保安员的现实表现记录信息 |
| | | getPerformancePageInfo(){ |
| | | //获取现实表现信息 |
| | | var param = { |
| | | cardid:this.cardid |
| | | } |
| | | page(this.current,this.size,param).then(res2 =>{ |
| | | const data = res2.data.data; |
| | | this.page2.total = data.total; |
| | | this.data2 = data.records; |
| | | console.log(this.data2, 1); |
| | | this.loading2 = false; |
| | | }) |
| | | }, |
| | | // |
| | | onLoad1(page, params = {}) { |
| | | this.loading1 = true; |
| | | params["dispatcherUnitId"] = this.id; |
| | | console.log(params, "get"); |
| | | } |
| | | rowSave2(form, done, loading) { |
| | | form.cardid = this.cardid; |
| | | add(form).then((res) => { |
| | | this.getPerformancePageInfo(this.page2); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | // } |
| | | }, |
| | | rowUpdate2(row, index, done, loading) { |
| | | row.cardid = this.cardid; |
| | | update(row).then( |
| | | () => { |
| | | this.getPerformancePageInfo(this.page2); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel2(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.getPerformancePageInfo(this.page2); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.typeTABS = this.optionTABS.column[0]; |