update user/role 's search bar
This commit is contained in:
parent
68732740c3
commit
1080660be3
@ -94,13 +94,6 @@ export default function () {
|
|||||||
form: {
|
form: {
|
||||||
rows: [
|
rows: [
|
||||||
[
|
[
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: "原料名称",
|
|
||||||
prop: "name",
|
|
||||||
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
|
||||||
elparams: { placeholder: "请输入原料名称" },
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
input: true,
|
input: true,
|
||||||
label: "原料编码",
|
label: "原料编码",
|
||||||
@ -109,6 +102,13 @@ export default function () {
|
|||||||
elparams: { placeholder: "请输入原料编码" },
|
elparams: { placeholder: "请输入原料编码" },
|
||||||
},
|
},
|
||||||
{ input: true, label: "原料描述", prop: "description", elparams: { placeholder: "原料描述" } },
|
{ input: true, label: "原料描述", prop: "description", elparams: { placeholder: "原料描述" } },
|
||||||
|
{
|
||||||
|
input: true,
|
||||||
|
label: "中文名称", // 即,原料名称
|
||||||
|
prop: "name",
|
||||||
|
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
||||||
|
elparams: { placeholder: "请输入中文名称" },
|
||||||
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
// {
|
// {
|
||||||
|
@ -11,17 +11,18 @@ export default function () {
|
|||||||
// { prop: 'version', label: '配方号' },
|
// { prop: 'version', label: '配方号' },
|
||||||
// { prop: "shapeCode", label: "砖型" },
|
// { prop: "shapeCode", label: "砖型" },
|
||||||
// { prop: 'status', label: '状态', subcomponent: StatusComponent }, // subcomponent
|
// { prop: 'status', label: '状态', subcomponent: StatusComponent }, // subcomponent
|
||||||
{ prop: "description", label: "详情", subcomponent: TableTextComponent },
|
// { prop: "description", label: "详情", subcomponent: TableTextComponent },
|
||||||
{ prop: "remark", label: "备注" },
|
{ prop: "remark", label: "备注" },
|
||||||
{ prop: "createTime", label: "添加时间", filter: timeFilter },
|
{ prop: "createTime", label: "添加时间", filter: timeFilter },
|
||||||
{
|
{
|
||||||
prop: "operations",
|
prop: "operations",
|
||||||
name: "操作",
|
name: "操作",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 120,
|
// width: 120,
|
||||||
|
width: 90,
|
||||||
subcomponent: TableOperaionComponent,
|
subcomponent: TableOperaionComponent,
|
||||||
options: [
|
options: [
|
||||||
{ name: "copy", label: "复制", icon: "copy-document" },
|
// { name: "copy", label: "复制", icon: "copy-document" },
|
||||||
{ name: "edit", label: "编辑", icon: "edit-outline" },
|
{ name: "edit", label: "编辑", icon: "edit-outline" },
|
||||||
{ name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "pms:packingStep:delete" },
|
{ name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "pms:packingStep:delete" },
|
||||||
],
|
],
|
||||||
@ -62,13 +63,13 @@ export default function () {
|
|||||||
name: "查询",
|
name: "查询",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// button: {
|
button: {
|
||||||
// type: "plain",
|
type: "plain",
|
||||||
// name: "新增",
|
name: "新增",
|
||||||
// permission: "pms:packingStep:save",
|
// permission: "pms:packingStep:save",
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const dialogConfigs = {
|
const dialogConfigs = {
|
||||||
@ -76,7 +77,7 @@ export default function () {
|
|||||||
extraIds: { wsId: 5 }, // 工艺管理里面的相关模块的 dialogWithMenu 需要额外的工序 id
|
extraIds: { wsId: 5 }, // 工艺管理里面的相关模块的 dialogWithMenu 需要额外的工序 id
|
||||||
menu: [
|
menu: [
|
||||||
{ name: "包装工艺", key: "info" },
|
{ name: "包装工艺", key: "info" },
|
||||||
{ name: "工艺参数", key: "attr", onlyEditMode: true },
|
// { name: "工艺参数", key: "attr", onlyEditMode: true },
|
||||||
],
|
],
|
||||||
form: {
|
form: {
|
||||||
rows: [
|
rows: [
|
||||||
|
@ -8,9 +8,9 @@ export default function () {
|
|||||||
{ type: "index", label: "序号" },
|
{ type: "index", label: "序号" },
|
||||||
{ prop: "name", label: "物料名称" },
|
{ prop: "name", label: "物料名称" },
|
||||||
{ prop: "code", label: "物料编码" },
|
{ prop: "code", label: "物料编码" },
|
||||||
{ prop: "typeDictValue", label: "物料类型", filter: dictFilter("product_type") },
|
// { prop: "typeDictValue", label: "物料类型", filter: dictFilter("product_type") },
|
||||||
{ prop: "specifications", label: "规格" },
|
{ prop: "specifications", label: "规格" },
|
||||||
{ prop: "unitDictValue", label: "单位", filter: dictFilter("unit") },
|
// { prop: "unitDictValue", label: "单位", filter: dictFilter("unit") },
|
||||||
{ prop: "weight", label: "重量", filter: (val) => (val ? val + " kg" : "-") },
|
{ prop: "weight", label: "重量", filter: (val) => (val ? val + " kg" : "-") },
|
||||||
{ prop: "processTime", label: "产线完成单位产品用时", width: 200, filter: (val) => val + " (分钟)" },
|
{ prop: "processTime", label: "产线完成单位产品用时", width: 200, filter: (val) => val + " (分钟)" },
|
||||||
{ prop: "remark", label: "备注" },
|
{ prop: "remark", label: "备注" },
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-card shadow="never" class="aui-card--fill">
|
<el-card shadow="never" class="aui-card--fill">
|
||||||
<div class="mod-sys__user">
|
<div class="mod-sys__user">
|
||||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
<!-- <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> -->
|
||||||
|
<BaseSearchForm :head-config="headConfig" @btn-click="handleBtnClick" />
|
||||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||||
<method-btn
|
<method-btn
|
||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
@ -41,6 +42,9 @@
|
|||||||
import basicPage from "@/mixins/basic-page";
|
import basicPage from "@/mixins/basic-page";
|
||||||
import AddOrUpdate from "./role-add-or-update";
|
import AddOrUpdate from "./role-add-or-update";
|
||||||
import i18n from "@/i18n";
|
import i18n from "@/i18n";
|
||||||
|
import BaseSearchForm from "../../../components/BaseSearchForm.vue";
|
||||||
|
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: "name",
|
prop: "name",
|
||||||
@ -96,29 +100,74 @@ export default {
|
|||||||
plain: true,
|
plain: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
headConfig: {
|
||||||
|
rules: null,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
label: i18n.t("role.name"),
|
||||||
|
prop: "name",
|
||||||
|
input: true,
|
||||||
|
default: { value: "" },
|
||||||
|
bind: { placeholder: "请输入角色名称" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
button: {
|
||||||
|
type: "primary",
|
||||||
|
name: "查询",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
button: {
|
||||||
|
type: "primary",
|
||||||
|
name: "新增",
|
||||||
|
permission: "",
|
||||||
|
},
|
||||||
|
bind: {
|
||||||
|
plain: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
AddOrUpdate,
|
AddOrUpdate,
|
||||||
|
BaseSearchForm
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//search-bar点击
|
handleBtnClick({ btnName, payload }) {
|
||||||
buttonClick(val) {
|
console.log("[search] form handleBtnClick", btnName, payload);
|
||||||
switch (val.btnName) {
|
switch (btnName) {
|
||||||
case "search":
|
case "新增":
|
||||||
this.listQuery.name = val.name;
|
|
||||||
this.listQuery.page = 1;
|
|
||||||
this.getDataList();
|
|
||||||
break;
|
|
||||||
case "add":
|
|
||||||
this.addOrEditTitle = "新增";
|
this.addOrEditTitle = "新增";
|
||||||
this.addOrUpdateVisible = true;
|
this.addOrUpdateVisible = true;
|
||||||
this.addOrUpdateHandle();
|
this.addOrUpdateHandle();
|
||||||
break;
|
break;
|
||||||
default:
|
case "查询": {
|
||||||
console.log(val);
|
this.listQuery.name = payload.name;
|
||||||
|
this.listQuery.page = 1;
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//search-bar点击
|
||||||
|
// buttonClick(val) {
|
||||||
|
// switch (val.btnName) {
|
||||||
|
// case "search":
|
||||||
|
// this.listQuery.name = val.name;
|
||||||
|
// this.listQuery.page = 1;
|
||||||
|
// this.getDataList();
|
||||||
|
// break;
|
||||||
|
// case "add":
|
||||||
|
// this.addOrEditTitle = "新增";
|
||||||
|
// this.addOrUpdateVisible = true;
|
||||||
|
// this.addOrUpdateHandle();
|
||||||
|
// break;
|
||||||
|
// default:
|
||||||
|
// console.log(val);
|
||||||
|
// }
|
||||||
|
// },
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-card shadow="never" class="aui-card--fill">
|
<el-card shadow="never" class="aui-card--fill">
|
||||||
<div class="mod-sys__user">
|
<div class="mod-sys__user">
|
||||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
<!-- <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> -->
|
||||||
|
<BaseSearchForm :head-config="headConfig" @btn-click="handleBtnClick" />
|
||||||
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
<base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
|
||||||
<method-btn
|
<method-btn
|
||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
@ -9,13 +10,16 @@
|
|||||||
:width="100"
|
:width="100"
|
||||||
label="操作"
|
label="操作"
|
||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="(payload) => handleClick({
|
@clickBtn="
|
||||||
type: payload.type,
|
(payload) =>
|
||||||
data: {
|
handleClick({
|
||||||
...payload.data,
|
type: payload.type,
|
||||||
name: payload.data.username
|
data: {
|
||||||
}
|
...payload.data,
|
||||||
})" />
|
name: payload.data.username,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
" />
|
||||||
</base-table>
|
</base-table>
|
||||||
<pagination
|
<pagination
|
||||||
:limit.sync="listQuery.limit"
|
:limit.sync="listQuery.limit"
|
||||||
@ -29,7 +33,15 @@
|
|||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
@confirm="handleConfirm"
|
@confirm="handleConfirm"
|
||||||
:before-close="handleCancel">
|
:before-close="handleCancel">
|
||||||
<add-or-update ref="addOrUpdate" @refreshDataList="() => { getDataList(); addOrUpdateVisible = false; }" @successSubmit="successSubmit"></add-or-update>
|
<add-or-update
|
||||||
|
ref="addOrUpdate"
|
||||||
|
@refreshDataList="
|
||||||
|
() => {
|
||||||
|
getDataList();
|
||||||
|
addOrUpdateVisible = false;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
@successSubmit="successSubmit"></add-or-update>
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -40,6 +52,8 @@ import basicPage from "@/mixins/basic-page";
|
|||||||
import AddOrUpdate from "./user-add-or-update";
|
import AddOrUpdate from "./user-add-or-update";
|
||||||
import i18n from "@/i18n";
|
import i18n from "@/i18n";
|
||||||
import sysFilter from "@/filters/sys-filter";
|
import sysFilter from "@/filters/sys-filter";
|
||||||
|
import BaseSearchForm from "../../../components/BaseSearchForm.vue";
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: "username",
|
prop: "username",
|
||||||
@ -83,9 +97,38 @@ const tableBtn = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
export default {
|
export default {
|
||||||
|
name: "UserView",
|
||||||
mixins: [basicPage],
|
mixins: [basicPage],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
headConfig: {
|
||||||
|
rules: null,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
label: i18n.t("user.username"),
|
||||||
|
prop: "username",
|
||||||
|
input: true,
|
||||||
|
default: { value: "" },
|
||||||
|
bind: { placeholder: "请输入用户名" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
button: {
|
||||||
|
type: "primary",
|
||||||
|
name: "查询",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
button: {
|
||||||
|
type: "primary",
|
||||||
|
name: "新增",
|
||||||
|
permission: "",
|
||||||
|
},
|
||||||
|
bind: {
|
||||||
|
plain: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
urlOptions: {
|
urlOptions: {
|
||||||
getDataListURL: "/sys/user/page",
|
getDataListURL: "/sys/user/page",
|
||||||
deleteURL: "/sys/user",
|
deleteURL: "/sys/user",
|
||||||
@ -118,25 +161,42 @@ export default {
|
|||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
AddOrUpdate,
|
AddOrUpdate,
|
||||||
|
BaseSearchForm,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//search-bar点击
|
handleBtnClick({ btnName, payload }) {
|
||||||
buttonClick(val) {
|
console.log("[search] form handleBtnClick", btnName, payload);
|
||||||
switch (val.btnName) {
|
switch (btnName) {
|
||||||
case "search":
|
case "新增":
|
||||||
this.listQuery.username = val.username;
|
|
||||||
this.listQuery.page = 1;
|
|
||||||
this.getDataList();
|
|
||||||
break;
|
|
||||||
case "add":
|
|
||||||
this.addOrEditTitle = "新增";
|
this.addOrEditTitle = "新增";
|
||||||
this.addOrUpdateVisible = true;
|
this.addOrUpdateVisible = true;
|
||||||
this.addOrUpdateHandle();
|
this.addOrUpdateHandle();
|
||||||
break;
|
break;
|
||||||
default:
|
case "查询": {
|
||||||
console.log(val);
|
this.listQuery.username = payload.username;
|
||||||
|
this.listQuery.page = 1;
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//search-bar点击
|
||||||
|
// buttonClick(val) {
|
||||||
|
// switch (val.btnName) {
|
||||||
|
// case "search":
|
||||||
|
// this.listQuery.username = val.username;
|
||||||
|
// this.listQuery.page = 1;
|
||||||
|
// this.getDataList();
|
||||||
|
// break;
|
||||||
|
// case "add":
|
||||||
|
// this.addOrEditTitle = "新增";
|
||||||
|
// this.addOrUpdateVisible = true;
|
||||||
|
// this.addOrUpdateHandle();
|
||||||
|
// break;
|
||||||
|
// default:
|
||||||
|
// console.log(val);
|
||||||
|
// }
|
||||||
|
// },
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user