|
@@ -1,19 +1,10 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div
|
|
|
|
|
- id="TradingDetailedInfoAdd"
|
|
|
|
|
- v-loading="loading"
|
|
|
|
|
- element-loading-background="rgba(122, 122, 122, 0.8)"
|
|
|
|
|
- element-loading-text="Loading..."
|
|
|
|
|
- class="InfoBox"
|
|
|
|
|
- :class="{ active: dialogInfoTradingAdd }"
|
|
|
|
|
|
|
+ <el-drawer
|
|
|
|
|
+ v-model="visible"
|
|
|
|
|
+ :title="editor ? t('Label.EditorRole') : t('Label.AddRole')"
|
|
|
|
|
+ size="500"
|
|
|
|
|
+ @close="onClose"
|
|
|
>
|
|
>
|
|
|
- <div class="header">
|
|
|
|
|
- <span v-if="editor" class="title">{{ $t('Label.EditorRole') }}</span>
|
|
|
|
|
- <span v-else class="title">{{ $t('Label.AddRole') }}</span>
|
|
|
|
|
- <span class="close crm-cursor" @click="close">
|
|
|
|
|
- <el-icon><Close /></el-icon>
|
|
|
|
|
- </span>
|
|
|
|
|
- </div>
|
|
|
|
|
<el-form ref="formRef" :rules="rules" :model="form" label-width="100PX">
|
|
<el-form ref="formRef" :rules="rules" :model="form" label-width="100PX">
|
|
|
<el-form-item prop="name" :label="$t('Label.RoleName') + ':'">
|
|
<el-form-item prop="name" :label="$t('Label.RoleName') + ':'">
|
|
|
<el-input
|
|
<el-input
|
|
@@ -50,8 +41,9 @@
|
|
|
>
|
|
>
|
|
|
<el-button
|
|
<el-button
|
|
|
v-if="role_system"
|
|
v-if="role_system"
|
|
|
|
|
+ text
|
|
|
|
|
+ type="primary"
|
|
|
style="padding-right: 4px"
|
|
style="padding-right: 4px"
|
|
|
- type="text"
|
|
|
|
|
@click="() => append('one')"
|
|
@click="() => append('one')"
|
|
|
>
|
|
>
|
|
|
{{ $t('R-OneNodeAdd') }}
|
|
{{ $t('R-OneNodeAdd') }}
|
|
@@ -80,104 +72,126 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
- <el-button :loading="addLoading" @click="confirm">{{ $t('Btn.Confirm') }}</el-button>
|
|
|
|
|
- <el-dialog
|
|
|
|
|
- v-model="dialogCheck"
|
|
|
|
|
- :title="dialogCheck_form.title"
|
|
|
|
|
- center
|
|
|
|
|
- append-to-body
|
|
|
|
|
- width="600"
|
|
|
|
|
- custom-class="dialog_header_w"
|
|
|
|
|
- @close="cancel"
|
|
|
|
|
- >
|
|
|
|
|
- <div class="dia-content">
|
|
|
|
|
- <el-form
|
|
|
|
|
- ref="dialogCheckFormRef"
|
|
|
|
|
- :model="dialogCheck_form"
|
|
|
|
|
- :rules="rules"
|
|
|
|
|
- label-width="135px"
|
|
|
|
|
- class="dialogCheck_form"
|
|
|
|
|
- >
|
|
|
|
|
- <el-form-item
|
|
|
|
|
- v-if="dialogCheck_form.typeIndex1 != 3"
|
|
|
|
|
- prop="name"
|
|
|
|
|
- :label="$t('Label.AuthorityName') + ':'"
|
|
|
|
|
- >
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model="dialogCheck_form.name"
|
|
|
|
|
- style="width: 400px"
|
|
|
|
|
- :placeholder="$t('Placeholder.Input')"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item
|
|
|
|
|
- v-if="dialogCheck_form.typeIndex != 3 && dialogCheck_form.typeIndex1 != 3"
|
|
|
|
|
- prop="link"
|
|
|
|
|
- :label="$t('Label.Url') + ':'"
|
|
|
|
|
- >
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model.trim="dialogCheck_form.link"
|
|
|
|
|
- style="width: 400px"
|
|
|
|
|
- :placeholder="$t('Placeholder.Input')"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item
|
|
|
|
|
- v-if="dialogCheck_form.typeIndex != 3 && dialogCheck_form.typeIndex1 != 3"
|
|
|
|
|
- prop="icon"
|
|
|
|
|
- :label="$t('Label.Icon') + ':'"
|
|
|
|
|
- >
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model.trim="dialogCheck_form.icon"
|
|
|
|
|
- style="width: 400px"
|
|
|
|
|
- :placeholder="$t('Placeholder.Input')"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item
|
|
|
|
|
- v-if="dialogCheck_form.typeIndex != 3 && dialogCheck_form.typeIndex1 != 3"
|
|
|
|
|
- prop="subIndex"
|
|
|
|
|
- :label="$t('Label.SubIndex') + ':'"
|
|
|
|
|
- >
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model.number.trim="dialogCheck_form.subIndex"
|
|
|
|
|
- style="width: 400px"
|
|
|
|
|
- :placeholder="$t('Placeholder.Input')"
|
|
|
|
|
- @input="selectChange"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item
|
|
|
|
|
- v-if="dialogCheck_form.typeIndex == 3 && dialogCheck_form.typeIndex1 != 3"
|
|
|
|
|
- prop="action"
|
|
|
|
|
- :label="$t('Label.Url') + ':'"
|
|
|
|
|
- >
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model.trim="dialogCheck_form.action"
|
|
|
|
|
- style="width: 400px"
|
|
|
|
|
- :placeholder="$t('Placeholder.Input')"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <div
|
|
|
|
|
- v-if="dialogCheck_form.typeIndex1 == 3"
|
|
|
|
|
- style="text-align: center; font-size: 20px; padding: 25px 0"
|
|
|
|
|
- >
|
|
|
|
|
- {{ $t('Msg.Delete') }}
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-form>
|
|
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <div class="flex">
|
|
|
|
|
+ <el-button type="primary" :loading="addLoading" @click="confirm">
|
|
|
|
|
+ {{ $t('Btn.Confirm') }}
|
|
|
|
|
+ </el-button>
|
|
|
</div>
|
|
</div>
|
|
|
- <template #footer>
|
|
|
|
|
- <div class="dialog-footer">
|
|
|
|
|
- <el-button v-if="dialogCheck_form.typeIndex1 == 1" type="primary" @click="toAppend()">
|
|
|
|
|
- {{ $t('Btn.Confirm') }}
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <el-button v-if="dialogCheck_form.typeIndex1 == 2" type="primary" @click="toUpdate()">
|
|
|
|
|
- {{ $t('Btn.Confirm') }}
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <el-button v-if="dialogCheck_form.typeIndex1 == 3" type="primary" @click="toRemove()">
|
|
|
|
|
- {{ $t('Btn.Confirm') }}
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <el-button @click="cancel">{{ $t('Btn.Cancel') }}</el-button>
|
|
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-drawer>
|
|
|
|
|
+ <!-- <div-->
|
|
|
|
|
+ <!-- id="TradingDetailedInfoAdd"-->
|
|
|
|
|
+ <!-- v-loading="loading"-->
|
|
|
|
|
+ <!-- element-loading-background="rgba(122, 122, 122, 0.8)"-->
|
|
|
|
|
+ <!-- element-loading-text="Loading..."-->
|
|
|
|
|
+ <!-- class="InfoBox"-->
|
|
|
|
|
+ <!-- :class="{ active: dialogInfoTradingAdd }"-->
|
|
|
|
|
+ <!-- >-->
|
|
|
|
|
+ <!-- <div class="header">-->
|
|
|
|
|
+ <!-- <span v-if="editor" class="title">{{ $t('Label.EditorRole') }}</span>-->
|
|
|
|
|
+ <!-- <span v-else class="title">{{ $t('Label.AddRole') }}</span>-->
|
|
|
|
|
+ <!-- <span class="close crm-cursor" @click="close">-->
|
|
|
|
|
+ <!-- <el-icon><Close /></el-icon>-->
|
|
|
|
|
+ <!-- </span>-->
|
|
|
|
|
+ <!-- </div>-->
|
|
|
|
|
+ <!-- </div>-->
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ v-model="dialogCheck"
|
|
|
|
|
+ :title="dialogCheck_form.title"
|
|
|
|
|
+ center
|
|
|
|
|
+ append-to-body
|
|
|
|
|
+ width="600"
|
|
|
|
|
+ custom-class="dialog_header_w"
|
|
|
|
|
+ @close="cancel"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="dia-content">
|
|
|
|
|
+ <el-form
|
|
|
|
|
+ ref="dialogCheckFormRef"
|
|
|
|
|
+ :model="dialogCheck_form"
|
|
|
|
|
+ :rules="rules"
|
|
|
|
|
+ label-width="135px"
|
|
|
|
|
+ class="dialogCheck_form"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ v-if="dialogCheck_form.typeIndex1 != 3"
|
|
|
|
|
+ prop="name"
|
|
|
|
|
+ :label="$t('Label.AuthorityName') + ':'"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="dialogCheck_form.name"
|
|
|
|
|
+ style="width: 400px"
|
|
|
|
|
+ :placeholder="$t('Placeholder.Input')"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ v-if="dialogCheck_form.typeIndex != 3 && dialogCheck_form.typeIndex1 != 3"
|
|
|
|
|
+ prop="link"
|
|
|
|
|
+ :label="$t('Label.Url') + ':'"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model.trim="dialogCheck_form.link"
|
|
|
|
|
+ style="width: 400px"
|
|
|
|
|
+ :placeholder="$t('Placeholder.Input')"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ v-if="dialogCheck_form.typeIndex != 3 && dialogCheck_form.typeIndex1 != 3"
|
|
|
|
|
+ prop="icon"
|
|
|
|
|
+ :label="$t('Label.Icon') + ':'"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model.trim="dialogCheck_form.icon"
|
|
|
|
|
+ style="width: 400px"
|
|
|
|
|
+ :placeholder="$t('Placeholder.Input')"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ v-if="dialogCheck_form.typeIndex != 3 && dialogCheck_form.typeIndex1 != 3"
|
|
|
|
|
+ prop="subIndex"
|
|
|
|
|
+ :label="$t('Label.SubIndex') + ':'"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model.number.trim="dialogCheck_form.subIndex"
|
|
|
|
|
+ style="width: 400px"
|
|
|
|
|
+ :placeholder="$t('Placeholder.Input')"
|
|
|
|
|
+ @input="selectChange"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ v-if="dialogCheck_form.typeIndex == 3 && dialogCheck_form.typeIndex1 != 3"
|
|
|
|
|
+ prop="action"
|
|
|
|
|
+ :label="$t('Label.Url') + ':'"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model.trim="dialogCheck_form.action"
|
|
|
|
|
+ style="width: 400px"
|
|
|
|
|
+ :placeholder="$t('Placeholder.Input')"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-if="dialogCheck_form.typeIndex1 == 3"
|
|
|
|
|
+ style="text-align: center; font-size: 20px; padding: 25px 0"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ $t('Msg.Delete') }}
|
|
|
</div>
|
|
</div>
|
|
|
- </template>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <div class="dialog-footer">
|
|
|
|
|
+ <el-button v-if="dialogCheck_form.typeIndex1 == 1" type="primary" @click="toAppend()">
|
|
|
|
|
+ {{ $t('Btn.Confirm') }}
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button v-if="dialogCheck_form.typeIndex1 == 2" type="primary" @click="toUpdate()">
|
|
|
|
|
+ {{ $t('Btn.Confirm') }}
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button v-if="dialogCheck_form.typeIndex1 == 3" type="primary" @click="toRemove()">
|
|
|
|
|
+ {{ $t('Btn.Confirm') }}
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button @click="cancel">{{ $t('Btn.Cancel') }}</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
@@ -213,6 +227,7 @@
|
|
|
const emit = defineEmits(['confirmToReload', 'closeAdd'])
|
|
const emit = defineEmits(['confirmToReload', 'closeAdd'])
|
|
|
|
|
|
|
|
// refs
|
|
// refs
|
|
|
|
|
+ const visible = ref(props.dialogInfoTradingAdd)
|
|
|
const formRef = ref(null)
|
|
const formRef = ref(null)
|
|
|
const treeRef = ref(null)
|
|
const treeRef = ref(null)
|
|
|
const dialogCheckFormRef = ref(null)
|
|
const dialogCheckFormRef = ref(null)
|
|
@@ -300,6 +315,9 @@
|
|
|
const selectChange = () => {
|
|
const selectChange = () => {
|
|
|
// 这里可能需要强制更新
|
|
// 这里可能需要强制更新
|
|
|
}
|
|
}
|
|
|
|
|
+ const onClose = () => {
|
|
|
|
|
+ emit('closeAdd', false)
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
const append = (data) => {
|
|
const append = (data) => {
|
|
|
console.log(data, 'append')
|
|
console.log(data, 'append')
|
|
@@ -749,6 +767,7 @@
|
|
|
() => props.dialogInfoTradingAdd,
|
|
() => props.dialogInfoTradingAdd,
|
|
|
async (newVal) => {
|
|
async (newVal) => {
|
|
|
loading.value = true
|
|
loading.value = true
|
|
|
|
|
+ visible.value = newVal
|
|
|
if (newVal) {
|
|
if (newVal) {
|
|
|
if (props.editor) {
|
|
if (props.editor) {
|
|
|
await getRoleDetailUpdate()
|
|
await getRoleDetailUpdate()
|
|
@@ -764,13 +783,26 @@
|
|
|
// await Promise.all([getDepartmentList(), getRoleDetailAdd()])
|
|
// await Promise.all([getDepartmentList(), getRoleDetailAdd()])
|
|
|
getDepartmentList()
|
|
getDepartmentList()
|
|
|
console.log(props, 'props')
|
|
console.log(props, 'props')
|
|
|
-
|
|
|
|
|
- // 设置默认选中
|
|
|
|
|
- if (props.editor && props.formList?.id) {
|
|
|
|
|
- // 如果有编辑数据,设置默认选中项
|
|
|
|
|
- // 这里需要根据实际逻辑设置 defaultSelect.value
|
|
|
|
|
- }
|
|
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
-<style scoped></style>
|
|
|
|
|
|
|
+<style scoped>
|
|
|
|
|
+ .el-form {
|
|
|
|
|
+ .authorityBox.el-form-item .el-form-item__content {
|
|
|
|
|
+ display: contents;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .custom-tree-node {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ padding-right: 4px;
|
|
|
|
|
+
|
|
|
|
|
+ i {
|
|
|
|
|
+ margin-left: 4px;
|
|
|
|
|
+ /*font-weight: bold;*/
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|