| | |
| | | <dict-tag :options="sys_normal_disable" :value="scope.row.status" />
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="创建时间" align="center" prop="createTime">
|
| | | <el-table-column label="创建时间" align="center" width="160" prop="createTime">
|
| | | <template #default="scope">
|
| | | <span>{{ parseTime(scope.row.createTime) }}</span>
|
| | | </template>
|
| | |
| | | <el-popover
|
| | | placement="bottom-start"
|
| | | :width="540"
|
| | | v-model:visible="showChooseIcon"
|
| | | trigger="click"
|
| | | @show="showSelectIcon"
|
| | | >
|
| | | <template #reference>
|
| | | <el-input v-model="form.icon" placeholder="点击选择图标" @blur="showSelectIcon" v-click-outside="hideSelectIcon" readonly>
|
| | | <el-input v-model="form.icon" placeholder="点击选择图标" @blur="showSelectIcon" readonly>
|
| | | <template #prefix>
|
| | | <svg-icon
|
| | | v-if="form.icon"
|
| | |
| | | </template>
|
| | | </el-input>
|
| | | </template>
|
| | | <icon-select ref="iconSelectRef" @selected="selected" />
|
| | | <icon-select ref="iconSelectRef" @selected="selected" :active-icon="form.icon" />
|
| | | </el-popover>
|
| | | </el-form-item>
|
| | | </el-col>
|
| | |
| | | </el-radio-group>
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="12" v-if="form.menuType != 'F'">
|
| | | <el-col :span="12">
|
| | | <el-form-item>
|
| | | <template #label>
|
| | | <span>
|
| | |
| | | import { addMenu, delMenu, getMenu, listMenu, updateMenu } from "@/api/system/menu";
|
| | | import SvgIcon from "@/components/SvgIcon";
|
| | | import IconSelect from "@/components/IconSelect";
|
| | | import { ClickOutside as vClickOutside } from 'element-plus'
|
| | |
|
| | | const { proxy } = getCurrentInstance();
|
| | | const { sys_show_hide, sys_normal_disable } = proxy.useDict("sys_show_hide", "sys_normal_disable");
|
| | |
| | | const menuOptions = ref([]);
|
| | | const isExpandAll = ref(false);
|
| | | const refreshTable = ref(true);
|
| | | const showChooseIcon = ref(false);
|
| | | const iconSelectRef = ref(null);
|
| | |
|
| | | const data = reactive({
|
| | |
| | | loading.value = false;
|
| | | });
|
| | | }
|
| | |
|
| | | /** 查询菜单下拉树结构 */
|
| | | function getTreeselect() {
|
| | | menuOptions.value = [];
|
| | |
| | | menuOptions.value.push(menu);
|
| | | });
|
| | | }
|
| | |
|
| | | /** 取消按钮 */
|
| | | function cancel() {
|
| | | open.value = false;
|
| | | reset();
|
| | | }
|
| | |
|
| | | /** 表单重置 */
|
| | | function reset() {
|
| | | form.value = {
|
| | |
| | | };
|
| | | proxy.resetForm("menuRef");
|
| | | }
|
| | |
|
| | | /** 展示下拉图标 */
|
| | | function showSelectIcon() {
|
| | | iconSelectRef.value.reset();
|
| | | showChooseIcon.value = true;
|
| | | }
|
| | |
|
| | | /** 选择图标 */
|
| | | function selected(name) {
|
| | | form.value.icon = name;
|
| | | showChooseIcon.value = false;
|
| | | }
|
| | | /** 图标外层点击隐藏下拉列表 */
|
| | | function hideSelectIcon(event) {
|
| | | var elem = event.relatedTarget || event.srcElement || event.target || event.currentTarget;
|
| | | var className = elem.className;
|
| | | if (className !== "el-input__inner") {
|
| | | showChooseIcon.value = false;
|
| | | }
|
| | | }
|
| | |
|
| | | /** 搜索按钮操作 */
|
| | | function handleQuery() {
|
| | | getList();
|
| | | }
|
| | |
|
| | | /** 重置按钮操作 */
|
| | | function resetQuery() {
|
| | | proxy.resetForm("queryRef");
|
| | | handleQuery();
|
| | | }
|
| | |
|
| | | /** 新增按钮操作 */
|
| | | function handleAdd(row) {
|
| | | reset();
|
| | |
| | | open.value = true;
|
| | | title.value = "添加菜单";
|
| | | }
|
| | |
|
| | | /** 展开/折叠操作 */
|
| | | function toggleExpandAll() {
|
| | | refreshTable.value = false;
|
| | |
| | | refreshTable.value = true;
|
| | | });
|
| | | }
|
| | |
|
| | | /** 修改按钮操作 */
|
| | | async function handleUpdate(row) {
|
| | | reset();
|
| | |
| | | title.value = "修改菜单";
|
| | | });
|
| | | }
|
| | |
|
| | | /** 提交按钮 */
|
| | | function submitForm() {
|
| | | proxy.$refs["menuRef"].validate(valid => {
|
| | |
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | /** 删除按钮操作 */
|
| | | function handleDelete(row) {
|
| | | proxy.$modal.confirm('是否确认删除名称为"' + row.menuName + '"的数据项?').then(function() {
|