| | |
| | | <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" @submit="submit"> </avue-form> |
| | | </span> |
| | | <span v-else-if="typeTABS.prop === 'tab2'"> |
| | | <avue-crud |
| | |
| | | > |
| | | </avue-crud> |
| | | </span> |
| | | <span v-else-if="typeTABS.prop === 'tab4'"> |
| | | <span v-else-if="typeTABS.prop === 'tab4' && isSecurity"> |
| | | <!-- 保安员证 --> |
| | | <div class="baoanzheng" id="baoanzheng"> |
| | | <div class="baz-main"> |
| | |
| | | import { |
| | | addExperience, |
| | | updateExperience, |
| | | getExperienceDetail, |
| | | getUserDetails, |
| | | experienceRemove, |
| | | getExperienceList |
| | | } from "@/api/experience/experience"; |
| | |
| | | getER, |
| | | } from "@/api/performance/performance"; |
| | | |
| | | // import vueQr from "vue-qr"; |
| | | import {update as updateUserInfo} from "@/api/system/user"; |
| | | |
| | | import { mapState } from "vuex"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | typeTABS: {}, //标签页 |
| | | row: {}, //数据 |
| | | isSecurity:false, |
| | | optionTABS: { |
| | | column: [ |
| | | { |
| | |
| | | label: "现实表现记录", |
| | | prop: "tab3", |
| | | }, |
| | | { |
| | | // icon: "el-icon-info", |
| | | label: "保安员证", |
| | | prop: "tab4", |
| | | }, |
| | | // { |
| | | // // icon: "el-icon-info", |
| | | // label: "保安员证", |
| | | // prop: "tab4", |
| | | // }, |
| | | ], |
| | | }, |
| | | current: 1, |
| | |
| | | dispatcherCompany: "", |
| | | id: "", |
| | | obj0: { |
| | | title: "我是头部标题", |
| | | title: "", |
| | | }, |
| | | option0: { |
| | | emptyBtn: false, |
| | | submitBtn: false, |
| | | submitBtn: true, |
| | | labelWidth: "110", |
| | | gutter: 30, |
| | | column: securityBaseInfoColumn, |
| | |
| | | }, |
| | | option2: { |
| | | card: true, |
| | | menu: true, |
| | | menu: false, |
| | | addBtn:false, |
| | | height: "auto", |
| | | widtd: "auto", |
| | | calcHeight: 54, |
| | |
| | | }); |
| | | return ids1.join(","); |
| | | }, |
| | | // goToUrl() { |
| | | // var url = |
| | | // "http://s16s652780.51mypc.cn/securityInfo/securityInfo.html?securityNumber=" + |
| | | // this.obj0.securitynumber; |
| | | // return url; |
| | | // }, |
| | | ...mapState({ |
| | | userInfo: (state) => state.user.userInfo, |
| | | }), |
| | | |
| | | }, |
| | | methods: { |
| | | Print() { |
| | |
| | | securityid: this.id, |
| | | }; |
| | | //获取用户从业信息 |
| | | console.log(this.id, "cid"); |
| | | getExperienceList(this.current, this.size,param).then((res1) => { |
| | | const data = res1.data.data; |
| | | this.page1.total = data.total; |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | //信息修改 |
| | | submit(){ |
| | | |
| | | updateUserInfo(this.obj0).then(()=>{ |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }) |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.typeTABS = this.optionTABS.column[0]; |
| | | var data = JSON.parse(this.$route.query.row); |
| | | // console.log(data); |
| | | if (data) { |
| | | var row = data; |
| | | // var row = this.$route.query.row; |
| | | for (var k in row) { |
| | | this.obj0[k] = row[k]; |
| | | } |
| | | this.obj0.title = ""; |
| | | this.cardid = row.id; |
| | | this.name = row.name; |
| | | this.dispatcherCompany = row.dispatcherCompany; |
| | | this.id = row.id; |
| | | console.log(this.obj0); |
| | | // var data = JSON.parse(this.$route.query.row); |
| | | //查询保安员信息 |
| | | console.log(this.userInfo,456); |
| | | this.id = this.userInfo.Id; |
| | | var roleName = this.userInfo.role_name; |
| | | debugger; |
| | | //如果保安,才能看保安证 |
| | | if(roleName=="保安"){ |
| | | this.isSecurity= true; |
| | | this.optionTABS.column = [ |
| | | { |
| | | // icon: "el-icon-info", |
| | | label: "保安员基本信息", |
| | | prop: "tab1", |
| | | }, |
| | | { |
| | | // icon: "el-icon-info", |
| | | label: "从业记录", |
| | | prop: "tab2", |
| | | }, |
| | | { |
| | | // icon: "el-icon-info", |
| | | label: "现实表现记录", |
| | | prop: "tab3", |
| | | }, |
| | | { |
| | | // icon: "el-icon-info", |
| | | label: "保安员证", |
| | | prop: "tab4", |
| | | }, |
| | | ] |
| | | } |
| | | getUserDetails(this.id).then((res)=>{ |
| | | console.log(res.data.data,123); |
| | | var data = res.data.data; |
| | | this.obj0 = data; |
| | | }) |
| | | |
| | | |
| | | var flag = false, |
| | | i = 0, |