| | |
| | | <div class="dispatch"> |
| | | <avue-tabs :option="optionTABS" @change="handleChangeTABS"></avue-tabs> |
| | | <span v-if="typeTABS.prop === 'tab1'"> |
| | | <avue-form ref="form" v-model="obj0" :option="option0"> |
| | | </avue-form> |
| | | <avue-form ref="form" v-model="obj0" :option="option0"> </avue-form> |
| | | </span> |
| | | <span v-else-if="typeTABS.prop === 'tab2'"> |
| | | <avue-crud |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { securityBaseInfoColumn, practitionersColumn,trackRecordColumn } from "./data"; |
| | | import {getUserPractitionersInfo} from "@/api/system/user"; |
| | | import {add,update,page,remove,getPerformanceInfo} from "@/api/performance/performance"; |
| | | import { |
| | | securityBaseInfoColumn, |
| | | practitionersColumn, |
| | | trackRecordColumn, |
| | | } from "./data"; |
| | | import { getUserPractitionersInfo } from "@/api/system/user"; |
| | | import { add, update, page, remove } from "@/api/performance/performance"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | current:1, |
| | | size:10, |
| | | cardid: "", |
| | | current: 1, |
| | | size: 10, |
| | | cardid: "", |
| | | name: "", |
| | | dispatcherCompany: "", |
| | | id: "", |
| | |
| | | option0: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | labelWidth:"110", |
| | | labelWidth: "110", |
| | | gutter: 30, |
| | | column: securityBaseInfoColumn, |
| | | }, |
| | |
| | | data1: [], |
| | | data2: [], |
| | | option1: { |
| | | card: false, |
| | | menu:false, |
| | | addBtn:false, |
| | | height:'auto', |
| | | widtd:"auto", |
| | | card: true, |
| | | menu: false, |
| | | addBtn: false, |
| | | height: "auto", |
| | | widtd: "auto", |
| | | calcHeight: 54, |
| | | border: false, |
| | | stripe:true, |
| | | stripe: true, |
| | | tip: false, |
| | | index: true, |
| | | dialogClickModal: false, |
| | | headerAlign: 'center', |
| | | align: 'center', |
| | | headerAlign: "center", |
| | | align: "center", |
| | | column: practitionersColumn, |
| | | }, |
| | | option2: { |
| | | card: true, |
| | | menu:true, |
| | | height:'auto', |
| | | widtd:"auto", |
| | | menu: true, |
| | | height: "auto", |
| | | widtd: "auto", |
| | | calcHeight: 54, |
| | | border: false, |
| | | stripe:true, |
| | | stripe: true, |
| | | tip: false, |
| | | index: true, |
| | | dialogClickModal: false, |
| | | headerAlign: 'center', |
| | | align: 'center', |
| | | headerAlign: "center", |
| | | align: "center", |
| | | column: trackRecordColumn, |
| | | }, |
| | | }; |
| | |
| | | if (column.prop == "tab1") { |
| | | this.loading1 = false; |
| | | } else if (column.prop == "tab2") { |
| | | //查询当前保安员的从业记录信息 |
| | | this.getPractitionersPageInfo(); |
| | | this.loading1 = false; |
| | | //查询当前保安员的从业记录信息 |
| | | this.getPractitionersPageInfo(); |
| | | this.loading1 = false; |
| | | } else if (column.prop == "tab3") { |
| | | //查询当前保安员的现实表现记录 |
| | | this.getPerformancePageInfo(); |
| | | this.loading2 = false; |
| | | //查询当前保安员的现实表现记录 |
| | | this.getPerformancePageInfo(); |
| | | this.loading2 = false; |
| | | } |
| | | }, |
| | | //查询当前保安员的从业记录信息 |
| | | getPractitionersPageInfo(){ |
| | | var that = this; |
| | | //获取用户从业信息 |
| | | getUserPractitionersInfo(this.cardid).then(res1 =>{ |
| | | that.data1 = res1.data.data; |
| | | }) |
| | | getPractitionersPageInfo() { |
| | | var that = this; |
| | | //获取用户从业信息 |
| | | getUserPractitionersInfo(this.cardid).then((res1) => { |
| | | that.data1 = res1.data.data; |
| | | }); |
| | | }, |
| | | //查询当前保安员的现实表现记录信息 |
| | | 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; |
| | | }) |
| | | 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; |
| | | }); |
| | | }, |
| | | rowSave2(form, done, loading) { |
| | | form.cardid = this.cardid; |
| | | add(form).then((res) => { |
| | | add(form).then( |
| | | (res) => { |
| | | this.getPerformancePageInfo(this.page2); |
| | | this.$message({ |
| | | type: "success", |
| | |
| | | }, |
| | | mounted() { |
| | | this.typeTABS = this.optionTABS.column[0]; |
| | | if (this.$route.query.row) { |
| | | var row = this.$route.query.row; |
| | | var data = JSON.parse(this.$route.query.row); |
| | | if (data) { |
| | | var row = data; |
| | | // var row = this.$route.query.row; |
| | | for (var k in row) { |
| | | this.obj0[k] = row[k]; |
| | | } |
| | |
| | | this.dispatcherCompany = row.dispatcherCompany; |
| | | this.id = row.id; |
| | | } |
| | | |
| | | var flag = false, |
| | | i = 0, |
| | | ind = null; |
| | | this.$store.state.tags.tagList.forEach((item, index) => { |
| | | if (item.label == "保安员详情") { |
| | | if (flag == false) { |
| | | ind = index; |
| | | flag = true; |
| | | } |
| | | i++; |
| | | } |
| | | }); |
| | | if (i > 1) { |
| | | this.$store.state.tags.tagList.splice(ind, 1); |
| | | } |
| | | }, |
| | | }; |
| | | </script> |