Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises
| | |
| | | <i slot="prefix" class="icon-shouji"/> |
| | | </el-input> |
| | | </el-form-item> |
| | | <avue-input-tree style="width:580px !important" :defaultExpandAll="loginForm.defaultFlag" v-model="loginForm.deptid" placeholder="请选择部门" |
| | | <avue-input-tree style="width:580px !important" :defaultExpandAll="false" v-model="loginForm.deptid" placeholder="请选择部门" |
| | | type="tree" |
| | | :dic="dic"></avue-input-tree> |
| | | <el-form-item class="z-login-submit-prv"> |
| | |
| | | dicr: [], |
| | | msgKey: false, |
| | | loginForm: { |
| | | defaultFlag: false, |
| | | cardid: "", |
| | | username: "", |
| | | sname: "", |
| | |
| | | created() { |
| | | this.msgText = this.config.MSGINIT; |
| | | this.msgTime = this.config.MSGTIME; |
| | | defaultFlag |
| | | }, |
| | | mounted() { |
| | | var that = this; |
| | | ss().then(res => { |
| | | console.log(that.ergodicData(res.data.data), 898989) |
| | | that.dic = that.ergodicData(res.data.data) |
| | | console.log(that.processingData(res.data.data), 898989) |
| | | that.dic = that.processingData(res.data.data) |
| | | }); |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | props: [], |
| | | methods: { |
| | | ergodicData(val) { |
| | | var arr = [] |
| | | |
| | | val.forEach((item, index) => { |
| | | processingData(val) { |
| | | |
| | | arr.push({label: item.title, value: item.value, id: item.id, parent_id: item.parent_id}) |
| | | for (var i = 0; i < val.length; i++) { |
| | | |
| | | val[i].label = val[i].title |
| | | |
| | | if (item.hasChildren == true) { |
| | | if (val[i].hasChildren == true) { |
| | | |
| | | var arrOne = [] |
| | | if (val[i].children && val[i].children.length > 0) { |
| | | |
| | | if (item.children && item.children.length > 0) { |
| | | this.processingData(val[i].children) |
| | | |
| | | item.children.forEach((childItem, childIndex) => { |
| | | |
| | | arrOne.push({ |
| | | label: childItem.title, |
| | | value: childItem.value, |
| | | id: childItem.id, |
| | | parent_id: childItem.parent_id |
| | | }) |
| | | |
| | | |
| | | if (childItem.hasChildren == true) { |
| | | |
| | | var arrTwo = [] |
| | | |
| | | if (childItem.children && childItem.children.length > 0) { |
| | | |
| | | childItem.children.forEach((findItem, findIndex) => { |
| | | |
| | | arrTwo.push({ |
| | | label: findItem.title, |
| | | value: findItem.value, |
| | | id: findItem.id, |
| | | parent_id: findItem.parent_id |
| | | }) |
| | | |
| | | }) |
| | | |
| | | } |
| | | |
| | | arrOne[childIndex].children = arrTwo |
| | | |
| | | } |
| | | |
| | | }) |
| | | } |
| | | |
| | | } |
| | | |
| | | arr[index].children = arrOne |
| | | |
| | | } |
| | | |
| | | |
| | | }) |
| | | |
| | | return arr; |
| | | return val |
| | | }, |
| | | |
| | | clearValidate(formName) { |
| | |
| | | this.loginForm.password = "" |
| | | this.loginForm.password2 = "" |
| | | this.loginForm.deptid = "" |
| | | this.loginForm.defaultFlag = false |
| | | this.$notify({ |
| | | title: '注册成功,待审核', |
| | | type: 'warning' |
| | |
| | | this.loginForm.password = "" |
| | | this.loginForm.password2 = "" |
| | | this.loginForm.deptid = "" |
| | | this.loginForm.defaultFlag = false |
| | | var zs = document.querySelector('.z'); |
| | | zs.style.display = 'none'; |
| | | this.clearValidate('loginForm') |
| | |
| | | <div class="businessLicense"> |
| | | <el-container> |
| | | <el-main> |
| | | <avue-form :option="option" v-model="form" :upload-after="uploadAfter"> |
| | | <avue-form |
| | | :option="option" |
| | | v-model="form" |
| | | :upload-after="uploadAfter" |
| | | :upload-delete="uploadDelete" |
| | | > |
| | | </avue-form |
| | | ></el-main> |
| | | </el-container> |
| | |
| | | this.form.imgUrl = this.row.businessLicense; |
| | | } |
| | | }, |
| | | uploadDelete(column, file) { |
| | | this.row.businessLicense = ""; |
| | | return update(this.row) |
| | | .then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "删除成功!", |
| | | }); |
| | | // done(); |
| | | }) |
| | | .catch((error) => { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "删除照片失败,再重试!", |
| | | }); |
| | | // done(); |
| | | }); |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | // this.row.businessLicense = ""; |
| | | this.row.businessLicense = res.url; |
| | |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "添加成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | |
| | | <div class="License"> |
| | | <el-container> |
| | | <el-main> |
| | | <avue-form :option="option" v-model="form" :upload-after="uploadAfter"> |
| | | <avue-form |
| | | :option="option" |
| | | v-model="form" |
| | | :upload-after="uploadAfter" |
| | | :upload-delete="uploadDelete" |
| | | > |
| | | </avue-form |
| | | ></el-main> |
| | | </el-container> |
| | |
| | | this.form.imgUrl = this.row.licence; |
| | | } |
| | | }, |
| | | uploadDelete(column, file) { |
| | | this.row.licence = ""; |
| | | return update(this.row) |
| | | .then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "删除成功!", |
| | | }); |
| | | // done(); |
| | | }) |
| | | .catch((error) => { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "删除照片失败,再重试!", |
| | | }); |
| | | // done(); |
| | | }); |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | this.row.licence = res.url; |
| | | update(this.row).then( |
| | | () => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "添加成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | |
| | | props: ["deptid"], |
| | | data() { |
| | | var deptid = this.deptid; |
| | | |
| | | if (this.deptid == undefined) { |
| | | // deptid = this.userInfo |
| | | // console.log(this.$store.getters.userInfo.dept_id); |
| | | deptid = this.$store.getters.userInfo.dept_id; |
| | | } |
| | | return { |
| | | do: 0, |
| | | form: { cardid: "" }, |
| | | |
| | | query: {}, |
| | |
| | | }, |
| | | methods: { |
| | | changes(val) { |
| | | this.do++; |
| | | if (this.do >= 2) { |
| | | if (val.value != "") { |
| | | getuseList(val.value).then((res) => { |
| | | // console.log(res); |
| | | var d = res.data.data; |
| | |
| | | label: "账号", |
| | | searchSpan:4, |
| | | display: false, |
| | | search: true, |
| | | disabled:true, |
| | | prop: "username", |
| | | }, |
| | |
| | | { |
| | | label: "姓名", |
| | | display: false, |
| | | search: true, |
| | | searchSpan:4, |
| | | disabled:true, |
| | | prop: "sname", |
| | |
| | | { |
| | | label: "部门", |
| | | editDisplay: false, |
| | | prop: "deptid", |
| | | prop: "deptName", |
| | | }, |
| | | { |
| | | label: "角色", |
| | | prop: "parentId", |
| | | hide: true, |
| | | dicData: [], |
| | | type: "tree", |
| | | props: { |
| | | label: "title" |
| | | }, |
| | | }, |
| | | { |
| | | label: "审核状态", |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | initData(){ |
| | | getRoleTree().then(res => { |
| | | const column = this.findObject(this.option.column, "parentId"); |
| | | column.dicData = res.data.data; |
| | | }); |
| | | }, |
| | | handleEdit (row, index) { |
| | | this.initData(); |
| | | this.$refs.crud.rowEdit(row, index); |
| | | }, |
| | | rowSave(row, done, loading) { |