|
@@ -1,28 +1,36 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
+ <el-card class="fiche">
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList">收起</right-toolbar>
|
|
|
+ <span style="margin-bottom: 10px;color:#333333;font:14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial,sans-serif">所选条件:</span>
|
|
|
+ <div style="float: right;margin-right:1%">
|
|
|
+ <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" style="float: ;">重置</el-button>
|
|
|
+ </div>
|
|
|
+ <hr style="margin-top: 16px;">
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
- <el-form-item label="产品名称" prop="spiProducName">
|
|
|
+ <el-form-item label="菜单名称" prop="spiProducName">
|
|
|
<el-input
|
|
|
v-model="queryParams.spiProducName"
|
|
|
- placeholder="请输入产品名称"
|
|
|
+ placeholder="请输入菜单名称"
|
|
|
clearable
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="产品描述" prop="spiProducDescribe">
|
|
|
+ <el-form-item label="菜单描述" prop="spiProducDescribe">
|
|
|
<el-input
|
|
|
v-model="queryParams.spiProducDescribe"
|
|
|
- placeholder="请输入产品描述"
|
|
|
+ placeholder="请输入菜单描述"
|
|
|
clearable
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="状态" prop="spiState">
|
|
|
+ <!-- <el-form-item label="状态" prop="spiState">
|
|
|
<el-select
|
|
|
v-model="queryParams.spiState"
|
|
|
- placeholder="产品状态"
|
|
|
+ placeholder="菜单状态"
|
|
|
clearable
|
|
|
size="small"
|
|
|
style="width: 240px"
|
|
@@ -34,13 +42,13 @@
|
|
|
:value="dict.dictValue"
|
|
|
/>
|
|
|
</el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
+ <!-- <el-form-item>
|
|
|
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
</el-form>
|
|
|
-
|
|
|
+</el-card>
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -51,7 +59,7 @@
|
|
|
v-hasPermi="['system:product:add']"
|
|
|
>新增</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
+ <!-- <el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="success"
|
|
|
icon="el-icon-edit"
|
|
@@ -60,7 +68,7 @@
|
|
|
@click="handleUpdate"
|
|
|
v-hasPermi="['system:product:edit']"
|
|
|
>修改</el-button>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
<!-- <el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="danger"
|
|
@@ -80,15 +88,15 @@
|
|
|
v-hasPermi="['system:product:export']"
|
|
|
>导出</el-button>
|
|
|
</el-col> -->
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
|
|
|
</el-row>
|
|
|
|
|
|
- <el-table v-loading="loading" :data="productList" @selection-change="handleSelectionChange" stripe >
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <el-table v-loading="loading" :data="productList" @selection-change="handleSelectionChange" stripe border>
|
|
|
+ <!-- <el-table-column type="selection" width="55" align="center" /> -->
|
|
|
<el-table-column label="序号" type="index" width="55" align="center" />
|
|
|
- <el-table-column label="产品名称" align="center" prop="spiProducName" />
|
|
|
- <el-table-column label="产品描述" align="center" prop="spiProducDescribe" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="状态" align="center" width="100">
|
|
|
+ <el-table-column label="菜单名称" align="center" prop="spiProducName" />
|
|
|
+ <el-table-column label="菜单描述" align="center" prop="spiProducDescribe" :show-overflow-tooltip="true"/>
|
|
|
+ <!-- <el-table-column label="状态" align="center" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<el-switch
|
|
|
v-model="scope.row.spiState"
|
|
@@ -97,7 +105,7 @@
|
|
|
@change="handleStatusChange(scope.row)"
|
|
|
></el-switch>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column> -->
|
|
|
<el-table-column label="备注" align="center" prop="spiRemark" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
@@ -134,14 +142,14 @@
|
|
|
@pagination="getList"
|
|
|
/>
|
|
|
|
|
|
- <!-- 添加或修改产品信息对话框 -->
|
|
|
+ <!-- 添加或修改菜单信息对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
- <el-form-item label="产品名称" prop="spiProducName">
|
|
|
- <el-input v-model="form.spiProducName" placeholder="请输入产品名称" maxlength="10" show-word-limit />
|
|
|
+ <el-form-item label="菜单名称" prop="spiProducName">
|
|
|
+ <el-input v-model="form.spiProducName" placeholder="请输入菜单名称" maxlength="10" show-word-limit />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="产品描述" prop="spiProducDescribe">
|
|
|
- <el-input v-model="form.spiProducDescribe" type="textarea" placeholder="请输入产品描述" maxlength="30" show-word-limit/>
|
|
|
+ <el-form-item label="菜单描述" prop="spiProducDescribe">
|
|
|
+ <el-input v-model="form.spiProducDescribe" type="textarea" placeholder="请输入菜单描述" maxlength="30" show-word-limit/>
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="状态" prop="spiState">
|
|
|
<el-radio-group v-model="form.spiState">
|
|
@@ -177,7 +185,7 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <!-- 产品附加信息配置对话框 -->
|
|
|
+ <!-- 菜单附加信息配置对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="openAttr" width="500px" append-to-body>
|
|
|
<el-form ref="attrForm" :model="attrForm" label-width="80px">
|
|
|
<el-table v-loading="loading" :data="productAttrList">
|
|
@@ -240,7 +248,7 @@ export default {
|
|
|
showSearch: true,
|
|
|
// 总条数
|
|
|
total: 0,
|
|
|
- // 产品信息表格数据
|
|
|
+ // 菜单信息表格数据
|
|
|
productList: [],
|
|
|
productAttrList: [],
|
|
|
// 状态字典
|
|
@@ -276,10 +284,10 @@ export default {
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
spiProducName: [
|
|
|
- { required: true, message: "产品名称不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "菜单名称不能为空", trigger: "blur" }
|
|
|
],
|
|
|
spiState: [
|
|
|
- { required: true, message: "产品状态不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "菜单状态不能为空", trigger: "blur" }
|
|
|
],
|
|
|
}
|
|
|
};
|
|
@@ -294,7 +302,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
- /** 查询产品信息列表 */
|
|
|
+ /** 查询菜单信息列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
listProduct(this.queryParams).then(response => {
|
|
@@ -309,7 +317,7 @@ export default {
|
|
|
this.menuOptions = response.data;
|
|
|
});
|
|
|
},
|
|
|
- /** 根据产品ID查询菜单树结构 */
|
|
|
+ /** 根据菜单ID查询菜单树结构 */
|
|
|
getProductMenuTreeselect(spiProducId) {
|
|
|
return productMenuTreeselect(spiProducId).then(response => {
|
|
|
this.menuOptions = response.menus;
|
|
@@ -407,7 +415,7 @@ export default {
|
|
|
this.reset();
|
|
|
this.getMenuTreeselect();
|
|
|
this.open = true;
|
|
|
- this.title = "添加产品信息";
|
|
|
+ this.title = "添加菜单信息";
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
@@ -422,7 +430,7 @@ export default {
|
|
|
this.$refs.menu.setCheckedKeys(res.checkedKeys);
|
|
|
});
|
|
|
});
|
|
|
- this.title = "修改产品信息";
|
|
|
+ this.title = "修改菜单信息";
|
|
|
});
|
|
|
},
|
|
|
/** 附加信息按钮操作 */
|
|
@@ -434,7 +442,7 @@ export default {
|
|
|
console.log(response)
|
|
|
this.productAttrList = response.rows;
|
|
|
this.openAttr = true;
|
|
|
- this.title = "产品附加信息配置";
|
|
|
+ this.title = "菜单附加信息配置";
|
|
|
});
|
|
|
},
|
|
|
/** 增加节点 */
|
|
@@ -455,10 +463,10 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- // 产品状态修改
|
|
|
+ // 菜单状态修改
|
|
|
handleStatusChange(row) {
|
|
|
let text = row.spiState === "00" ? "启用" : "停用";
|
|
|
- this.$confirm('确认要' + text + '"' + row.spiProducName + '"产品吗?', "警告", {
|
|
|
+ this.$confirm('确认要' + text + '"' + row.spiProducName + '"菜单吗?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
@@ -510,7 +518,7 @@ export default {
|
|
|
}
|
|
|
}else{
|
|
|
this.$message({
|
|
|
- message: '请选择产品菜单',
|
|
|
+ message: '请选择菜单菜单',
|
|
|
type: 'warning'
|
|
|
});
|
|
|
return;
|
|
@@ -539,7 +547,7 @@ export default {
|
|
|
handleDelete(row) {
|
|
|
const spiProducIds = row.spiProducId || this.ids
|
|
|
const spiProducName = row.spiProducName;
|
|
|
- this.$confirm('是否确认删除产品名称为"' + spiProducName + '"的数据项?', "警告", {
|
|
|
+ this.$confirm('是否确认删除菜单名称为"' + spiProducName + '"的数据项?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|