update
This commit is contained in:
parent
4342cf5cb0
commit
37099c0634
@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VITE_APP_TITLE = 若依管理系统
|
VITE_APP_TITLE = 智能缝纫管理系统
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
VITE_APP_ENV = 'development'
|
VITE_APP_ENV = 'development'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VITE_APP_TITLE = 若依管理系统
|
VITE_APP_TITLE = 智能缝纫管理系统
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
VITE_APP_ENV = 'production'
|
VITE_APP_ENV = 'production'
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<el-breadcrumb class="app-breadcrumb" separator="/">
|
<el-breadcrumb class="app-breadcrumb" separator="/">
|
||||||
<transition-group name="breadcrumb">
|
<transition-group name="breadcrumb">
|
||||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
||||||
<span v-if="item.redirect === 'noRedirect' || index == levelList.length - 1" class="no-redirect">{{ item.meta.title }}</span>
|
<span v-if="item.redirect === 'noRedirect' || index == levelList.length - 1" class="no-redirect">{{ menusTitle(item.meta.title) }}</span>
|
||||||
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
<a v-else @click.prevent="handleLink(item)">{{ menusTitle(item.meta.title) }}</a>
|
||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
</transition-group>
|
</transition-group>
|
||||||
</el-breadcrumb>
|
</el-breadcrumb>
|
||||||
@ -13,7 +13,15 @@
|
|||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const levelList = ref([])
|
const levelList = ref([])
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
|
let {te,t} = useI18n();
|
||||||
|
//菜单栏国际化
|
||||||
|
function menusTitle(item) {
|
||||||
|
if (te("menus." + item)) {
|
||||||
|
return t("menus." + item)
|
||||||
|
}
|
||||||
|
return item
|
||||||
|
}
|
||||||
function getBreadcrumb() {
|
function getBreadcrumb() {
|
||||||
// only show routes with meta.title
|
// only show routes with meta.title
|
||||||
let matched = route.matched.filter(item => item.meta && item.meta.title);
|
let matched = route.matched.filter(item => item.meta && item.meta.title);
|
||||||
|
@ -2,21 +2,25 @@ export default {
|
|||||||
"menus":{
|
"menus":{
|
||||||
"home": "Home",
|
"home": "Home",
|
||||||
"dashboard": "Dashboard",
|
"dashboard": "Dashboard",
|
||||||
"system": "System",
|
"Device": "Device",
|
||||||
"user": "User",
|
"Product": "Product",
|
||||||
"role": "Role",
|
"System": "System",
|
||||||
"menu": "Menu",
|
"User": "User",
|
||||||
"dept": "Dept",
|
"Role": "Role",
|
||||||
"dict": "Dict",
|
"Menu": "Menu",
|
||||||
"config": "Config",
|
"Dept": "Dept",
|
||||||
"notice": "Notice",
|
"Job": "Job",
|
||||||
"log": "Log",
|
"Dict": "Dict",
|
||||||
"loginLog": "Login Log",
|
"Config": "Config",
|
||||||
"task": "Task",
|
"Notice": "Notice",
|
||||||
"druid": "Druid",
|
"Log": "Log",
|
||||||
"druidWallBoard": "Wall Board",
|
"LoginLog": "LoginLog",
|
||||||
"druidSql": "SQL",
|
"Task": "Task",
|
||||||
"druidStat": "Stat",
|
"Druid": "Druid",
|
||||||
|
"Tools": "Tools",
|
||||||
|
"DruidWallBoard": "DruidWallBoard",
|
||||||
|
"DruidSql": "DruidSql",
|
||||||
|
"DruidStat": "DruidStat",
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"add": "Add",
|
"add": "Add",
|
||||||
|
@ -3,21 +3,25 @@ export default {
|
|||||||
"menus":{
|
"menus":{
|
||||||
"home": "首页",
|
"home": "首页",
|
||||||
"dashboard": "仪表盘",
|
"dashboard": "仪表盘",
|
||||||
"system": "系统管理",
|
"Device": "设备管理",
|
||||||
"user": "用户管理",
|
"Product": "产品管理",
|
||||||
"role": "角色管理",
|
"System": "系统管理",
|
||||||
"menu": "菜单管理",
|
"User": "用户管理",
|
||||||
"dept": "部门管理",
|
"Role": "角色管理",
|
||||||
"dict": "字典管理",
|
"Menu": "菜单管理",
|
||||||
"config": "参数管理",
|
"Dept": "部门管理",
|
||||||
"notice": "通知公告",
|
"Job": "岗位管理",
|
||||||
"log": "操作日志",
|
"Dict": "字典管理",
|
||||||
"loginLog": "登录日志",
|
"Config": "参数管理",
|
||||||
"task": "定时任务",
|
"Notice": "通知公告",
|
||||||
"druid": "监控管理",
|
"Log": "操作日志",
|
||||||
"druidWallBoard": "大盘监控",
|
"LoginLog": "登录日志",
|
||||||
"druidSql": "SQL监控",
|
"Task": "定时任务",
|
||||||
"druidStat": "统计监控",
|
"Druid": "系统监控",
|
||||||
|
"Tools": "系统工具",
|
||||||
|
"DruidWallBoard": "大盘监控",
|
||||||
|
"DruidSql": "SQL监控",
|
||||||
|
"DruidStat": "统计监控",
|
||||||
},
|
},
|
||||||
"common":{
|
"common":{
|
||||||
"add": "新增",
|
"add": "新增",
|
||||||
|
42
src/views/casm/product/add_edit.vue
Normal file
42
src/views/casm/product/add_edit.vue
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-model="props.modelValue" :title="props.title" @close="close" width="800">
|
||||||
|
<el-form ref="formRef" :inline="true" :model="props.form" :rules="rules" class="demo-form-inline" label-width="100px">
|
||||||
|
<el-form-item label="设备名称" prop="name">
|
||||||
|
<el-input v-model="props.form.name" placeholder="请输入设备名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备编号" prop="code">
|
||||||
|
<el-input v-model="props.form.code" placeholder="请输入设备编号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref } from "vue";
|
||||||
|
const emit = defineEmits();
|
||||||
|
const props = defineProps({
|
||||||
|
modelValue: [String, Object, Array],
|
||||||
|
title: String,
|
||||||
|
form: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
||||||
|
function close() {
|
||||||
|
emit("update:modelValue", false);
|
||||||
|
}
|
||||||
|
function submitForm() {
|
||||||
|
emit("submitForm", props.form);
|
||||||
|
}
|
||||||
|
function cancel() {
|
||||||
|
emit("update:form", {});
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
@ -1,8 +1,202 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="">产品管理</div>
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="设备名称" prop="name">
|
||||||
|
<el-input v-model="queryParams.name" placeholder="请输入设备名称" clearable @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备编号" prop="code">
|
||||||
|
<el-input v-model="queryParams.code" placeholder="请输入设备编号" clearable @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="plus" size="mini" @click="handleAdd"
|
||||||
|
v-hasPermi="['casm:device:add']">新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="success" plain icon="edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||||
|
v-hasPermi="['casm:device:edit']">修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="danger" plain icon="delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||||
|
v-hasPermi="['casm:device:remove']">删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button type="warning" plain icon="download" size="mini" @click="handleExport"
|
||||||
|
v-hasPermi="['casm:device:export']">导出</el-button>
|
||||||
|
</el-col> -->
|
||||||
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
<el-table v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||||
|
<el-table-column label="产品名称" align="center" v-if="columns[0].visible" prop="name" />
|
||||||
|
<el-table-column label="产品类别" align="center" v-if="columns[1].visible" prop="code" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tooltip content="详情" placement="top" v-if="scope.row.userId !== 1">
|
||||||
|
<el-button link type="primary" icon="Tickets" @click="handleInfo(scope.row)"
|
||||||
|
v-hasPermi="['casm:device:info']"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="修改" placement="top" v-if="scope.row.userId !== 1">
|
||||||
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['casm:device:edit']"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="删除" placement="top" v-if="scope.row.userId !== 1">
|
||||||
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['casm:device:remove']"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList" />
|
||||||
|
<AddEdit :title="title" v-model="open" :form="form"></AddEdit>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { ref, reactive, watch, onMounted } from 'vue'
|
||||||
|
import AddEdit from './add_edit.vue';
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
|
// 遮罩层
|
||||||
|
let loading = ref(true)
|
||||||
|
// 选中数组
|
||||||
|
let ids = ref([])
|
||||||
|
// 非单个禁用
|
||||||
|
let single = ref(true)
|
||||||
|
// 非多个禁用
|
||||||
|
let multiple = ref(true)
|
||||||
|
// 显示搜索条件
|
||||||
|
let showSearch = ref(false)
|
||||||
|
// 表单参数
|
||||||
|
let form = ref({})
|
||||||
|
// 是否显示弹出层
|
||||||
|
let open = ref(false)
|
||||||
|
// 弹出层标题
|
||||||
|
let title = ref("")
|
||||||
|
// 查询参数
|
||||||
|
let queryParams = reactive({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
name: null,
|
||||||
|
code: null
|
||||||
|
})
|
||||||
|
|
||||||
|
let total = ref(0)
|
||||||
|
// 设备信息表格数据
|
||||||
|
let deviceList = ref([])
|
||||||
|
// 列显隐信息
|
||||||
|
const columns = ref([
|
||||||
|
{ key: 0, label: `产品名称`, visible: true },
|
||||||
|
{ key: 1, label: `产品类别`, visible: true },
|
||||||
|
]);
|
||||||
|
/** 查询设备信息列表 */
|
||||||
|
function getList() {
|
||||||
|
loading.value = true;
|
||||||
|
// listDevice(queryParams).then(response => {
|
||||||
|
// deviceList.value = response.rows;
|
||||||
|
// total.value = response.total;
|
||||||
|
// loading.value = false;
|
||||||
|
// });
|
||||||
|
setTimeout(() => {
|
||||||
|
loading.value = false;
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
// 多选框选中数据
|
||||||
|
function handleSelectionChange(selection) {
|
||||||
|
ids.value = selection.map(item => item.id)
|
||||||
|
single.value = selection.length !== 1
|
||||||
|
multiple.value = !selection.length
|
||||||
|
}
|
||||||
|
|
||||||
|
//** 搜索按钮操作 */
|
||||||
|
function handleQuery() {
|
||||||
|
queryParams.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
queryParams.pageNum = 1
|
||||||
|
queryParams.pageSize = 10
|
||||||
|
queryParams.name = null
|
||||||
|
queryParams.code = null
|
||||||
|
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
function handleAdd() {
|
||||||
|
reset();
|
||||||
|
open.value = true;
|
||||||
|
title.value = "添加产品信息";
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
function submitForm() {
|
||||||
|
proxy.$refs["formRef"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (form.value.id != null) {
|
||||||
|
// updateDevice(form.value).then(response => {
|
||||||
|
// proxy.$modal.msgSuccess("修改成功");
|
||||||
|
// open.value = false;
|
||||||
|
// getList();
|
||||||
|
// });
|
||||||
|
} else {
|
||||||
|
// addDevice(form.value).then(response => {
|
||||||
|
// proxy.$modal.msgSuccess("新增成功");
|
||||||
|
// open.value = false;
|
||||||
|
// getList();
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 取消按钮
|
||||||
|
function cancel() {
|
||||||
|
open.value = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
// 表单重置
|
||||||
|
function reset() {
|
||||||
|
form.value = {
|
||||||
|
id: null,
|
||||||
|
name: null,
|
||||||
|
code: null,
|
||||||
|
};
|
||||||
|
//resetForm("form");
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
function handleUpdate(row) {
|
||||||
|
reset();
|
||||||
|
const id = row.id || ids.value
|
||||||
|
// getDevice(id).then(response => {
|
||||||
|
// form.value = response.data;
|
||||||
|
// open.value = true;
|
||||||
|
// title.value = "修改设备信息";
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
function handleDelete(row) {
|
||||||
|
const id = row.id || ids.value;
|
||||||
|
proxy.$modal.confirm('是否确认删除设备信息编号为"' + id + '"的数据项?').then(function () {
|
||||||
|
return //delDevice(id);
|
||||||
|
}).then(() => {
|
||||||
|
getList();
|
||||||
|
proxy.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => { });
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
1051
src/views/index.vue
1051
src/views/index.vue
File diff suppressed because it is too large
Load Diff
@ -55,7 +55,11 @@
|
|||||||
:default-expand-all="isExpandAll"
|
:default-expand-all="isExpandAll"
|
||||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||||
>
|
>
|
||||||
<el-table-column prop="menuName" label="菜单名称" :show-overflow-tooltip="true" width="160"></el-table-column>
|
<el-table-column prop="menuName" label="菜单名称" :show-overflow-tooltip="true" width="160">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ menusTitle(scope.row.menuName) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="icon" label="图标" align="center" width="100">
|
<el-table-column prop="icon" label="图标" align="center" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<svg-icon :icon-class="scope.row.icon" />
|
<svg-icon :icon-class="scope.row.icon" />
|
||||||
@ -279,6 +283,8 @@
|
|||||||
import { addMenu, delMenu, getMenu, listMenu, updateMenu } from "@/api/system/menu";
|
import { addMenu, delMenu, getMenu, listMenu, updateMenu } from "@/api/system/menu";
|
||||||
import SvgIcon from "@/components/SvgIcon";
|
import SvgIcon from "@/components/SvgIcon";
|
||||||
import IconSelect from "@/components/IconSelect";
|
import IconSelect from "@/components/IconSelect";
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
|
let {te,t} = useI18n();
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const { sys_show_hide, sys_normal_disable } = proxy.useDict("sys_show_hide", "sys_normal_disable");
|
const { sys_show_hide, sys_normal_disable } = proxy.useDict("sys_show_hide", "sys_normal_disable");
|
||||||
@ -293,6 +299,14 @@ const isExpandAll = ref(false);
|
|||||||
const refreshTable = ref(true);
|
const refreshTable = ref(true);
|
||||||
const iconSelectRef = ref(null);
|
const iconSelectRef = ref(null);
|
||||||
|
|
||||||
|
|
||||||
|
//菜单栏国际化
|
||||||
|
function menusTitle(item) {
|
||||||
|
if (te("menus." + item)) {
|
||||||
|
return t("menus." + item)
|
||||||
|
}
|
||||||
|
return item
|
||||||
|
}
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {},
|
form: {},
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
Loading…
Reference in New Issue
Block a user