add SwitchBtn 组件
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
|
||||
import StatusComponent from "@/components/noTemplateComponents/statusComponent";
|
||||
import switchBtn from "@/components/noTemplateComponents/switchBtn";
|
||||
import request from "@/utils/request";
|
||||
import { dictFilter } from '@/utils/filters'
|
||||
|
||||
@@ -7,8 +7,8 @@ export default function () {
|
||||
const tableProps = [
|
||||
{ prop: "name", label: "料仓名称" },
|
||||
{ prop: "code", label: "料仓编码" },
|
||||
{ prop: "typeDictValue", label: "料仓类型", filter: dictFilter('liangcang') },
|
||||
{ prop: "status", label: "产线状态", subcomponent: StatusComponent }, // subcomponent
|
||||
{ prop: "typeDictValue", label: "料仓类型", filter: dictFilter('liaocang') },
|
||||
{ prop: "status", label: "状态", subcomponent: switchBtn }, // subcomponent
|
||||
{ prop: "description", label: "描述" },
|
||||
{ prop: "remark", label: "备注" },
|
||||
{
|
||||
@@ -78,8 +78,9 @@ export default function () {
|
||||
prop: "typeDictValue",
|
||||
// fetchData: () => this.$http.get("/pms/factory/page", { params: { limit: 999, page: 1 } }),
|
||||
options: [
|
||||
{ label: '中间仓', value: 0 },
|
||||
{ label: '日料仓', value: 1 },
|
||||
// TODO: 或许映射可以全权交给数据字典
|
||||
{ label: '中间仓', value: '0' },
|
||||
{ label: '日料仓', value: '1' },
|
||||
],
|
||||
rules: { required: true, message: "not empty", trigger: "change" },
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user