¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <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/areaRouter.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "ç¼åç¹", |
| | | name: "areaRouter", |
| | | url: "/areaRouter/", |
| | | sortName: "id", |
| | | }); |
| | | const editFormFields = ref({ |
| | | areaId: "", |
| | | startArea: "", |
| | | nextArea: "", |
| | | routerType: "", |
| | | isEnd: "", |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | {title: "èµ·ç¹",required: true,field: "startArea",type: "string",}, |
| | | {title: "ç»ç¹åºåID",required: true,field: "nextArea",type: "select",dataKey: "areainfo",data: [],}, |
| | | |
| | | ], |
| | | [ |
| | | {title: "è·¯ç±ç±»å",field: "routerType",type: "like"}, |
| | | {title: "æ¯å¦ä¸ºç»ç¹",field: "isEnd",type: "select",dataKey: "enable",data: [],} |
| | | ], |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | areaId: "", |
| | | pointCode: "", |
| | | pointStatus: "", |
| | | enableStatus: "", |
| | | pointType: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | {title: "èµ·ç¹",required: true,field: "startArea",type: "string",}, |
| | | {title: "ç»ç¹åºåID",field: "nextArea",type: "select",dataKey: "areainfo",data: [],}, |
| | | // {title: "ç»ç¹åºåID",required: true,field: "nextArea",type: "string",}, |
| | | ], |
| | | [ |
| | | {title: "è·¯ç±ç±»å",field: "routerType",type: "like"}, |
| | | {title: "æ¯å¦ä¸ºç»ç¹",field: "isEnd",type: "select",dataKey: "enable",data: [],} |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "startArea", |
| | | title: "èµ·ç¹", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "nextArea", |
| | | title: "ç»ç¹åºåID", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind:{ key: "areainfo", data: [] }, |
| | | }, |
| | | { |
| | | field: "routerType", |
| | | title: "è·¯ç±ç±»å", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | // bind: { key: "locationStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "isEnd", |
| | | title: "æ¯å¦æ¯ç»ç¹", |
| | | type: "byte", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { key: "enable", data: [] }, |
| | | }, |
| | | { |
| | | 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> |
| | | |