| | |
| | | <i slot="prefix" class="icon-shouji"/> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-select v-model="loginForm.deptid" placeholder="请选择部门" style="width: 580px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.code" |
| | | :label="item.deptname" |
| | | :value="item.deptid"> |
| | | </el-option> |
| | | <i slot="prefix" class="icon-yonghu"/> |
| | | </el-select> |
| | | <!-- <el-select v-model="loginForm.deptid" placeholder="请选择部门" style="width: 580px;">--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in options"--> |
| | | <!-- :key="item.code"--> |
| | | <!-- :label="item.deptname"--> |
| | | <!-- :value="item.deptid">--> |
| | | <!-- </el-option>--> |
| | | <!-- <i slot="prefix" class="icon-yonghu"/>--> |
| | | <!-- </el-select>--> |
| | | <avue-input-tree style="width:580px !important" default-expand-all v-model="loginForm.deptid" placeholder="请选择部门" type="tree" |
| | | :dic="dic"></avue-input-tree> |
| | | <div style="margin-top: 16px"> |
| | | <el-radio v-model="loginForm.sex" label="0" border size="medium">男</el-radio> |
| | | <el-radio v-model="loginForm.sex" label="1" border size="medium">女</el-radio> |
| | |
| | | <el-button size="small" |
| | | type="primary" |
| | | @click.native.prevent="handleLogin" |
| | | class="z-login-submit">{{$t('login.zc')}}</el-button> |
| | | class="z-login-submit">{{ $t('login.zc') }} |
| | | </el-button> |
| | | <el-button size="small" |
| | | @click.native.prevent="gbs" |
| | | class="z-login-submit">{{$t('login.gb')}}</el-button> |
| | | class="z-login-submit">{{ $t('login.gb') }} |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | |
| | | import {inster} from "@/api/zc/zc"; |
| | | import {fetch,ss} from "@/api/system/dept"; |
| | | import { mapGetters } from "vuex"; |
| | | |
| | | export default { |
| | | name: "codelogin", |
| | | data() { |
| | |
| | | return { |
| | | msgText: "", |
| | | msgTime: "", |
| | | dic: [], |
| | | msgKey: false, |
| | | loginForm: { |
| | | phone: "", |
| | |
| | | this.msgTime = this.config.MSGTIME; |
| | | }, |
| | | mounted() { |
| | | this.allmedia(); |
| | | var that = this; |
| | | |
| | | //this.allmedia(); |
| | | ss().then(res => { |
| | | that.dic = that.ergodicData(res.data.data) |
| | | }); |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["tagWel"]), |
| | |
| | | }, |
| | | props: [], |
| | | methods: { |
| | | ergodicData(val) { |
| | | var arr = []; |
| | | arr.push({label: val[0].title, value: val[0].value, id: val[0].id, parent_id: val[0].parent_id}); |
| | | if (val.length > 1) { |
| | | val.forEach((item, index) => { |
| | | if (index > 0) { |
| | | var ind = true; |
| | | var arrInd = 0; |
| | | arr.forEach((it, i) => { |
| | | if (item.parent_id == it.id) { |
| | | ind = false; |
| | | arrInd = i; |
| | | return |
| | | } |
| | | }) |
| | | if (ind == false) { |
| | | if (arr[arrInd].children && arr[arrInd].children.length > 0) { |
| | | arr[arrInd].children.push({label: item.title, value: item.value, id: item.id, parent_id: item.parent_id}); |
| | | } else { |
| | | arr[arrInd].children = []; |
| | | arr[arrInd].children.push({label: item.title, value: item.value, id: item.id, parent_id: item.parent_id}); |
| | | } |
| | | } else { |
| | | arr.push({label: item.title, value: item.value, id: item.id, parent_id: item.parent_id}); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | return arr; |
| | | }, |
| | | |
| | | clearValidate(formName) { |
| | | this.$refs[formName].clearValidate(); |
| | | }, |
| | |
| | | // }) |
| | | }, |
| | | refreshCode(row) { |
| | | console.log(this.loginForm) |
| | | inster(row).then(res => { |
| | | this.loginForm.phone="" |
| | | this.loginForm.username="" |
| | |
| | | }, |
| | | handleLogin() { |
| | | this.$refs.loginForm.validate(valid => { |
| | | console.log(valid) |
| | | if (valid) { |
| | | this.refreshCode(this.loginForm); |
| | | this.message('dahsiofhiusa'); |
| | |
| | | text-align: center; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .msg-text.display { |
| | | color: #ccc; |
| | | } |