| | |
| | | <u-input v-model="form.password" placeholder="请输入密码" border="none" type="password" /> |
| | | </u-form-item> |
| | | |
| | | <u-form-item label="超级管理员" prop="isSuper" borderBottom required="true"> |
| | | <u-form-item label="店铺管理员" prop="isSuper" borderBottom required="true"> |
| | | <view class="switch-wrapper"> |
| | | <u-switch v-model="form.isSuper"></u-switch> |
| | | </view> |
| | |
| | | getDeptTree, |
| | | check |
| | | } from "@/api/userPermissions.js" |
| | | import UIcon from '@/uview-components/uview-ui/components/u-icon/u-icon.vue'; |
| | | import UButton from '@/uview-components/uview-ui/components/u-button/u-button.vue'; |
| | | import UForm from '@/uview-components/uview-ui/components/u-form/u-form.vue'; |
| | | import UFormItem from '@/uview-components/uview-ui/components/u-form-item/u-form-item.vue'; |
| | | import UInput from '@/uview-components/uview-ui/components/u-input/u-input.vue'; |
| | | import USearch from '@/uview-components/uview-ui/components/u-search/u-search.vue'; |
| | | import UPopup from '@/uview-components/uview-ui/components/u-popup/u-popup.vue'; |
| | | import ULoading from '@/uview-components/uview-ui/components/u-loading/u-loading.vue'; |
| | | import UCheckbox from '@/uview-components/uview-ui/components/u-checkbox/u-checkbox.vue'; |
| | | import UCheckboxGroup from '@/uview-components/uview-ui/components/u-checkbox-group/u-checkbox-group.vue'; |
| | | import USwitch from '@/uview-components/uview-ui/components/u-switch/u-switch.vue'; |
| | | import '@/components/uview-components/uview-ui'; |
| | | |
| | | import DaTreeVue2 from '@/components/da-tree-vue2/index.vue' |
| | | |
| | | export default { |
| | | |
| | | export default { |
| | | components: { |
| | | UIcon, |
| | | UButton, |
| | | UForm, |
| | | UFormItem, |
| | | UInput, |
| | | USearch, |
| | | UPopup, |
| | | ULoading, |
| | | UCheckbox, |
| | | UCheckboxGroup, |
| | | DaTreeVue2, |
| | | USwitch |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | id: this.form.id, |
| | | mobile: this.form.mobile, |
| | | realName: this.form.realName, |
| | | password: this.form.password, |
| | | password: this.md5(this.form.password), |
| | | role: this.form.role, |
| | | isSuper:this.form.isSuper, |
| | | departmentId:this.form.departmentId, |
| | | } |
| | | |
| | | if (form.id) { |
| | | update(form).then(res => { |
| | | this.loading = false; |
| | |
| | | setTimeout(() => uni.navigateBack(), 1500); |
| | | } |
| | | }) |
| | | } else { |
| | | } else {0 |
| | | add(form).then(res => { |
| | | this.loading = false; |
| | | if (res.statusCode === 200) { |