|
@@ -63,7 +63,13 @@
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
<div class="__czr-title_1">
|
|
|
- 管理员账号 <CzrButton type="normal" title="新增" class="ml-auto" />
|
|
|
+ 管理员账号
|
|
|
+ <CzrButton
|
|
|
+ type="normal"
|
|
|
+ title="新增"
|
|
|
+ class="ml-auto"
|
|
|
+ @click="onInvite"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="mt-4 w-full">
|
|
|
<CzrTable
|
|
@@ -77,6 +83,36 @@
|
|
|
</div>
|
|
|
</CzrForm>
|
|
|
</div>
|
|
|
+ <CzrDialog
|
|
|
+ :show="state.invite.show"
|
|
|
+ title="新增管理员"
|
|
|
+ @onClose="state.invite.show = false"
|
|
|
+ width="40rem"
|
|
|
+ :show-submit="false"
|
|
|
+ :show-close="false"
|
|
|
+ >
|
|
|
+ <div class="bm-form">
|
|
|
+ <div class="__czr-title_1 mb-2">
|
|
|
+ 管理员账号
|
|
|
+ <div class="ml-2 text-xs font-normal text-[var(--czr-error-color)]">
|
|
|
+ 链接24小时内有效
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <CzrFormColumn
|
|
|
+ :span="24"
|
|
|
+ label="邀请链接"
|
|
|
+ v-model:param="state.invite.url"
|
|
|
+ :readonly="true"
|
|
|
+ >
|
|
|
+ <template #suffix>
|
|
|
+ <CopyDocument
|
|
|
+ class="w-4 cursor-pointer"
|
|
|
+ @click="onCopy(state.invite.url)"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </CzrFormColumn>
|
|
|
+ </div>
|
|
|
+ </CzrDialog>
|
|
|
</CzrDialog>
|
|
|
</template>
|
|
|
|
|
@@ -92,6 +128,8 @@ import {
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import { useAppStore, useDialogStore, useDictionaryStore } from '@/stores'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
+import { CopyDocument } from '@element-plus/icons-vue'
|
|
|
+import { copy } from '@/utils/czr-util'
|
|
|
|
|
|
const router = useRouter()
|
|
|
const AppStore = useAppStore()
|
|
@@ -123,8 +161,11 @@ const state: any = reactive({
|
|
|
],
|
|
|
data: [],
|
|
|
},
|
|
|
+ invite: {
|
|
|
+ show: false,
|
|
|
+ url: '',
|
|
|
+ },
|
|
|
})
|
|
|
-const ref_modelConfig = ref()
|
|
|
const ref_form = ref()
|
|
|
const titleCpt = computed(() => {
|
|
|
let t = '租户信息'
|
|
@@ -229,6 +270,14 @@ const onSubmit = (isImport) => {
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
+const onInvite = () => {
|
|
|
+ state.invite.url = 'https://cn.element-plus.org/zh-CN/component/input.html'
|
|
|
+ state.invite.show = true
|
|
|
+}
|
|
|
+const onCopy = (str) => {
|
|
|
+ copy(str)
|
|
|
+ ElMessage.success('复制成功!')
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped></style>
|