|
|
@@ -4,13 +4,19 @@
|
|
|
width="720px"
|
|
|
:visible="visible"
|
|
|
:close-on-click-modal="false"
|
|
|
- custom-class="ele-dialog-form"
|
|
|
+ custom-class="ele-dialog-form menu-edit-dialog"
|
|
|
:title="isUpdate ? '修改菜单' : '添加菜单'"
|
|
|
@update:visible="updateVisible"
|
|
|
:maxable="true"
|
|
|
>
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
- <el-row>
|
|
|
+ <el-form
|
|
|
+ ref="form"
|
|
|
+ class="menu-edit-form"
|
|
|
+ :model="form"
|
|
|
+ :rules="rules"
|
|
|
+ label-width="100px"
|
|
|
+ >
|
|
|
+ <el-row :gutter="18">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="上级菜单:">
|
|
|
<ele-tree-select
|
|
|
@@ -114,24 +120,38 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item :rules="[
|
|
|
- { required: form.source === 2 ? true : false, message: '字段必填', trigger: 'blur' }
|
|
|
- ]" :label="form.source === 2 ? '报表ID:': '扩展属性:'" :prop="form.source == 2 ? 'extend' : ''">
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- v-model="form.extend"
|
|
|
- :placeholder="form.source === 2 ? '请输入报表ID' : '请输入扩展属性'"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="菜单类型:" prop="type">
|
|
|
- <el-radio-group v-model="form.type" @change="onMenuTypeChange">
|
|
|
- <el-radio :label="1">菜单</el-radio>
|
|
|
- <el-radio :label="2">按钮</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
+ <el-col :span="24" class="menu-type-extend-row">
|
|
|
+ <el-row :gutter="18">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item
|
|
|
+ :rules="[
|
|
|
+ {
|
|
|
+ required: form.source === 2 ? true : false,
|
|
|
+ message: '字段必填',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]"
|
|
|
+ :label="form.source === 2 ? '报表ID:' : '扩展属性:'"
|
|
|
+ :prop="form.source == 2 ? 'extend' : ''"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ clearable
|
|
|
+ v-model="form.extend"
|
|
|
+ :placeholder="
|
|
|
+ form.source === 2 ? '请输入报表ID' : '请输入扩展属性'
|
|
|
+ "
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="菜单类型:" prop="type">
|
|
|
+ <el-radio-group v-model="form.type" @change="onMenuTypeChange">
|
|
|
+ <el-radio :label="1">菜单</el-radio>
|
|
|
+ <el-radio :label="2">按钮</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<!-- <div style="margin: 6px 0 28px 0">
|
|
|
@@ -139,199 +159,399 @@
|
|
|
</div> -->
|
|
|
</el-form>
|
|
|
<template v-slot:footer>
|
|
|
- <el-button @click="updateVisible(false)">取消</el-button>
|
|
|
- <el-button type="primary" :loading="loading" @click="save">
|
|
|
- 保存
|
|
|
- </el-button>
|
|
|
+ <div class="menu-edit-footer">
|
|
|
+ <el-button class="menu-edit-cancel" @click="updateVisible(false)">
|
|
|
+ 取消
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ class="menu-edit-save"
|
|
|
+ type="primary"
|
|
|
+ :loading="loading"
|
|
|
+ @click="save"
|
|
|
+ >
|
|
|
+ 保存
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</ele-modal>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { EleIconPicker } from 'ele-admin';
|
|
|
-import { saveOrUpdate } from '@/api/system/menu';
|
|
|
-import { secretLevelList } from '@/enum/dict';
|
|
|
-
|
|
|
-export default {
|
|
|
- components: { EleIconPicker },
|
|
|
- props: {
|
|
|
- // 弹窗是否打开
|
|
|
- visible: Boolean,
|
|
|
- // 修改回显的数据
|
|
|
- data: Object,
|
|
|
- // 上级菜单id
|
|
|
- parentId: [Number, String],
|
|
|
- // 全部菜单数据
|
|
|
- menuList: Array
|
|
|
- },
|
|
|
- data() {
|
|
|
- const defaultForm = {
|
|
|
- id: null,
|
|
|
- parentId: '',
|
|
|
- name: '',
|
|
|
- type: 1,
|
|
|
- source: 1,
|
|
|
- icon: '',
|
|
|
- url: '/',
|
|
|
- component: '',
|
|
|
- sort: null,
|
|
|
- rootId: null,
|
|
|
- permissionCode: 1,
|
|
|
- secretLevel: 1,
|
|
|
- extend: null, //报表ID
|
|
|
- };
|
|
|
- return {
|
|
|
- defaultForm,
|
|
|
- // 表单数据
|
|
|
- form: { ...defaultForm },
|
|
|
- // 表单验证规则
|
|
|
- rules: {
|
|
|
- name: [{ required: true, message: '请输入菜单名称', trigger: 'blur' }],
|
|
|
- sort: [{ required: true, message: '请输入排序号', trigger: 'blur' }],
|
|
|
- url: [{ required: true, message: '请输入菜单路由', trigger: 'blur' }],
|
|
|
- component: [
|
|
|
- { required: true, message: '请输入组件地址', trigger: 'blur' }
|
|
|
- ],
|
|
|
- type: [{ required: true, message: '请选择菜单类型', trigger: 'blur' }]
|
|
|
- },
|
|
|
- // 提交状态
|
|
|
- loading: false,
|
|
|
- // 是否是修改
|
|
|
- isUpdate: false
|
|
|
- };
|
|
|
- },
|
|
|
- computed: {
|
|
|
- // pathPlaceholder() {
|
|
|
- // return this.form.openType === 2 ? '请输入外链地址' : '请输入路由地址';
|
|
|
- // },
|
|
|
- // componentPlaceholder() {
|
|
|
- // return this.form.openType === 1 ? '请输入内链地址' : '请输入组件路径';
|
|
|
- // },
|
|
|
- // // 是否开启响应式布局
|
|
|
- // styleResponsive() {
|
|
|
- // return this.$store.state.theme.styleResponsive;
|
|
|
- // }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- secretLevelList() {
|
|
|
- return secretLevelList;
|
|
|
+ import { EleIconPicker } from 'ele-admin';
|
|
|
+ import { saveOrUpdate } from '@/api/system/menu';
|
|
|
+ import { secretLevelList } from '@/enum/dict';
|
|
|
+
|
|
|
+ export default {
|
|
|
+ components: { EleIconPicker },
|
|
|
+ props: {
|
|
|
+ // 弹窗是否打开
|
|
|
+ visible: Boolean,
|
|
|
+ // 修改回显的数据
|
|
|
+ data: Object,
|
|
|
+ // 上级菜单id
|
|
|
+ parentId: [Number, String],
|
|
|
+ // 全部菜单数据
|
|
|
+ menuList: Array
|
|
|
},
|
|
|
- sourceChange(e) {
|
|
|
- if (e == 2) {
|
|
|
- this.form.url =
|
|
|
- '/reportForms/sourceLink';
|
|
|
- this.form.component = '/reportForms/sourceLink'
|
|
|
- } else {
|
|
|
- this.form.url = '/';
|
|
|
- }
|
|
|
+ data() {
|
|
|
+ const defaultForm = {
|
|
|
+ id: null,
|
|
|
+ parentId: '',
|
|
|
+ name: '',
|
|
|
+ type: 1,
|
|
|
+ source: 1,
|
|
|
+ icon: '',
|
|
|
+ url: '/',
|
|
|
+ component: '',
|
|
|
+ sort: null,
|
|
|
+ rootId: null,
|
|
|
+ permissionCode: 1,
|
|
|
+ secretLevel: 1,
|
|
|
+ extend: null //报表ID
|
|
|
+ };
|
|
|
+ return {
|
|
|
+ defaultForm,
|
|
|
+ // 表单数据
|
|
|
+ form: { ...defaultForm },
|
|
|
+ // 表单验证规则
|
|
|
+ rules: {
|
|
|
+ name: [
|
|
|
+ { required: true, message: '请输入菜单名称', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ sort: [{ required: true, message: '请输入排序号', trigger: 'blur' }],
|
|
|
+ url: [{ required: true, message: '请输入菜单路由', trigger: 'blur' }],
|
|
|
+ component: [
|
|
|
+ { required: true, message: '请输入组件地址', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ type: [{ required: true, message: '请选择菜单类型', trigger: 'blur' }]
|
|
|
+ },
|
|
|
+ // 提交状态
|
|
|
+ loading: false,
|
|
|
+ // 是否是修改
|
|
|
+ isUpdate: false
|
|
|
+ };
|
|
|
},
|
|
|
- /* 保存编辑 */
|
|
|
- save() {
|
|
|
- this.$refs.form.validate((valid) => {
|
|
|
- if (!valid) {
|
|
|
- return false;
|
|
|
+ computed: {
|
|
|
+ // pathPlaceholder() {
|
|
|
+ // return this.form.openType === 2 ? '请输入外链地址' : '请输入路由地址';
|
|
|
+ // },
|
|
|
+ // componentPlaceholder() {
|
|
|
+ // return this.form.openType === 1 ? '请输入内链地址' : '请输入组件路径';
|
|
|
+ // },
|
|
|
+ // // 是否开启响应式布局
|
|
|
+ // styleResponsive() {
|
|
|
+ // return this.$store.state.theme.styleResponsive;
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ secretLevelList() {
|
|
|
+ return secretLevelList;
|
|
|
+ },
|
|
|
+ sourceChange(e) {
|
|
|
+ if (e == 2) {
|
|
|
+ this.form.url = '/reportForms/sourceLink';
|
|
|
+ this.form.component = '/reportForms/sourceLink';
|
|
|
+ } else {
|
|
|
+ this.form.url = '/';
|
|
|
}
|
|
|
- this.loading = true;
|
|
|
- const data = {
|
|
|
- ...this.form,
|
|
|
- // menuType 对应的值与后端不一致在前端处理
|
|
|
- // type: this.form.type === 2 ? 1 : 0,
|
|
|
- parentId: this.form.parentId || 0
|
|
|
- };
|
|
|
- // const saveOrUpdate = this.isUpdate ? updateMenu : addMenu;
|
|
|
- if (!this.isUpdate) {
|
|
|
- delete data.id;
|
|
|
+ },
|
|
|
+ /* 保存编辑 */
|
|
|
+ save() {
|
|
|
+ this.$refs.form.validate((valid) => {
|
|
|
+ if (!valid) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ this.loading = true;
|
|
|
+ const data = {
|
|
|
+ ...this.form,
|
|
|
+ // menuType 对应的值与后端不一致在前端处理
|
|
|
+ // type: this.form.type === 2 ? 1 : 0,
|
|
|
+ parentId: this.form.parentId || 0
|
|
|
+ };
|
|
|
+ // const saveOrUpdate = this.isUpdate ? updateMenu : addMenu;
|
|
|
+ if (!this.isUpdate) {
|
|
|
+ delete data.id;
|
|
|
+ }
|
|
|
+ saveOrUpdate(data)
|
|
|
+ .then((res) => {
|
|
|
+ this.loading = false;
|
|
|
+ if (this.isUpdate) {
|
|
|
+ this.$message.success('菜单编辑成功');
|
|
|
+ } else {
|
|
|
+ this.$message.success('菜单新增成功');
|
|
|
+ }
|
|
|
+ this.updateVisible(false);
|
|
|
+ this.$emit('done');
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ this.loading = false;
|
|
|
+ // this.$message.error(e.message);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /* 更新visible */
|
|
|
+ updateVisible(value) {
|
|
|
+ this.$emit('update:visible', value);
|
|
|
+ },
|
|
|
+ /* menuType选择改变 */
|
|
|
+ onMenuTypeChange() {
|
|
|
+ // if (this.form.menuType === 0) {
|
|
|
+ // this.form.authority = null;
|
|
|
+ // this.form.openType = 0;
|
|
|
+ // this.form.component = null;
|
|
|
+ // } else if (this.form.menuType === 1) {
|
|
|
+ // if (this.form.openType === 2) {
|
|
|
+ // this.form.authority = null;
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // this.form.openType = 0;
|
|
|
+ // this.form.icon = null;
|
|
|
+ // this.form.path = null;
|
|
|
+ // this.form.component = null;
|
|
|
+ // this.form.hide = 0;
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ /* openType选择改变 */
|
|
|
+ onOpenTypeChange() {
|
|
|
+ if (this.form.openType === 2) {
|
|
|
+ this.form.component = null;
|
|
|
+ this.form.authority = null;
|
|
|
}
|
|
|
- saveOrUpdate(data)
|
|
|
- .then((res) => {
|
|
|
- this.loading = false;
|
|
|
- if (this.isUpdate) {
|
|
|
- this.$message.success('菜单编辑成功');
|
|
|
- } else {
|
|
|
- this.$message.success('菜单新增成功');
|
|
|
- }
|
|
|
- this.updateVisible(false);
|
|
|
- this.$emit('done');
|
|
|
- })
|
|
|
- .catch((e) => {
|
|
|
- this.loading = false;
|
|
|
- // this.$message.error(e.message);
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- /* 更新visible */
|
|
|
- updateVisible(value) {
|
|
|
- this.$emit('update:visible', value);
|
|
|
- },
|
|
|
- /* menuType选择改变 */
|
|
|
- onMenuTypeChange() {
|
|
|
- // if (this.form.menuType === 0) {
|
|
|
- // this.form.authority = null;
|
|
|
- // this.form.openType = 0;
|
|
|
- // this.form.component = null;
|
|
|
- // } else if (this.form.menuType === 1) {
|
|
|
- // if (this.form.openType === 2) {
|
|
|
- // this.form.authority = null;
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // this.form.openType = 0;
|
|
|
- // this.form.icon = null;
|
|
|
- // this.form.path = null;
|
|
|
- // this.form.component = null;
|
|
|
- // this.form.hide = 0;
|
|
|
+ }
|
|
|
+ /* 判断是否是外链 */
|
|
|
+ // isUrl(url) {
|
|
|
+ // return !!(
|
|
|
+ // url &&
|
|
|
+ // (url.startsWith('http://') ||
|
|
|
+ // url.startsWith('https://') ||
|
|
|
+ // url.startsWith('//'))
|
|
|
+ // );
|
|
|
+ // },
|
|
|
+ /* 判断是否是目录 */
|
|
|
+ // isDirectory(d) {
|
|
|
+ // return !!d.children?.length && !d.component;
|
|
|
// }
|
|
|
},
|
|
|
- /* openType选择改变 */
|
|
|
- onOpenTypeChange() {
|
|
|
- if (this.form.openType === 2) {
|
|
|
- this.form.component = null;
|
|
|
- this.form.authority = null;
|
|
|
+ watch: {
|
|
|
+ visible(visible) {
|
|
|
+ if (visible) {
|
|
|
+ if (this.data) {
|
|
|
+ // const isInnerLink = this.isUrl(this.data.component) ? 1 : 0;
|
|
|
+ // menuType 对应的值与后端不一致在前端处理
|
|
|
+ // const menuType =
|
|
|
+ // this.data.type === 1
|
|
|
+ // ? 2
|
|
|
+ // : this.isDirectory(this.data)
|
|
|
+ // ? 0
|
|
|
+ // : 1;
|
|
|
+
|
|
|
+ this.$util.assignObject(this.form, {
|
|
|
+ ...this.data,
|
|
|
+ // openType: this.isUrl(this.data.path) ? 2 : isInnerLink,
|
|
|
+ parentId: this.data.parentId == 0 ? '' : this.data.parentId ?? ''
|
|
|
+ });
|
|
|
+ this.isUpdate = true;
|
|
|
+ // this.sourceChange(this.form.source);
|
|
|
+ } else {
|
|
|
+ this.form.parentId = this.parentId ?? '';
|
|
|
+ this.isUpdate = false;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$refs.form.clearValidate();
|
|
|
+ this.form = { ...this.defaultForm };
|
|
|
+ // this.sourceChange(this.form.source);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- /* 判断是否是外链 */
|
|
|
- // isUrl(url) {
|
|
|
- // return !!(
|
|
|
- // url &&
|
|
|
- // (url.startsWith('http://') ||
|
|
|
- // url.startsWith('https://') ||
|
|
|
- // url.startsWith('//'))
|
|
|
- // );
|
|
|
- // },
|
|
|
- /* 判断是否是目录 */
|
|
|
- // isDirectory(d) {
|
|
|
- // return !!d.children?.length && !d.component;
|
|
|
- // }
|
|
|
- },
|
|
|
- watch: {
|
|
|
- visible(visible) {
|
|
|
- if (visible) {
|
|
|
- if (this.data) {
|
|
|
- // const isInnerLink = this.isUrl(this.data.component) ? 1 : 0;
|
|
|
- // menuType 对应的值与后端不一致在前端处理
|
|
|
- // const menuType =
|
|
|
- // this.data.type === 1
|
|
|
- // ? 2
|
|
|
- // : this.isDirectory(this.data)
|
|
|
- // ? 0
|
|
|
- // : 1;
|
|
|
-
|
|
|
- this.$util.assignObject(this.form, {
|
|
|
- ...this.data,
|
|
|
- // openType: this.isUrl(this.data.path) ? 2 : isInnerLink,
|
|
|
- parentId: this.data.parentId == 0 ? '' : this.data.parentId ?? ''
|
|
|
- });
|
|
|
- this.isUpdate = true;
|
|
|
- // this.sourceChange(this.form.source);
|
|
|
- } else {
|
|
|
- this.form.parentId = this.parentId ?? '';
|
|
|
- this.isUpdate = false;
|
|
|
+ };
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+ ::v-deep .menu-edit-dialog {
|
|
|
+ overflow: hidden;
|
|
|
+ border-radius: 8px;
|
|
|
+ box-shadow: 0 26px 70px rgba(15, 35, 66, 0.22);
|
|
|
+
|
|
|
+ .el-dialog__header {
|
|
|
+ position: relative;
|
|
|
+ padding: 18px 24px 16px;
|
|
|
+ border-bottom: 1px solid #e6edf7;
|
|
|
+ background: linear-gradient(
|
|
|
+ 135deg,
|
|
|
+ rgba(22, 119, 255, 0.12),
|
|
|
+ rgba(0, 184, 169, 0.08)
|
|
|
+ ),
|
|
|
+ #ffffff;
|
|
|
+
|
|
|
+ &::before {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ bottom: 0;
|
|
|
+ width: 4px;
|
|
|
+ background: linear-gradient(180deg, #1677ff, #00b8a9);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-dialog__title {
|
|
|
+ color: #10233f;
|
|
|
+ font-size: 17px;
|
|
|
+ font-weight: 800;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-dialog__body {
|
|
|
+ padding: 22px 24px 10px;
|
|
|
+ background: #fbfdff;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-dialog__footer {
|
|
|
+ padding: 14px 24px 20px;
|
|
|
+ border-top: 1px solid #e6edf7;
|
|
|
+ background: #ffffff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-edit-form {
|
|
|
+ .menu-type-extend-row {
|
|
|
+ clear: both;
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .el-form-item {
|
|
|
+ margin-bottom: 18px;
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .el-form-item__label {
|
|
|
+ color: #34465e;
|
|
|
+ font-weight: 700;
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .el-input__inner,
|
|
|
+ ::v-deep .el-input-number .el-input__inner,
|
|
|
+ ::v-deep .el-select .el-input__inner {
|
|
|
+ height: 38px;
|
|
|
+ color: #26384d;
|
|
|
+ border-color: #d7e3f1;
|
|
|
+ border-radius: 7px;
|
|
|
+ background-color: #ffffff;
|
|
|
+ transition: border-color 0.18s ease, box-shadow 0.18s ease;
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .el-input__inner:hover,
|
|
|
+ ::v-deep .el-input-number .el-input__inner:hover,
|
|
|
+ ::v-deep .el-select .el-input__inner:hover {
|
|
|
+ border-color: #a9c6ea;
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .el-input__inner:focus,
|
|
|
+ ::v-deep .el-input-number .el-input__inner:focus,
|
|
|
+ ::v-deep .el-select .el-input__inner:focus {
|
|
|
+ border-color: #1677ff;
|
|
|
+ box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .el-input.is-disabled .el-input__inner {
|
|
|
+ color: #8aa0b6;
|
|
|
+ background: #f3f6fa;
|
|
|
+ border-color: #e0e7f0;
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .el-radio-group {
|
|
|
+ display: inline-flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ gap: 8px;
|
|
|
+ padding: 4px;
|
|
|
+ border: 1px solid #dce8f5;
|
|
|
+ border-radius: 8px;
|
|
|
+ background: #f5f9ff;
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .el-radio {
|
|
|
+ height: 30px;
|
|
|
+ margin-right: 0;
|
|
|
+ padding: 0 12px;
|
|
|
+ line-height: 30px;
|
|
|
+ border-radius: 6px;
|
|
|
+ transition: background-color 0.18s ease, color 0.18s ease;
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .el-radio.is-checked {
|
|
|
+ color: #1677ff;
|
|
|
+ background: #ffffff;
|
|
|
+ box-shadow: 0 6px 14px rgba(22, 119, 255, 0.14);
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .el-radio__label {
|
|
|
+ padding-left: 6px;
|
|
|
+ font-weight: 600;
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .ele-tree-select,
|
|
|
+ ::v-deep .ele-icon-picker {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-edit-footer {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ gap: 10px;
|
|
|
+
|
|
|
+ .el-button + .el-button {
|
|
|
+ margin-left: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-edit-cancel,
|
|
|
+ .menu-edit-save {
|
|
|
+ min-width: 82px;
|
|
|
+ height: 38px;
|
|
|
+ border-radius: 7px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-edit-cancel {
|
|
|
+ color: #31506f;
|
|
|
+ border-color: #d7e3f1;
|
|
|
+
|
|
|
+ &:hover,
|
|
|
+ &:focus {
|
|
|
+ color: #1677ff;
|
|
|
+ border-color: rgba(22, 119, 255, 0.35);
|
|
|
+ background: #f4f9ff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-edit-save {
|
|
|
+ border: 0;
|
|
|
+ background: linear-gradient(135deg, #1677ff, #00a3ff);
|
|
|
+ box-shadow: 0 10px 22px rgba(22, 119, 255, 0.24);
|
|
|
+
|
|
|
+ &:hover,
|
|
|
+ &:focus {
|
|
|
+ background: linear-gradient(135deg, #0f67e8, #0093ef);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @media (max-width: 768px) {
|
|
|
+ ::v-deep .menu-edit-dialog {
|
|
|
+ width: calc(100vw - 24px) !important;
|
|
|
+ margin-top: 7vh !important;
|
|
|
+
|
|
|
+ .el-dialog__body {
|
|
|
+ padding: 18px 16px 6px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-edit-form {
|
|
|
+ ::v-deep .el-col-12 {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .menu-type-extend-row {
|
|
|
+ ::v-deep .el-col-12 {
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
- } else {
|
|
|
- this.$refs.form.clearValidate();
|
|
|
- this.form = { ...this.defaultForm };
|
|
|
- // this.sourceChange(this.form.source);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-};
|
|
|
-</script>
|
|
|
+</style>
|