¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/basic/CachePoint.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "ç¼åç¹", |
| | | name: "CachePoint", |
| | | url: "/CachePoint/", |
| | | sortName: "id", |
| | | }); |
| | | const editFormFields = ref({ |
| | | areaId: "", |
| | | pointCode: "", |
| | | pointStatus: "", |
| | | enableStatus: "", |
| | | pointType: "", |
| | | row: "", |
| | | column: "", |
| | | depth: "", |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | {title: "ç¼åç¹ç¼å·",required: true,field: "pointCode",type: "string",}, |
| | | {title: "åºå主é®",required: true,field: "areaId",type: "select",dataKey: "areainfo", data: [] ,}, |
| | | {title: "ç¼åç¹ç¶æ",field: "pointStatus",type: "select",dataKey: "locationStatusEnum",data: [],}, |
| | | {title: "æ¯å¦ç¦ç¨",field: "enableStatus",type: "select",dataKey: "enableStatusEnum",data: [],}, |
| | | ],[ |
| | | { title: "è¡", field: "row", type: "string" }, |
| | | { title: "å", field: "column", type: "string" }, |
| | | { title: "深度", field: "depth", type: "string" }, |
| | | { title: "ç¼åç¹ç±»å", field: "pointType", type: "string"}, |
| | | ], |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | areaId: "", |
| | | pointCode: "", |
| | | pointStatus: "", |
| | | enableStatus: "", |
| | | pointType: "", |
| | | row: "", |
| | | column: "", |
| | | depth: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | {title: "ç¼åç¹ç¼å·",field: "pointCode",type: "string",}, |
| | | {title: "åºå主é®",field: "areaId",type: "select",dataKey: "areainfo",data: [],}, |
| | | {title: "ç¼åç¹ç¶æ",field: "pointStatus",type: "select",dataKey: "locationStatusEnum",data: [],}, |
| | | {title: "æ¯å¦ç¦ç¨",field: "enableStatus",type: "select",dataKey: "enableStatusEnum",data: [],}, |
| | | ],[ |
| | | { title: "è¡", field: "row", type: "string" }, |
| | | { title: "å", field: "column", type: "string" }, |
| | | { title: "深度", field: "depth", type: "string" }, |
| | | { title: "ç¼åç¹ç±»å", field: "pointType", type: "string"}, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "areaId", |
| | | title: "åºå主é®", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | bind:{ key: "areainfo", data: [] }, |
| | | }, |
| | | { |
| | | field: "pointCode", |
| | | title: "ç¼åç¹ç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "pointStatus", |
| | | title: "ç¼åç¹ç¶æ", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { key: "locationStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "enableStatus", |
| | | title: "æ¯å¦ç¦ç¨", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { key: "enableStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "row", |
| | | title: "è¡", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "column", |
| | | title: "å", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "depth", |
| | | title: "深度", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "pointType", |
| | | title: "ç¼åç¹ç±»å", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "Remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | sort: true, |
| | | }, |
| | | { |
| | | field: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | sort: true, |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "", |
| | | columns: [], |
| | | sortName: "", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |