Merge remote-tracking branch 'origin/master'
# Conflicts:
# Source/ProjectWeb/src/components/dynamic-components/dynamic-table.vue
# Source/ProjectWeb/src/views/base/uiDefineVO.js
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export function getList(params,page, limit, url, method){ |
| | | if(method && method.toLowerCase() == 'post'){ |
| | | params.pageNum =page; |
| | | params.pageSize = limit; |
| | | return request({ |
| | | url: url, |
| | | method: method, |
| | | data:params |
| | | }); |
| | | }else { |
| | | return request({ |
| | | url: url, |
| | | method: method, |
| | | params: { |
| | | ...params, |
| | | pageNum:page, |
| | | pageSize:limit |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | export function getLazyList(params,url) { |
| | | return request({ |
| | | url: url, |
| | | method: 'get', |
| | | params: { |
| | | ...params |
| | | } |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export function getTree(params,url) { |
| | | return request({ |
| | | url: url, |
| | | method: 'get', |
| | | params: { |
| | | ...params |
| | | } |
| | | }); |
| | | } |
| | | |
| | | export function getLazyTree(params,url){ |
| | | return request({ |
| | | url: url, |
| | | method: 'get', |
| | | params: { |
| | | ...params |
| | | } |
| | | }); |
| | | } |
| | |
| | | paramVOS:{ |
| | | type:Object, |
| | | default: {} |
| | | } |
| | | }, |
| | | isShow: { |
| | | //æå¨åºåæ¯å¦å·²æ¾ç¤ºï¼é对tabåcollapse |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | }, |
| | | data() { |
| | | return {} |
| | |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | isShow: { |
| | | //æå¨åºåæ¯å¦å·²æ¾ç¤ºï¼é对tabåcollapse |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | <template> |
| | | <div class="UI-dynamic" :id="'UI-dynamic-'+areasName+componentVO.oid"> |
| | | |
| | | <el-input |
| | | placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤" |
| | | v-model="filterText"> |
| | | </el-input> |
| | | <el-tree |
| | | class="filter-tree" |
| | | show-checkbox |
| | | :data="data" |
| | | :props="defaultProps" |
| | | :filter-node-method="filterNode" |
| | | highlight-current |
| | | node-key="id" |
| | | ref="tree"> |
| | | </el-tree> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | paramVOS:{ |
| | | type:Object, |
| | | default: {} |
| | | }, |
| | | isShow: { |
| | | //æå¨åºåæ¯å¦å·²æ¾ç¤ºï¼é对tabåcollapse |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | }, |
| | | watch: { |
| | | filterText(val) { |
| | | this.$refs.tree.filter(val); |
| | | }, |
| | | isShow:{ |
| | | handler(newval) { |
| | | if(newval) { |
| | | console.log(this.$el.clientHeight)} |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data[this.defaultProps.label].indexOf(value) !== -1; |
| | | }, |
| | | initData(){ |
| | | this.data=[ |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "0C6A3624-4A90-45E1-BEB2-75384E542613", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2021-12-13 20:41:14.747", |
| | | "isfirstv": "1", |
| | | "folderoid": "", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "6053D009-934D-4528-A51D-69B63FC27BFF", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "å·¥èºææ¡£åº", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2021-12-13 20:41:14.747", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "9D1B7934-3502-4DAF-9A1A-BE1B019DE8BC", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "documentlib", |
| | | "isfirstr": "1", |
| | | "ts": "2021-12-13 20:41:14.747" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "0", |
| | | "leaf": true, |
| | | "oid": "0C6A3624-4A90-45E1-BEB2-75384E542613", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "å·¥èºææ¡£åº[documentlib]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "CFA35842-29E6-45D0-99B2-C7F19561E2F1", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2021-12-13 22:16:32.272", |
| | | "isfirstv": "1", |
| | | "folderoid": "", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "6A03D6E4-7028-4D38-8584-0424FC6C7D7F", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "å·¥èºç¥è¯åº", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2021-12-13 22:16:32.272", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "957C8F17-D0C3-424E-B520-C9533E969440", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "knowledgelib", |
| | | "isfirstr": "1", |
| | | "ts": "2021-12-13 22:16:32.272" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "1", |
| | | "leaf": true, |
| | | "oid": "CFA35842-29E6-45D0-99B2-C7F19561E2F1", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "å·¥èºç¥è¯åº[knowledgelib]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "8D2E9F26-06C9-454D-8F5E-D95FD9DEA867", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2021-12-13 22:16:58.87", |
| | | "isfirstv": "1", |
| | | "folderoid": "CFA35842-29E6-45D0-99B2-C7F19561E2F1", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "D1A22FC3-039E-49D6-B391-465BE17B3D46", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "å¸¸ç¨æ¯è¯", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-01-06 14:29:56.841", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "335A13B8-59F8-461D-A549-82543EF2B867", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "å¸¸ç¨æ¯è¯", |
| | | "isfirstr": "1", |
| | | "ts": "2022-01-06 14:29:56.841" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "2", |
| | | "leaf": true, |
| | | "oid": "8D2E9F26-06C9-454D-8F5E-D95FD9DEA867", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "å¸¸ç¨æ¯è¯[å¸¸ç¨æ¯è¯]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "1111222", |
| | | "oid": "C8072146-781B-41F1-81AF-48C493492D9B", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2021-12-13 22:19:43.066", |
| | | "isfirstv": "1", |
| | | "folderoid": "0C6A3624-4A90-45E1-BEB2-75384E542613", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "E9B07546-E2B1-487F-AF5C-BA36E7D562D0", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "å·¥èºè¯´æä¹¦", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2021-12-13 22:19:43.066", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "8466E055-685A-4E50-979F-8BE474FDEDBB", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "å·¥èºè¯´æä¹¦", |
| | | "isfirstr": "1", |
| | | "ts": "2021-12-13 22:19:43.066" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "3", |
| | | "leaf": true, |
| | | "oid": "C8072146-781B-41F1-81AF-48C493492D9B", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "å·¥èºè¯´æä¹¦[å·¥èºè¯´æä¹¦]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "222", |
| | | "oid": "59F14C83-1345-4A7D-8225-0B09DE61400B", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2021-12-13 22:42:24.901", |
| | | "isfirstv": "1", |
| | | "folderoid": "0C6A3624-4A90-45E1-BEB2-75384E542613", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "AF87EA19-5651-4920-8D73-4015962C082C", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "ææ¯æ»ç»", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2021-12-13 22:42:24.901", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "95AFAAD8-B9B5-44A2-BAE2-12FAB2643193", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "ææ¯æ»ç»", |
| | | "isfirstr": "1", |
| | | "ts": "2021-12-13 22:42:24.901" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "4", |
| | | "leaf": true, |
| | | "oid": "59F14C83-1345-4A7D-8225-0B09DE61400B", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "ææ¯æ»ç»[ææ¯æ»ç»]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "712FF8AC-48CC-45DB-A79C-7F783B4AD8B1", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2021-12-13 22:48:25.242", |
| | | "isfirstv": "1", |
| | | "folderoid": "", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "61F5E6E8-3062-4FD8-9B35-0885E6A7ED21", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "HJSJ1155", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2021-12-13 22:48:25.242", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "CC3E9E86-FE2F-474F-94D3-DFB2ABF233DD", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "ææ¯æä»¶", |
| | | "isfirstr": "1", |
| | | "ts": "2021-12-13 22:48:25.242" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "5", |
| | | "leaf": true, |
| | | "oid": "712FF8AC-48CC-45DB-A79C-7F783B4AD8B1", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "HJSJ1155[ææ¯æä»¶]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "1ADD9030-2F3E-4363-84B9-31F08C5C12AB", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "5611E481-157B-4799-914F-5938A5BC1FA9", |
| | | "creator": "1", |
| | | "createtime": "2021-12-13 22:48:45.055", |
| | | "isfirstv": "1", |
| | | "folderoid": "712FF8AC-48CC-45DB-A79C-7F783B4AD8B1", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "F5862E44-372B-4C46-96F6-AEFFE1B63B6D", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "ææ¯æä»¶", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2021-12-13 22:48:45.055", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "34A45F92-2DC3-481C-82F2-B2F916CEDE2C", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "ææ¯æä»¶", |
| | | "isfirstr": "1", |
| | | "ts": "2021-12-13 22:48:45.055" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "6", |
| | | "leaf": true, |
| | | "oid": "1ADD9030-2F3E-4363-84B9-31F08C5C12AB", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "ææ¯æä»¶[ææ¯æä»¶]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "87A6D912-FDCA-496B-AA4E-FBDE9858853B", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2021-12-09 13:53:26.939", |
| | | "isfirstv": "1", |
| | | "folderoid": "", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "69E38F00-01AE-4E2C-97DC-7C412C521959", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "èµæºåº", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2021-12-09 13:53:26.939", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "60AD4F1B-D2E6-4C68-BC16-0F4052737D92", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "resourcelib", |
| | | "isfirstr": "1", |
| | | "ts": "2021-12-09 13:53:26.939" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "7", |
| | | "leaf": true, |
| | | "oid": "87A6D912-FDCA-496B-AA4E-FBDE9858853B", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "èµæºåº[resourcelib]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "42B3DADB-5B19-478F-AE8F-C808151A9247", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2021-12-09 13:53:50.744", |
| | | "isfirstv": "1", |
| | | "folderoid": "87A6D912-FDCA-496B-AA4E-FBDE9858853B", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "CA316DAC-65D0-4D37-ACCE-CD61ABB9C267", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "å·¥ä½åå
", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2021-12-09 13:53:50.744", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "8FFF9F4E-9567-4830-9C4B-D3E882DBFCE1", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "workunit", |
| | | "isfirstr": "1", |
| | | "ts": "2021-12-09 13:53:50.744" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "8", |
| | | "leaf": true, |
| | | "oid": "42B3DADB-5B19-478F-AE8F-C808151A9247", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "å·¥ä½åå
[workunit]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "411E568F-AE64-4C64-9BC2-8E6E566DE06B", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2021-12-30 14:06:43.618", |
| | | "isfirstv": "1", |
| | | "folderoid": "87A6D912-FDCA-496B-AA4E-FBDE9858853B", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "459996CD-C952-47C8-A2CC-8E8A42179364", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "设å¤", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2021-12-30 14:06:43.618", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "E7FA6D19-62BE-4ED4-9D37-4312F34C1B48", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "machine", |
| | | "isfirstr": "1", |
| | | "ts": "2021-12-30 14:06:43.618" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "9", |
| | | "leaf": true, |
| | | "oid": "411E568F-AE64-4C64-9BC2-8E6E566DE06B", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "设å¤[machine]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "3B582AE0-9A60-4E52-9806-F8729ED5A4F0", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2021-12-30 14:07:20.736", |
| | | "isfirstv": "1", |
| | | "folderoid": "87A6D912-FDCA-496B-AA4E-FBDE9858853B", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "877DBFF6-A63A-435A-99FC-DF54540387BA", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "å·¥è£
", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2021-12-30 14:07:20.736", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "0E53FBDB-01DB-4B18-9A2D-30C30AC2E6BF", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "equipment", |
| | | "isfirstr": "1", |
| | | "ts": "2021-12-30 14:07:20.736" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "10", |
| | | "leaf": true, |
| | | "oid": "3B582AE0-9A60-4E52-9806-F8729ED5A4F0", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "å·¥è£
[equipment]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "CCE97F36-05A0-4419-BA6C-E766C8FB08EF", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-04-02 13:36:19.627", |
| | | "isfirstv": "1", |
| | | "folderoid": "CCCC5958-5BAA-49E3-AB76-AF728157C19C", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "4584960B-1EF3-44AA-BDE4-37628DB340CF", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "è¾
æ", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-04-02 13:36:19.627", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "B3716837-ADCC-4B58-88DF-20D19E8B0C99", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "AssMaterial", |
| | | "isfirstr": "1", |
| | | "ts": "2022-04-02 13:36:19.627" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "11", |
| | | "leaf": true, |
| | | "oid": "CCE97F36-05A0-4419-BA6C-E766C8FB08EF", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "è¾
æ[AssMaterial]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "7C886BC5-79F9-489D-9CB6-31522D877CEA", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-04-02 13:36:27.366", |
| | | "isfirstv": "1", |
| | | "folderoid": "CCCC5958-5BAA-49E3-AB76-AF728157C19C", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "FA544E83-29C9-4456-9ECD-3658BB5D675F", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "主æ", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-04-02 13:36:27.366", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "3333EA57-5F17-40DA-9790-E1FD59ED8EB1", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "material", |
| | | "isfirstr": "1", |
| | | "ts": "2022-04-02 13:36:27.366" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "12", |
| | | "leaf": true, |
| | | "oid": "7C886BC5-79F9-489D-9CB6-31522D877CEA", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "主æ[material]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "A10C10B6-9C85-4B03-AE65-EFBE4D3433A0", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-04-02 13:45:44.686", |
| | | "isfirstv": "1", |
| | | "folderoid": "", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "C4122548-1612-47BE-B5A8-7C858DB2AA97", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "CAXAå·¥èºåº", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-04-02 13:45:44.686", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "CFB4AD69-A78C-49F2-8BE8-32B2A8E62ADC", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "caxaprocesslib", |
| | | "isfirstr": "1", |
| | | "ts": "2022-04-02 13:45:44.686" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "13", |
| | | "leaf": true, |
| | | "oid": "A10C10B6-9C85-4B03-AE65-EFBE4D3433A0", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "CAXAå·¥èºåº[caxaprocesslib]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "A2872581-8E91-4BB2-A8B5-6D421655377D", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-06-23 11:01:31.408", |
| | | "isfirstv": "1", |
| | | "folderoid": "DAA0F5E3-9F02-4A92-8551-8C97C6EBEAA0", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "2598EB13-B27C-4B8B-9C8A-301EAA2D3BF1", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "2022", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-06-23 11:01:31.408", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "2BDF5977-83A3-455B-A132-16694A6C5902", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "year", |
| | | "isfirstr": "1", |
| | | "ts": "2022-06-23 11:01:31.408" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "14", |
| | | "leaf": true, |
| | | "oid": "A2872581-8E91-4BB2-A8B5-6D421655377D", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "2022[year]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "61E0061F-FFCE-4A33-B373-1A4B334FBF76", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2021-12-30 17:09:44.651", |
| | | "isfirstv": "1", |
| | | "folderoid": "", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "A9BC94BD-525D-42EF-9AEE-CB028BF01A8B", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "å¡ç模æ¿", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2021-12-30 17:09:44.651", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "F9A89BE9-44E9-42AD-B682-46C7BE220024", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "cardtemplate", |
| | | "isfirstr": "1", |
| | | "ts": "2021-12-30 17:09:44.651" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "15", |
| | | "leaf": true, |
| | | "oid": "61E0061F-FFCE-4A33-B373-1A4B334FBF76", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "å¡ç模æ¿[cardtemplate]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "BC88822E-6A5A-402F-BFFF-9B7749D9B786", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "favorite", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-03-08 10:33:31.143", |
| | | "isfirstv": "1", |
| | | "folderoid": "87A6D912-FDCA-496B-AA4E-FBDE9858853B", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "F4D86664-7F3B-4F89-B2B7-3A0D048C4CA2", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "æ¶è夹", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-03-08 10:33:31.143", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "BAFBAC43-E098-4E8A-8541-832AA1399A04", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "favorite", |
| | | "isfirstr": "1", |
| | | "ts": "2022-03-08 10:33:31.143" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "16", |
| | | "leaf": true, |
| | | "oid": "BC88822E-6A5A-402F-BFFF-9B7749D9B786", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "æ¶è夹[favorite]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "35E19F40-ADD7-4C80-8391-05ED0CB43C5E", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "favoriteimage", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-03-08 10:33:31.204", |
| | | "isfirstv": "1", |
| | | "folderoid": "BC88822E-6A5A-402F-BFFF-9B7749D9B786", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "10BBD523-4A84-4074-A76B-20E9DA38B1E6", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "å¾", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-03-08 10:33:31.204", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "69D3C8CC-9105-4EDF-8840-62A13E8D7A0B", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "favorite", |
| | | "isfirstr": "1", |
| | | "ts": "2022-03-08 10:33:31.204" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "17", |
| | | "leaf": true, |
| | | "oid": "35E19F40-ADD7-4C80-8391-05ED0CB43C5E", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "å¾[favorite]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "E5A8F0AD-5B7B-4F95-80CE-9F9B7FFE0138", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-06-21 11:08:58.156", |
| | | "isfirstv": "1", |
| | | "folderoid": "A0162414-1D57-43CD-995E-D497638ABB37", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "B2940B6C-1806-47D8-9C72-B87508CD71D1", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "2022", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-06-21 11:08:58.156", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "D77C7397-E9CF-49E0-B944-594C5BFAFA16", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "year", |
| | | "isfirstr": "1", |
| | | "ts": "2022-06-21 11:08:58.156" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "18", |
| | | "leaf": true, |
| | | "oid": "E5A8F0AD-5B7B-4F95-80CE-9F9B7FFE0138", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "2022[year]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "9A474856-C775-4819-9DDE-B54DCE496945", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-01-05 17:32:03.423", |
| | | "isfirstv": "1", |
| | | "folderoid": "87A6D912-FDCA-496B-AA4E-FBDE9858853B", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "9A49A0C6-8B63-45DB-8CD2-DD963C9C6DC4", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "å·¥å
·", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-01-05 17:32:03.423", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "F791C662-0D37-4EC1-A0EE-E783BCB293CA", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "tool", |
| | | "isfirstr": "1", |
| | | "ts": "2022-01-05 17:32:03.423" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "19", |
| | | "leaf": true, |
| | | "oid": "9A474856-C775-4819-9DDE-B54DCE496945", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "å·¥å
·[tool]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "4B47C04E-229F-4C7F-A4B3-CC9214231EF5", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-01-06 12:06:29.828", |
| | | "isfirstv": "1", |
| | | "folderoid": "CFA35842-29E6-45D0-99B2-C7F19561E2F1", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "F6AC2A03-504D-4C78-8F48-21B151F8C074", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "常ç¨ç¼©ç¥è¯", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-01-06 14:29:09.804", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "3E1202E9-17C7-4968-BE75-BB4C20414F9F", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "常ç¨ç¼©ç¥è¯", |
| | | "isfirstr": "1", |
| | | "ts": "2022-01-06 14:29:09.804" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "20", |
| | | "leaf": true, |
| | | "oid": "4B47C04E-229F-4C7F-A4B3-CC9214231EF5", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "常ç¨ç¼©ç¥è¯[常ç¨ç¼©ç¥è¯]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "64DDC985-FD7D-44A0-A564-4CA52797218B", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-01-06 12:06:39.949", |
| | | "isfirstv": "1", |
| | | "folderoid": "CFA35842-29E6-45D0-99B2-C7F19561E2F1", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "A66CC240-3BA6-4774-B10D-EB186A95CA07", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "常ç¨å·¥èºæ å", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-01-06 15:27:59.253", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "5E947EDA-1922-42F2-97D8-CA536A4043FE", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "常ç¨å·¥èºæ å", |
| | | "isfirstr": "1", |
| | | "ts": "2022-01-06 15:27:59.253" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "21", |
| | | "leaf": true, |
| | | "oid": "64DDC985-FD7D-44A0-A564-4CA52797218B", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "常ç¨å·¥èºæ å[常ç¨å·¥èºæ å]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "44B91E7B-E8B5-4790-B4E5-2897C75B7E6E", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-01-06 14:29:39.124", |
| | | "isfirstv": "1", |
| | | "folderoid": "CFA35842-29E6-45D0-99B2-C7F19561E2F1", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "04A16265-5504-4D7C-B947-6A12079E23F2", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "常ç¨å·¥åº", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-01-06 14:29:39.124", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "D6FAEABF-E842-43AE-B12F-9FC4CE8B863D", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "å·¥åºåç§°", |
| | | "isfirstr": "1", |
| | | "ts": "2022-01-06 14:29:39.124" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "22", |
| | | "leaf": true, |
| | | "oid": "44B91E7B-E8B5-4790-B4E5-2897C75B7E6E", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "常ç¨å·¥åº[å·¥åºåç§°]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "08143E46-E7F3-4F6C-950C-989749FEBCE5", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-01-06 14:32:48.245", |
| | | "isfirstv": "1", |
| | | "folderoid": "CFA35842-29E6-45D0-99B2-C7F19561E2F1", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "661ADE9B-D453-403B-B858-937DF8401038", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "常ç¨ç¬¦å·", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-01-06 14:32:48.245", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "8E055006-B25A-48D8-9CE8-C7A3FE41EC83", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "常ç¨ç¬¦å·", |
| | | "isfirstr": "1", |
| | | "ts": "2022-01-06 14:32:48.245" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "23", |
| | | "leaf": true, |
| | | "oid": "08143E46-E7F3-4F6C-950C-989749FEBCE5", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "常ç¨ç¬¦å·[常ç¨ç¬¦å·]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "8042DD6F-2CB9-41E7-AD9F-E5106B55DFEE", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-02-08 15:13:31.721", |
| | | "isfirstv": "1", |
| | | "folderoid": "", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "B777905C-97D4-4C74-9EF9-1CDD488C897B", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "é¨é¨åç±»", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-02-08 15:13:31.721", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "E6202A1A-82C2-4D88-8B70-D05D0DF799C6", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "departmentlib", |
| | | "isfirstr": "1", |
| | | "ts": "2022-02-08 15:13:31.721" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "24", |
| | | "leaf": true, |
| | | "oid": "8042DD6F-2CB9-41E7-AD9F-E5106B55DFEE", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "é¨é¨åç±»[departmentlib]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "F2833B29-EF5D-4D20-9CFB-7E6B6CDCB673", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-02-08 15:14:23.888", |
| | | "isfirstv": "1", |
| | | "folderoid": "7170DFF8-C1DE-04A8-46F0-BC4379980BC7", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "DB17F69D-11C4-48EA-8417-95602EE3EFA0", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "ä¸è½¦é´", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-02-08 15:14:23.888", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "3512BA1D-F688-443E-B55E-AF6699618B63", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "é¨é¨åç±»", |
| | | "isfirstr": "1", |
| | | "ts": "2022-02-08 15:14:23.888" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "25", |
| | | "leaf": true, |
| | | "oid": "F2833B29-EF5D-4D20-9CFB-7E6B6CDCB673", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "ä¸è½¦é´[é¨é¨åç±»]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "6515E8BF-B47B-47CA-8826-E2DD770D90B7", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-02-08 15:16:11.632", |
| | | "isfirstv": "1", |
| | | "folderoid": "7170DFF8-C1DE-04A8-46F0-BC4379980BC7", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "A0C294B4-42BF-4498-B172-345377F78D15", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "2022", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-02-08 15:16:11.632", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "D086B051-8F7E-40D9-925C-37DE39C2B9E0", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "é¨é¨åç±»", |
| | | "isfirstr": "1", |
| | | "ts": "2022-02-08 15:16:11.632" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "26", |
| | | "leaf": true, |
| | | "oid": "6515E8BF-B47B-47CA-8826-E2DD770D90B7", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "2022[é¨é¨åç±»]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "CCCC5958-5BAA-49E3-AB76-AF728157C19C", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-01-05 10:11:51.622", |
| | | "isfirstv": "1", |
| | | "folderoid": "", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "BE298E2C-DE36-40B8-8DA9-8523C3858745", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "ææåº", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-01-05 10:11:51.622", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "2DE9AADC-BACF-4ABE-B2D5-BBE6D85D2246", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "materiallib", |
| | | "isfirstr": "1", |
| | | "ts": "2022-01-05 10:11:51.622" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "27", |
| | | "leaf": true, |
| | | "oid": "CCCC5958-5BAA-49E3-AB76-AF728157C19C", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "ææåº[materiallib]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "658EA343-AC20-4AE3-B845-2A2610D3C267", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-04-12 10:19:29.043", |
| | | "isfirstv": "1", |
| | | "folderoid": "A10C10B6-9C85-4B03-AE65-EFBE4D3433A0", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "586316B0-E80F-456C-BA9A-B90379898F44", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "æºå ", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-04-12 10:19:29.043", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "96CC24F4-6F24-4F1C-A690-F50425942020", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "specialty", |
| | | "isfirstr": "1", |
| | | "ts": "2022-04-12 10:19:29.043" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "28", |
| | | "leaf": true, |
| | | "oid": "658EA343-AC20-4AE3-B845-2A2610D3C267", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "æºå [specialty]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "DAA0F5E3-9F02-4A92-8551-8C97C6EBEAA0", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-04-12 10:19:57.716", |
| | | "isfirstv": "1", |
| | | "folderoid": "A10C10B6-9C85-4B03-AE65-EFBE4D3433A0", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "FDD1952A-8D0F-4653-BD4D-D62224ED35C7", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "çµè£
", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-04-12 10:19:57.716", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "AAC2E304-1342-4308-BCF8-CA51D6D5ED44", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "specialty", |
| | | "isfirstr": "1", |
| | | "ts": "2022-04-12 10:19:57.716" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "29", |
| | | "leaf": true, |
| | | "oid": "DAA0F5E3-9F02-4A92-8551-8C97C6EBEAA0", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "çµè£
[specialty]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "A0162414-1D57-43CD-995E-D497638ABB37", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-04-12 10:19:47.716", |
| | | "isfirstv": "1", |
| | | "folderoid": "A10C10B6-9C85-4B03-AE65-EFBE4D3433A0", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "EDD708C6-29CC-4187-8988-A7DF33ABBB06", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "ä¸è½¦é´ï¼æºè£
ï¼", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-04-12 10:19:47.716", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "66654D96-EF40-4D27-92D6-B4AE5BA5ED02", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "specialty", |
| | | "isfirstr": "1", |
| | | "ts": "2022-04-12 10:19:47.716" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "30", |
| | | "leaf": true, |
| | | "oid": "A0162414-1D57-43CD-995E-D497638ABB37", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "ä¸è½¦é´ï¼æºè£
ï¼[specialty]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "C96EFAED-BC72-4248-B336-8D7B65132A3E", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-04-12 10:20:20.274", |
| | | "isfirstv": "1", |
| | | "folderoid": "658EA343-AC20-4AE3-B845-2A2610D3C267", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "6C808AB8-609D-4B73-94D2-C73D8B680333", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "1", |
| | | "versionrule": "0", |
| | | "name": "2022", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-04-12 10:20:20.274", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "5D01F523-7EE1-4876-AFB0-167FC9CE6265", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "year", |
| | | "isfirstr": "1", |
| | | "ts": "2022-04-12 10:20:20.274" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "31", |
| | | "leaf": true, |
| | | "oid": "C96EFAED-BC72-4248-B336-8D7B65132A3E", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "2022[year]" |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "lastmodifier": "1", |
| | | "revisionseq": "1", |
| | | "versionvalue": "", |
| | | "querycondition": "", |
| | | "description": "", |
| | | "oid": "F0B31119-0DC3-460A-9A47-A518993959BE", |
| | | "versionseq": "1", |
| | | "checkinby": "", |
| | | "revisionrule": "", |
| | | "lctid": "ObjectLC", |
| | | "lcstatus_text": "ç¼è¾ä¸", |
| | | "id": "favoritetable", |
| | | "owner": "1", |
| | | "checkoutby": "", |
| | | "workcontextoid": "", |
| | | "creator": "1", |
| | | "createtime": "2022-05-12 09:58:34.075", |
| | | "isfirstv": "1", |
| | | "folderoid": "BC88822E-6A5A-402F-BFFF-9B7749D9B786", |
| | | "lastmodifier_name": "æµè¯", |
| | | "revisionoid": "4C155EDE-9C04-468A-B7E1-E140B0DCD89E", |
| | | "btmname": "folder", |
| | | "checkouttime": "", |
| | | "revisionvalue": "-", |
| | | "sequence": "2", |
| | | "versionrule": "0", |
| | | "name": "表", |
| | | "islastr": "1", |
| | | "lastmodifytime": "2022-05-12 09:58:34.075", |
| | | "copyfromversion": "", |
| | | "creator_name": "æµè¯", |
| | | "nameoid": "736A53AA-9F32-4A2F-896B-FD35F094EF52", |
| | | "lcstatus": "Editing", |
| | | "secretgrade": "2", |
| | | "islastv": "1", |
| | | "checkintime": "", |
| | | "folderbusinesstype": "favorite", |
| | | "isfirstr": "1", |
| | | "ts": "2022-05-12 09:58:34.075" |
| | | }, |
| | | "checked": false, |
| | | "children": [], |
| | | "expanded": false, |
| | | "href": null, |
| | | "icon": null, |
| | | "iconCls": null, |
| | | "index": "32", |
| | | "leaf": true, |
| | | "oid": "F0B31119-0DC3-460A-9A47-A518993959BE", |
| | | "parentBtmName": null, |
| | | "parentId": "", |
| | | "parentName": null, |
| | | "showCheckbox": false, |
| | | "text": "表[favorite]" |
| | | } |
| | | ]; |
| | | } |
| | | }, |
| | | data() { |
| | | return {} |
| | | return { |
| | | filterText: '', |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'text' |
| | | }, |
| | | data:[] |
| | | } |
| | | }, |
| | | created() { |
| | | this.initData(); |
| | | }, |
| | | mounted() { |
| | | console.log(this.$el.clientHeight) |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | .filter-tree{ |
| | | height: calc(100% - 50px); |
| | | overflow: auto; |
| | | box-sizing: border-box; |
| | | padding-top: 10px; |
| | | } |
| | | </style> |
| | |
| | | :areasName="areasName" |
| | | :paramVOS="paramVOS" |
| | | :isShow="isShow"> |
| | | |
| | | sssss |
| | | </dynamic-tree> |
| | | <dynamic-custom v-else-if="componentVO.uiComponentType=='custom'" :inDialog="inDialog" |
| | | :key="areasName+'custom-'+componentVO.oid" |
| | |
| | | default: true |
| | | }, |
| | | }, |
| | | created() { |
| | | } |
| | | } |
| | | </script> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!--éç¨çåç±»çåç
§ï¼åªæ¯æ¾ç¤ºåç±»æ --> |
| | | <template> |
| | | <vciWebReferTree |
| | | :key="typeKey" |
| | | :data-key="typeKey" |
| | | :disabled="disabled" |
| | | :referConfig="rConfig" |
| | | :text="textD" |
| | | :title="titleD" |
| | | :value="valueD" |
| | | :width="width" |
| | | :height="height" |
| | | :reloadFormKey="reloadFormKey" |
| | | @setReferValue="setValue"> |
| | | </vciWebReferTree> |
| | | </template> |
| | | |
| | | <script> |
| | | import vciWebReferTree from "./vciWebReferTree.vue"; |
| | | import {verifyNull} from "@/util/validate"; |
| | | |
| | | export default { |
| | | name: "basicClassifyRefer", |
| | | props: { |
| | | referConfig: { |
| | | type: Object, |
| | | }, value: { |
| | | type: String, |
| | | default: '' |
| | | }, text: { |
| | | type: String, |
| | | default: '' |
| | | }, disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, url: { |
| | | type: String, |
| | | default: '' |
| | | }, typeKey: { |
| | | type: String, |
| | | default: '' |
| | | }, referType: { |
| | | type: String, |
| | | default:'' |
| | | }, width: { |
| | | type: String, |
| | | default:'70%' |
| | | }, height: { |
| | | type: String, |
| | | default:'60%' |
| | | }, |
| | | reloadFormKey: { |
| | | type: String, |
| | | default: '', |
| | | } |
| | | }, |
| | | components: {vciWebReferTree }, |
| | | data() { |
| | | return { |
| | | emitData: {}, |
| | | }; |
| | | }, |
| | | computed: { |
| | | rConfig() { |
| | | let rConfig = this.referConfig; |
| | | if (!rConfig.options) { |
| | | rConfig.options = {}; |
| | | } |
| | | rConfig.options.isMuti = rConfig.options.muti || rConfig.options.isMuti || false; |
| | | rConfig.options.url=this.referConfig.options.url; |
| | | return rConfig; |
| | | }, |
| | | titleD(){ |
| | | let title = this.referConfig.title || ""; |
| | | title = title.replace(":", ""); |
| | | title = title |
| | | ? "为ã" + title + "ãéåå¼" |
| | | : "为ã" + this.referConfig.showProp + "ãéåå¼"; |
| | | return title; |
| | | }, |
| | | textD(){ |
| | | return verifyNull(this.text) ? (this.referConfig.options.defalutText || '') : this.text; |
| | | }, |
| | | valueD(){ |
| | | return verifyNull(this.value) ? (this.referConfig.options.defalutValue || '') :this.value; |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | setValue(value) { |
| | | this.emitData = value; |
| | | } |
| | | }, |
| | | watch: { |
| | | // ä¿®æ¹åé¦å°ç¶ç»ä»¶ |
| | | emitData: { |
| | | deep: true, |
| | | handler(newV) { |
| | | this.$emit("setReferValue", newV); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div v-if="display"> |
| | | <vciWebReferTree |
| | | v-if="referType=='tree'" |
| | | :key="typeKey" |
| | | :data-key="typeKey" |
| | | :disabled="disabled" |
| | | :referConfig="rConfig" |
| | | :text="textD" |
| | | :title="titleD" |
| | | :value="valueD" |
| | | :width="width" |
| | | :height="height" |
| | | :reloadFormKey="reloadFormKey" |
| | | @setReferValue="setValue"> |
| | | </vciWebReferTree> |
| | | |
| | | <vciWebReferTable |
| | | v-else-if="referType=='grid'" |
| | | :key="typeKey" |
| | | :data-key="typeKey" |
| | | :disabled="disabled" |
| | | :referConfig="rConfig" |
| | | :referType="referType" |
| | | :text="textD" |
| | | :title="titleD" |
| | | :value="valueD" |
| | | :width="width" |
| | | :height="height" |
| | | :reloadFormKey="reloadFormKey" |
| | | @setReferValue="setValue"> |
| | | </vciWebReferTable> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import vciWebReferTable from "./vciWebReferTable.vue"; |
| | | import vciWebReferTree from "./vciWebReferTree.vue"; |
| | | import {verifyNull} from "@/util/validate"; |
| | | |
| | | export default { |
| | | name: "orgDeptRefer", |
| | | props: { |
| | | referConfig: { |
| | | type: Object, |
| | | }, value: { |
| | | type: String, |
| | | default: '' |
| | | }, text: { |
| | | type: String, |
| | | default: '' |
| | | }, disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, display: { |
| | | type: Boolean, |
| | | default: true |
| | | }, typeKey: { |
| | | type: String, |
| | | default: '' |
| | | }, referType: { |
| | | type: String, |
| | | default:'' |
| | | }, width: { |
| | | type: String, |
| | | default:'70%' |
| | | }, height: { |
| | | type: String, |
| | | default:'60%' |
| | | }, |
| | | reloadFormKey: { |
| | | type: String, |
| | | default: '', |
| | | } |
| | | }, |
| | | components: {vciWebReferTable,vciWebReferTree }, |
| | | data() { |
| | | return { |
| | | emitData: {}, |
| | | }; |
| | | }, |
| | | computed: { |
| | | rConfig() { |
| | | let rConfig = this.referConfig; |
| | | if (!rConfig.options) { |
| | | rConfig.options = {}; |
| | | } |
| | | rConfig.options.isMuti = rConfig.options.muti || rConfig.options.isMuti || false; |
| | | rConfig.options.url='/org/deptController/referGridHasChildren'; |
| | | if(this.referType=='grid'){ |
| | | rConfig.options.tableConfig={ |
| | | cols:[{ |
| | | prop: 'code', |
| | | label: 'ç¼å·', |
| | | sortable: true, |
| | | width: 150, |
| | | search: true |
| | | }, { |
| | | prop: 'name', |
| | | label: 'åç§°', |
| | | sortable: true, |
| | | width: 260, |
| | | search: true |
| | | }, { |
| | | prop: 'description', |
| | | label: 'æè¿°' |
| | | }] |
| | | }; |
| | | } |
| | | return rConfig; |
| | | }, |
| | | titleD(){ |
| | | let title = this.referConfig.title || ""; |
| | | title = title.replace(":", ""); |
| | | title = title |
| | | ? "为ã" + title + "ãéåå¼" |
| | | : "为ã" + this.referConfig.showProp + "ãéåå¼"; |
| | | return title; |
| | | }, |
| | | textD(){ |
| | | return verifyNull(this.text) ? (this.referConfig.options.defalutText || '') : this.text; |
| | | }, |
| | | valueD(){ |
| | | return verifyNull(this.value) ? (this.referConfig.options.defalutValue || '') :this.value; |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | setValue(value) { |
| | | this.emitData = value; |
| | | } |
| | | }, |
| | | watch: { |
| | | // ä¿®æ¹åé¦å°ç¶ç»ä»¶ |
| | | emitData: { |
| | | deep: true, |
| | | handler(newV) { |
| | | this.$emit("setReferValue", newV); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div v-if="display"> |
| | | <vciWebReferClassify |
| | | :key="typeKey" :data-key="typeKey" |
| | | :disabled="disabled" |
| | | :referConfig="rConfig" |
| | | :referType="referType" |
| | | :text="textD" |
| | | :title="titleD" |
| | | :value="valueD" |
| | | :width="width" |
| | | :height="height" |
| | | :reloadFormKey="reloadFormKey" |
| | | @setReferValue="setValue"> |
| | | </vciWebReferClassify> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import vciWebReferClassify from "./vciWebReferClassify.vue"; |
| | | import {verifyNull} from "@/util/validate"; |
| | | |
| | | export default { |
| | | name: "orgUserRefer", |
| | | props: { |
| | | referConfig: { |
| | | type: Object, |
| | | }, value: { |
| | | type: String, |
| | | default: '' |
| | | }, text: { |
| | | type: String, |
| | | default: '' |
| | | }, disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, display: { |
| | | type: Boolean, |
| | | default: true |
| | | }, typeKey: { |
| | | type: String, |
| | | default: '' |
| | | }, referType: { |
| | | type: String, |
| | | default:'' |
| | | }, width: { |
| | | type: String, |
| | | default:'70%' |
| | | }, height: { |
| | | type: String, |
| | | default:'60%' |
| | | }, |
| | | reloadFormKey: { |
| | | type: String, |
| | | default: '', |
| | | } |
| | | }, |
| | | components: {vciWebReferClassify }, |
| | | data() { |
| | | return { |
| | | emitData: {}, |
| | | }; |
| | | }, |
| | | computed: { |
| | | rConfig() { |
| | | let rConfig = this.referConfig; |
| | | if (!rConfig.options) { |
| | | rConfig.options = {}; |
| | | } |
| | | rConfig.options.isMuti = rConfig.options.muti || rConfig.options.isMuti || false; |
| | | rConfig.options.url='/org/userQueryController/referGrid'; |
| | | rConfig.options.width=this.referConfig.options.width || '80%'; |
| | | rConfig.options.tableConfig={ |
| | | cols:[{ |
| | | prop: 'code', |
| | | label: 'ç¨æ·å', |
| | | sortable: true, |
| | | width: 150, |
| | | search: true |
| | | },{ |
| | | prop: 'name', |
| | | label: 'å§å', |
| | | sortable: true, |
| | | width: 150, |
| | | search: true |
| | | }, { |
| | | prop: 'deptIdName', |
| | | label: 'æå±é¨é¨', |
| | | width: 260, |
| | | }, { |
| | | prop: 'sexText', |
| | | label: 'æ§å«', |
| | | width: 80 |
| | | }] |
| | | }; |
| | | rConfig.options.classifys=[{ |
| | | title:'é¨é¨', |
| | | treeUrl:'/org/deptController/referGrid', //åç±»çè·¯å¾ |
| | | queryByClassifyUrl:'/permission/userQueryController/listUserByDeptId', //'å表' |
| | | queryField:'deptId', //åè¡¨æ°æ®ä¸åç±»çåæ®µ |
| | | classifyValueField:'id', //仿 ä¸è·åçåæ®µ |
| | | },{ |
| | | title:'è§è²', |
| | | treeUrl:'/permission/roleController/referGrid', //åç±»çè·¯å¾ |
| | | queryByClassifyUrl:'/permission/userQueryController/listUserByRoleId', //'å表' |
| | | queryField:'roleId', //åè¡¨æ°æ®ä¸åç±»çåæ®µ |
| | | classifyValueField:'id', //仿 ä¸è·åçåæ®µ |
| | | }]; |
| | | rConfig.options.onlyTable=false; |
| | | return rConfig; |
| | | }, |
| | | titleD(){ |
| | | let title = this.referConfig.title || ""; |
| | | title = title.replace(":", ""); |
| | | title = title |
| | | ? "为ã" + title + "ãéåå¼" |
| | | : "为ã" + this.referConfig.showProp + "ãéåå¼"; |
| | | return title; |
| | | }, |
| | | textD(){ |
| | | return verifyNull(this.text) ? (this.referConfig.options.defalutText || '') : this.text; |
| | | }, |
| | | valueD(){ |
| | | return verifyNull(this.value) ? (this.referConfig.options.defalutValue || '') :this.value; |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | setValue(value) { |
| | | this.emitData = value; |
| | | } |
| | | }, |
| | | watch: { |
| | | // ä¿®æ¹åé¦å°ç¶ç»ä»¶ |
| | | emitData: { |
| | | deep: true, |
| | | handler(newV) { |
| | | this.$emit("setReferValue", newV); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div v-if="display"> |
| | | <orgDeptRefer |
| | | v-if="refertype == 'dept' || refertype == 'deptGrid'" |
| | | :refer-type="referConfig.options.type == 'dept' ? 'tree' : 'grid'" |
| | | :key="typeKey" |
| | | ref="orgDeptRefer" |
| | | :data-key="typeKey" |
| | | :type-key="typeKey" |
| | | :disabled="disabled" |
| | | :referConfig="rConfig" |
| | | :text="textD" |
| | | :title="title" |
| | | :value="valueD" |
| | | :width="width" |
| | | :height="height" |
| | | :reloadFormKey="reloadFormKey" |
| | | @setReferValue="setValue" |
| | | > |
| | | </orgDeptRefer> |
| | | <basicClassifyRefer |
| | | v-else-if="refertype == 'basicClassify'" |
| | | :key="typeKey" |
| | | ref="basicClassifyRefer" |
| | | :data-key="typeKey" |
| | | :type-key="typeKey" |
| | | :disabled="disabled" |
| | | :referConfig="rConfig" |
| | | :text="textD" |
| | | :title="title" |
| | | :value="valueD" |
| | | :width="width" |
| | | :height="height" |
| | | :reloadFormKey="reloadFormKey" |
| | | @setReferValue="setValue" |
| | | > |
| | | </basicClassifyRefer> |
| | | <orgUserRefer |
| | | v-else-if="refertype == 'user'" |
| | | :refer-type="'grid'" |
| | | :key="typeKey" |
| | | ref="orgUserRefer" |
| | | :data-key="typeKey" |
| | | :type-key="typeKey" |
| | | :disabled="disabled" |
| | | :referConfig="rConfig" |
| | | :text="textD" |
| | | :title="title" |
| | | :value="valueD" |
| | | :width="width" |
| | | :height="height" |
| | | :reloadFormKey="reloadFormKey" |
| | | @setReferValue="setValue" |
| | | > |
| | | </orgUserRefer> |
| | | |
| | | <vciWebReferTree |
| | | v-else-if="refertype == 'tree'" |
| | | :key="typeKey" |
| | | ref="vciWebReferTree" |
| | | :data-key="typeKey" |
| | | :disabled="disabled" |
| | | :referConfig="rConfig" |
| | | :text="textD" |
| | | :title="title" |
| | | :value="valueD" |
| | | :width="width" |
| | | :height="height" |
| | | :reloadFormKey="reloadFormKey" |
| | | @setReferValue="setValue" |
| | | > |
| | | </vciWebReferTree> |
| | | |
| | | <vciWebReferTable |
| | | v-else-if="refertype == 'grid'" |
| | | :key="typeKey" |
| | | :data-key="typeKey" |
| | | :disabled="disabled" |
| | | :referConfig="rConfig" |
| | | :referType="referType" |
| | | :text="textD" |
| | | :title="title" |
| | | :value="valueD" |
| | | :width="width" |
| | | :height="height" |
| | | :reloadFormKey="reloadFormKey" |
| | | @setReferValue="setValue" |
| | | > |
| | | </vciWebReferTable> |
| | | |
| | | <vciWebReferClassify |
| | | v-else-if="refertype=='classify'" |
| | | :key="typeKey" :data-key="typeKey" |
| | | :disabled="disabled" |
| | | :referConfig="rConfig" |
| | | :referType="referType" |
| | | :text="textD" |
| | | :title="title" |
| | | :value="valueD" |
| | | :width="width" |
| | | :height="height" |
| | | :reloadFormKey="reloadFormKey" |
| | | @setReferValue="setValue"> |
| | | </vciWebReferClassify> |
| | | |
| | | <vciWebReferDefalut |
| | | v-else |
| | | :key="typeKey" |
| | | :data-key="typeKey" |
| | | :disabled="disabled" |
| | | :referConfig="rConfig" |
| | | :referType="referType" |
| | | :text="textD" |
| | | :title="title" |
| | | :value="valueD" |
| | | :width="width" |
| | | :height="height" |
| | | :reloadFormKey="reloadFormKey" |
| | | @setReferValue="setValue" |
| | | > |
| | | </vciWebReferDefalut> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import vciWebReferTree from "./vciWebReferTree.vue"; |
| | | import vciWebReferTable from "./vciWebReferTable.vue"; |
| | | import vciWebReferDefalut from "./vciWebReferDefalut.vue"; |
| | | import vciWebReferClassify from "./vciWebReferClassify.vue"; |
| | | import orgDeptRefer from "./orgDeptRefer.vue"; |
| | | import orgUserRefer from "./orgUserRefer.vue"; |
| | | import basicClassifyRefer from "./BasicClassifyRefer.vue"; |
| | | import {verifyNull,verifyNotNull} from "@/util/validate"; |
| | | |
| | | export default { |
| | | name: "vciWebRefer", |
| | | props: { |
| | | referConfig: { |
| | | type: Object, |
| | | }, |
| | | value: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | text: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | display: { |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | typeKey: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | referType: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | reloadFormKey: { |
| | | type: String, |
| | | default: '', |
| | | } |
| | | }, |
| | | components: { |
| | | vciWebReferTree, |
| | | vciWebReferTable, |
| | | vciWebReferDefalut, |
| | | vciWebReferClassify, |
| | | orgDeptRefer, |
| | | orgUserRefer, |
| | | basicClassifyRefer, |
| | | }, |
| | | data() { |
| | | return { |
| | | refertype: this.referConfig.options.type, |
| | | emitData: {}, |
| | | width:this.referConfig.options.width || '900px', |
| | | height:this.referConfig.options.height || '600px' |
| | | }; |
| | | }, |
| | | computed: { |
| | | rConfig() { |
| | | let rConfig = this.referConfig; |
| | | if (!rConfig.options) { |
| | | rConfig.options = {}; |
| | | } |
| | | rConfig.options.isMuti = |
| | | rConfig.options.muti || rConfig.options.isMuti || false; |
| | | return rConfig; |
| | | }, |
| | | title(){ |
| | | let title = this.referConfig.title || ""; |
| | | title = title.replace(":", ""); |
| | | title = title |
| | | ? "为ã" + title + "ãéåå¼" |
| | | : "为ã" + this.referConfig.showProp + "ãéåå¼"; |
| | | return title; |
| | | }, |
| | | textD(){ |
| | | if(verifyNull(this.text)){ |
| | | return (this.referConfig.options.defalutText || ''); |
| | | }else{ |
| | | return this.text; |
| | | } |
| | | }, |
| | | valueD(){ |
| | | if(verifyNull(this.value)){ |
| | | if(verifyNotNull( this.referConfig.options.defalutValue)){ |
| | | this.setValue({ |
| | | prop: this.referConfig.prop, |
| | | showProp: this.referConfig.showProp, |
| | | value: this.referConfig.options.defalutValue || '', |
| | | text: this.referConfig.options.defalutText || '', |
| | | isTreeMuti: this.isMuti, |
| | | rawData: [], |
| | | propMap: [] |
| | | }); |
| | | } |
| | | |
| | | return (this.referConfig.options.defalutValue || ''); |
| | | }else{ |
| | | return this.value; |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | setValue(value) { |
| | | this.emitData = value; |
| | | }, |
| | | }, |
| | | watch: { |
| | | // ä¿®æ¹åé¦å°ç¶ç»ä»¶ |
| | | emitData: { |
| | | deep: true, |
| | | immediate:true, |
| | | handler(newV) { |
| | | this.$emit("setReferValue", newV); |
| | | }, |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped></style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!--åç±»åç
§ï¼å·¦æ å³å表--> |
| | | <template> |
| | | <div> |
| | | <el-dialog |
| | | v-dialogDrag |
| | | :height="options.height || '70vh'" |
| | | :title="title" |
| | | :visible.sync="visible" |
| | | :width="onlyTable?'60%': '80%'" |
| | | :append-to-body="true" |
| | | class="avue-dialog avue-dialog--top" |
| | | @close="dialogClose" |
| | | > |
| | | <el-container> |
| | | <el-aside width="300px" v-if="!onlyTable && classifys.length>0"> |
| | | <el-tabs type="border-card" style="height: 100%" @tab-click="tabClick" |
| | | v-model="tabName"> |
| | | <el-tab-pane |
| | | v-for="(treeItem, index) in classifys" |
| | | :key="index" |
| | | :label="treeItem.title" |
| | | :name="'tab'+index" |
| | | > |
| | | <el-input placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤" v-model="filterText"> |
| | | </el-input> |
| | | |
| | | <el-tree |
| | | class="filter-tree" |
| | | :data="treeItem.treeData" |
| | | :lazy="lazy" |
| | | :load="treeLoad" |
| | | :props="treeProps" |
| | | :filter-node-method="filterNode" |
| | | @node-click="nodeClick" |
| | | :ref="'tree'+index" |
| | | > |
| | | </el-tree> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-aside> |
| | | <el-main style="padding: 0 0 0 20px"> |
| | | <avue-crud |
| | | ref="referCrud" |
| | | v-model="formValue" |
| | | :data="data" |
| | | :option="option" |
| | | :page.sync="page" |
| | | :table-loading="loading" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @row-click="rowClick" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <template slot="icon" slot-scope="scope"> |
| | | <i :class="scope.row.icon" style="font-size: 24px"></i> |
| | | </template> |
| | | </avue-crud> |
| | | </el-main> |
| | | </el-container> |
| | | <div class="avue-dialog__footer"> |
| | | <div class="avue-dialog__footer--left valueInfo">{{ valueInfo }}</div> |
| | | <el-button @click="escHandler">å æ¶</el-button> |
| | | <el-button @click="clearValue">æ¸
空</el-button> |
| | | <el-button type="primary" @click="setValue">ç¡® å®</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <el-input v-if="options.edit" class="w100" :clearable="true" v-model="textD" :disabled="disabled" :placeholder="placeholder" type="text" @change="changeValue" @clear="clearValue"> |
| | | <i slot="suffix" class="el-input__icon el-icon-search" style="cursor: pointer" @click="handleFocus"></i> |
| | | </el-input> |
| | | <el-input v-else class="w100" :clearable="true" v-model="textD" :disabled="disabled" :placeholder="placeholder" :readonly="true" type="text" |
| | | @focus="handleFocus" @clear="clearValue"></el-input> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { verifyNull } from "@/util/validate"; |
| | | import { getTree, getLazyTree } from "@/api/refer/tree"; |
| | | import { getList } from "@/api/refer/table"; |
| | | |
| | | export default { |
| | | name: "vciWebReferClassify", |
| | | props: { |
| | | referConfig: { |
| | | type: Object, |
| | | }, |
| | | value: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | text: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | referType: { |
| | | type: String, |
| | | default: "", |
| | | }, width: { |
| | | type: String, |
| | | default:'70%' |
| | | }, height: { |
| | | type: String, |
| | | default:'60%' |
| | | }, |
| | | reloadFormKey: { |
| | | type: String, |
| | | default: '', |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | reloadData:this.referConfig.options.reloadData || false, |
| | | visible: false, |
| | | options: this.referConfig.options || {}, |
| | | onlyTable: this.referConfig.options.onlyTable || false, |
| | | textD: this.text || '', |
| | | valueD: this.value || '', |
| | | formValue:{}, |
| | | classifys:[], |
| | | isMuti: |
| | | "true" == this.referConfig.options.isMuti || |
| | | this.referConfig.options.isMuti == true || |
| | | this.referConfig.options.muti == true |
| | | ? true |
| | | : false, |
| | | treeProps: { |
| | | label: "label", |
| | | value: "value", |
| | | children: "children", |
| | | }, |
| | | props: { |
| | | value: this.referConfig.valueField || this.referConfig.options.valueField || 'id', |
| | | label: this.referConfig.textField || this.referConfig.options.textField || "name" |
| | | }, |
| | | tabName:'tab0', |
| | | currentTreeIndex: 0, |
| | | filterText:'', |
| | | currentNode: {}, |
| | | params: {}, |
| | | lazy: this.referConfig.options.loadType == 'node', |
| | | loadType: { all: "all", node: "node" }, |
| | | url: this.referConfig.options.url || "referGrid", |
| | | query: {}, |
| | | loading: false, |
| | | page: { |
| | | layout: "sizes,prev,pager,next,jumper,total", |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: this.referConfig.options.data |
| | | ? this.referConfig.options.data.length |
| | | : 0, |
| | | }, |
| | | data: this.referConfig.options.data || [], |
| | | selectionList: [], |
| | | option: { |
| | | addBtn: false, |
| | | columnBtn: false, |
| | | calcHeight: 30, |
| | | tip: false, |
| | | menu: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | searchLabelWidth: 90, |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | | reserveSelection: true, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | rowKey: "id", |
| | | rowParentKey: "parentId", |
| | | column: [], |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | | this.options.classifys.forEach(item => { |
| | | return { |
| | | ...item, |
| | | filterText: "1", |
| | | treeData:item.treeData || [] |
| | | }; |
| | | }); |
| | | this.classifys =this.options.classifys; |
| | | |
| | | this.formValue[this.props.value]=this.valueD; |
| | | this.formValue[this.props.label]=this.textD; |
| | | this.getParams(); |
| | | }, |
| | | mounted() { |
| | | this.classifys.forEach((item,index) => { |
| | | this.getTree(index); |
| | | }); |
| | | if ( |
| | | this.referConfig.options.tableConfig && |
| | | this.referConfig.options.tableConfig.page |
| | | ) { |
| | | this.page.pageSize = |
| | | this.referConfig.options.tableConfig.page.limit || |
| | | this.referConfig.options.tableConfig.page.pageSize; |
| | | this.page.currentPage = |
| | | this.referConfig.options.tableConfig.page.page || |
| | | this.referConfig.options.tableConfig.page.currentPage; |
| | | } else if (!verifyNull(this.referConfig.options.limit)) { |
| | | this.page.pageSize = this.referConfig.options.limit; |
| | | } else if ( |
| | | this.referConfig.options.tableConfig && |
| | | !verifyNull(this.referConfig.options.tableConfig.limit) |
| | | ) { |
| | | this.page.pageSize = this.referConfig.options.tableConfig.limit; |
| | | } |
| | | this.$nextTick(() => { |
| | | if (this.visible) { |
| | | this.$refs.referCrud.doLayout(); |
| | | } |
| | | }); |
| | | }, |
| | | watch: { |
| | | text:{ |
| | | handler(val) { |
| | | this.textD=val; |
| | | } |
| | | }, |
| | | value:{ |
| | | handler(val) { |
| | | this.valueD=val; |
| | | } |
| | | }, |
| | | filterText(val) { |
| | | this.classifys[this.currentTreeIndex].filterText=val; |
| | | this.$refs['tree'+this.currentTreeIndex][0].filter(val); |
| | | }, |
| | | reloadFormKey:{ |
| | | handler(val) { |
| | | if(val != this.params[(this.options.paramForFormKey ? this.options.paramForFormKey : this.options.useFormKey)]){ |
| | | this.params[(this.options.paramForFormKey ? this.options.paramForFormKey : this.options.useFormKey)] = val; |
| | | this.clearValue(); |
| | | this.onLoad(this.page); |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | valueInfo: function () { |
| | | return this.text ? "已设置çå¼ä¸º[" + this.text + "]" : "æªè®¾ç½®å¼"; |
| | | }, |
| | | placeholder: function () { |
| | | return this.options.placeholder ? this.options.placeholder : this.title; |
| | | } |
| | | }, |
| | | methods: { |
| | | escHandler() { |
| | | this.visible = false; |
| | | this.$refs.referCrud.refreshTable(); |
| | | }, |
| | | dialogClose() { |
| | | this.visible = false; |
| | | this.$refs.referCrud.refreshTable(); |
| | | }, |
| | | tabClick:function (tab){ |
| | | this.currentTreeIndex= tab.index; |
| | | this.filterText=this.classifys[tab.index].filterText; |
| | | }, |
| | | handleFocus() { |
| | | if (!this.disabled) { |
| | | this.visible = true; |
| | | } |
| | | }, |
| | | getTreeParams: function (treeIndex) { |
| | | var queryParams = {}; |
| | | if (this.classifys[treeIndex].treeParams) { |
| | | queryParams = this.classifys[treeIndex].treeParams; |
| | | } |
| | | queryParams["referBusCode"] = this.classifys[treeIndex]["referBusCode"]; |
| | | /*if (this.classifys[treeIndex].useFormKey && this.options.formValues) { |
| | | //使ç¨è¡¨åä¸çåæ®µæ¥è¿æ»¤ |
| | | queryParams[this.options.paramForFormKey ? this.options.paramForFormKey : this.options.useFormKey] = this.options.formValues[this.options.useFormKey]; |
| | | }*/ |
| | | if (this.classifys[treeIndex].rootParams) { |
| | | for (let key in this.classifys[treeIndex].rootParams) { |
| | | queryParams[key] = this.classifys[treeIndex].rootParams[key]; |
| | | } |
| | | } |
| | | this.classifys[treeIndex].treeParams = queryParams; |
| | | }, |
| | | getParams: function () { |
| | | var queryParams = {}; |
| | | if (this.options.extraParams) { |
| | | queryParams = this.options.extraParams; |
| | | } |
| | | if (this.options.useFormKey && this.options.formValues) { |
| | | //使ç¨è¡¨åä¸çåæ®µæ¥è¿æ»¤ |
| | | queryParams[ (this.options.paramForFormKey ? this.options.paramForFormKey : this.options.useFormKey)] = this.options.formValues[this.options.useFormKey]; |
| | | } |
| | | queryParams['referBusCode'] = this.options['referBusCode']; |
| | | var tableConfig = this.options.tableConfig; |
| | | if (!tableConfig) { |
| | | this.$message.error('没æå®ä¹åç
§çè¡¨æ ¼é
ç½®'); |
| | | } |
| | | if (this.options.tableConfig && this.options.tableConfig.cols && this.options.tableConfig.cols.length > 0) { |
| | | //说æä¼ éäºç |
| | | this.option.column = this.options.tableConfig.cols.map(item => { |
| | | let formatter = item.formatter; |
| | | if (typeof formatter == "string" && formatter != '') { |
| | | formatter = eval("(" + formatter + ")"); |
| | | } |
| | | return { |
| | | ...item, |
| | | formatter: formatter |
| | | }; |
| | | }); |
| | | } |
| | | this.params = queryParams; |
| | | }, |
| | | changeValue(val){ |
| | | if(this.options.edit){ |
| | | let mapFields = this.referConfig.propMap || {}; |
| | | try { |
| | | if (this.options.propMap) { |
| | | mapFields = Object.assign(mapFields,this.options.propMap); |
| | | } |
| | | if (this.options.mapProps) { |
| | | mapFields = Object.assign(mapFields,this.options.mapProps); |
| | | } |
| | | } catch (e) { |
| | | ; |
| | | } |
| | | this.$emit("setReferValue", { |
| | | prop: this.referConfig.prop, |
| | | showProp: this.referConfig.showProp, |
| | | value: '', |
| | | text: val, |
| | | rawData: [], |
| | | propMap: mapFields |
| | | }); |
| | | } |
| | | }, |
| | | clearValue(){ |
| | | this.valueD = ''; |
| | | this.textD = ''; |
| | | let mapFields = this.referConfig.propMap || {}; |
| | | try { |
| | | if (this.options.propMap) { |
| | | mapFields = Object.assign(mapFields,this.options.propMap); |
| | | } |
| | | if (this.options.mapProps) { |
| | | mapFields = Object.assign(mapFields,this.options.mapProps); |
| | | } |
| | | } catch (e) { |
| | | ; |
| | | } |
| | | this.$emit("setReferValue", { |
| | | prop: this.referConfig.prop, |
| | | showProp: this.referConfig.showProp, |
| | | value: this.valueD, |
| | | text: this.textD, |
| | | rawData: [], |
| | | propMap: mapFields |
| | | }); |
| | | this.visible = false; |
| | | }, |
| | | setValue() { |
| | | if (this.selectionList.length == 0) { |
| | | this.$message.warning('没æéæ©æ°æ®'); |
| | | return false; |
| | | } else if (this.selectionList.length > 1 && !this.isMuti) { |
| | | this.$message.warning('æ¯æ¬¡åªè½éæ©ä¸æ¡æ°æ®'); |
| | | return false; |
| | | } |
| | | |
| | | let value = []; |
| | | let text = []; |
| | | let isMutiValue = (this.props.value.indexOf(",") > -1); |
| | | let isMutiRaw = (this.props.label.indexOf(",") > -1); |
| | | var _that = this; |
| | | this.selectionList.forEach((item) => { |
| | | if (isMutiValue) { |
| | | var valueFieldArray = _that.props.value.split(","); |
| | | valueFieldArray.forEach((_itemField) => { |
| | | let itemValue = item[_itemField]; |
| | | if (verifyNull(itemValue) && item['extendData']) { |
| | | itemValue = item['extendData'][_itemField]; |
| | | } |
| | | value.push(itemValue + (_that.referConfig.valueSep ? _that.referConfig.valueSep : ' ')); |
| | | }); |
| | | } else { |
| | | let itemValue = item[_that.props.value]; |
| | | if (verifyNull(itemValue) && item['extendData']) { |
| | | itemValue = item['extendData'][_that.props.value]; |
| | | } |
| | | value.push(itemValue); |
| | | } |
| | | if (isMutiRaw) { |
| | | var rawFieldArray = _that.props.label.split(","); |
| | | rawFieldArray.forEach((_itemField) => { |
| | | let itemText = item[_itemField]; |
| | | if (verifyNull(itemText) && item['extendData']) { |
| | | itemText = item['extendData'][_itemField]; |
| | | } |
| | | text.push(itemText + (_that.referConfig.textSep ? _that.referConfig.textSep : ' ')); |
| | | }); |
| | | } else { |
| | | let itemText = item[_that.props.label]; |
| | | if (verifyNull(itemText) && item['extendData']) { |
| | | itemText = item['extendData'][_that.props.label]; |
| | | } |
| | | text.push(itemText); |
| | | } |
| | | }); |
| | | let mapFields = this.referConfig.propMap || {}; |
| | | try { |
| | | if (this.options.propMap) { |
| | | mapFields = Object.assign(mapFields,this.options.propMap); |
| | | } |
| | | if (this.options.mapProps) { |
| | | mapFields = Object.assign(mapFields,this.options.mapProps); |
| | | } |
| | | } catch (e) { |
| | | ; |
| | | } |
| | | this.valueD = value.join(','); |
| | | this.textD = text.join(','); |
| | | this.$emit("setReferValue", { |
| | | prop: this.referConfig.prop, |
| | | showProp: this.referConfig.showProp, |
| | | value: this.valueD, |
| | | text: this.textD, |
| | | rawData: this.selectionList, |
| | | propMap: mapFields |
| | | }); |
| | | this.visible = false; |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page); |
| | | done(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | rowClick(row) { |
| | | this.$refs.referCrud.toggleSelection(); |
| | | this.$refs.referCrud.toggleRowSelection(row); //éä¸å½åè¡ |
| | | this.selectionList = [row]; |
| | | }, |
| | | selectionChange(list) { |
| | | if (!this.isMuti && list.length > 1) { |
| | | const nowVal = list.shift(); |
| | | this.$refs.referCrud.toggleRowSelection(nowVal, false); |
| | | } |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.referCrud.toggleSelection(); |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | if (this.url) { |
| | | this.loading = true; |
| | | getList( |
| | | Object.assign(params, this.params, this.query), |
| | | page.currentPage, |
| | | page.pageSize, |
| | | this.url |
| | | ) |
| | | .then((res) => { |
| | | let data = []; |
| | | if (res.data && res.data.data) { |
| | | data = res.data.data; |
| | | this.page.total = res.data.total; |
| | | } else { |
| | | data = res.data; |
| | | this.page.total = res.total; |
| | | } |
| | | if(!data || data == null){ |
| | | data = []; |
| | | } |
| | | this.data = data; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }) |
| | | .catch((error) => { |
| | | this.$message.error(error); |
| | | this.loading = false; |
| | | }); |
| | | } |
| | | }, |
| | | getTree(treeIndex) { |
| | | this.getTreeParams(treeIndex); |
| | | //å è½½å
¨é¨ |
| | | getTree(this.classifys[treeIndex].treeParams, this.classifys[treeIndex].treeUrl).then((res) => { |
| | | this.classifys[treeIndex].treeData = this.initTreeData(res.data); |
| | | }); |
| | | }, |
| | | treeLoad: function (treeNode, resolve) { |
| | | //é级å è½½ |
| | | const parentId = treeNode.level === 0 ? 0 : treeNode.data.attributes.id; |
| | | this.classifys[this.currentTreeIndex].treeParams.parentId = parentId; |
| | | this.classifys[this.currentTreeIndex].treeParams.parentValue = parentId; |
| | | |
| | | if (this.options.rootParams && treeNode.level !== 0) { |
| | | for (var key in this.options.rootParams) { |
| | | delete this.classifys[this.currentTreeIndex].treeParams[key]; |
| | | } |
| | | } |
| | | getLazyTree(this.classifys[this.currentTreeIndex].treeParams, this.classifys[this.currentTreeIndex].treeUrl).then((res) => { |
| | | resolve(this.initTreeData(res.data)); |
| | | }); |
| | | }, |
| | | initTreeData: function (nodes) { |
| | | let treeData = []; |
| | | nodes.forEach((item) => { |
| | | let children = item.children; |
| | | if (children) { |
| | | children = this.initTreeData(children); |
| | | } |
| | | treeData.push({ |
| | | label: item[this.props.label], |
| | | value: item[this.props.value], |
| | | leaf: !item.children, |
| | | children: children, |
| | | attributes: item, |
| | | }); |
| | | }); |
| | | return treeData; |
| | | }, |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.label.indexOf(value) !== -1; |
| | | }, |
| | | nodeClick(data) { |
| | | let where = {}; |
| | | let classifyValueField = this.classifys[this.currentTreeIndex].classifyValueField?this.classifys[this.currentTreeIndex].classifyValueField:'id'; |
| | | where[this.classifys[this.currentTreeIndex].queryField] = data.attributes[classifyValueField]; |
| | | this.url = this.classifys[this.currentTreeIndex].queryByClassifyUrl || this.options.url; |
| | | this.page.currentPage=1; |
| | | this.onLoad(this.page, where); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .valueInfo { |
| | | float: left; |
| | | border: 1px solid #e9e7e7; |
| | | display: inline-block; |
| | | vertical-align: middle; |
| | | padding: 6px 15px; |
| | | line-height: 1; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-dialogDrag |
| | | :height="options.height|| 'auto'" :title="title" |
| | | :visible.sync="visible" |
| | | :width="options.width|| '450'" |
| | | :append-to-body="true" |
| | | class="avue-dialog avue-dialog--top" |
| | | @close="dialogClose"> |
| | | <avue-crud ref="referDefalutCrud" |
| | | v-model="formValue" |
| | | :data="data" |
| | | :option="option" |
| | | :page.sync="page" |
| | | :table-loading="loading" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @row-click="rowClick" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | </avue-crud> |
| | | <div class="avue-dialog__footer"> |
| | | <div class="avue-dialog__footer--left valueInfo">{{ valueInfo }}</div> |
| | | <el-button @click="escHandler">å æ¶</el-button> |
| | | <el-button @click="clearValue">æ¸
空</el-button> |
| | | <el-button type="primary" @click="setValue">ç¡® å®</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <el-input v-if="options.edit" class="w100" :clearable="true" v-model="textD" :disabled="disabled" :placeholder="placeholder" type="text" @change="changeValue" @clear="clearValue"> |
| | | <i slot="suffix" class="el-input__icon el-icon-search" style="cursor: pointer" @click="handleFocus"></i> |
| | | </el-input> |
| | | <el-input v-else class="w100" :clearable="true" v-model="textD" :disabled="disabled" :placeholder="placeholder" :readonly="true" type="text" |
| | | @focus="handleFocus" @clear="clearValue"></el-input> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {verifyNull} from "@/util/validate"; |
| | | import {getList} from "@/api/refer/table"; |
| | | |
| | | export default { |
| | | name: "vciWebReferDefalut", |
| | | props: { |
| | | referConfig: { |
| | | type: Object, |
| | | }, |
| | | value: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | text: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default:'' |
| | | }, |
| | | referType: { |
| | | type: String, |
| | | default:'' |
| | | }, width: { |
| | | type: String, |
| | | default:'70%' |
| | | }, height: { |
| | | type: String, |
| | | default:'60%' |
| | | }, |
| | | reloadFormKey: { |
| | | type: String, |
| | | default: '', |
| | | } |
| | | } , |
| | | data() { |
| | | return { |
| | | reloadData:this.referConfig.options.reloadData || false, |
| | | visible: false, |
| | | options: this.referConfig.options || {}, |
| | | textD: this.text || '', |
| | | valueD: this.value || '', |
| | | formValue:{}, |
| | | isMuti: ("true" == this.referConfig.options.isMuti || this.referConfig.options.isMuti == true || this.referConfig.options.muti == true) ? true : false, |
| | | props: { |
| | | value: this.referConfig.valueField || this.referConfig.options.valueField || 'id', |
| | | label: this.referConfig.textField || this.referConfig.options.textField || "name" |
| | | }, |
| | | url: this.referConfig.options.url || '/referGrid', |
| | | method: this.referConfig.options.method || 'GET', |
| | | query: {}, |
| | | loading: false, |
| | | page: { |
| | | layout: "sizes,prev,pager,next,jumper,total", |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: this.referConfig.options.data ? this.referConfig.options.data.length : 0 |
| | | }, |
| | | data: this.referConfig.options.data || [], |
| | | selectionList: [], |
| | | option: { |
| | | addBtn: false, |
| | | columnBtn: false, |
| | | calcHeight: 30, |
| | | tip: false, |
| | | menu: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | searchLabelWidth: 90, |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | | reserveSelection: true, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | rowKey: 'id', |
| | | rowParentKey: 'parentId', |
| | | column: [] |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.formValue[this.props.value]=this.valueD; |
| | | this.formValue[this.props.label]=this.textD; |
| | | this.getParams(); |
| | | }, |
| | | mounted() { |
| | | if (this.referConfig.options.tableConfig && this.referConfig.options.tableConfig.page) { |
| | | this.page.pageSize = this.referConfig.options.tableConfig.page.limit || this.referConfig.options.tableConfig.page.pageSize; |
| | | this.page.currentPage = this.referConfig.options.tableConfig.page.page || this.referConfig.options.tableConfig.page.currentPage; |
| | | } else if (!verifyNull(this.referConfig.options.limit)) { |
| | | this.page.pageSize = this.referConfig.options.limit; |
| | | } else if (this.referConfig.options.tableConfig && !verifyNull(this.referConfig.options.tableConfig.limit)) { |
| | | this.page.pageSize = this.referConfig.options.tableConfig.limit; |
| | | } |
| | | this.$nextTick(() => { |
| | | if(this.visible){ |
| | | this.$refs.referDefalutCrud.doLayout(); |
| | | } |
| | | }); |
| | | }, |
| | | watch:{ |
| | | text:{ |
| | | handler(val) { |
| | | this.textD=val; |
| | | } |
| | | }, |
| | | value:{ |
| | | handler(val) { |
| | | this.valueD=val; |
| | | } |
| | | }, |
| | | reloadFormKey:{ |
| | | handler(val) { |
| | | if(val != this.params[(this.options.paramForFormKey ? this.options.paramForFormKey : this.options.useFormKey)]){ |
| | | this.params[(this.options.paramForFormKey ? this.options.paramForFormKey : this.options.useFormKey)] = val; |
| | | this.clearValue(); |
| | | this.onLoad(this.page); |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | valueInfo: function () { |
| | | return this.text ? ("已设置çå¼ä¸º[" + this.text + "]") : 'æªè®¾ç½®å¼'; |
| | | }, |
| | | placeholder: function () { |
| | | return this.options.placeholder ? this.options.placeholder : this.title; |
| | | } |
| | | }, |
| | | methods: { |
| | | escHandler() { |
| | | this.visible = false; |
| | | this.$refs.referDefalutCrud.refreshTable(); |
| | | }, |
| | | dialogClose() { |
| | | this.visible = false; |
| | | this.$refs.referDefalutCrud.refreshTable(); |
| | | }, |
| | | handleFocus() { |
| | | if (!this.disabled) { |
| | | this.visible = true; |
| | | } |
| | | }, |
| | | getParams: function () { |
| | | var queryParams = {}; |
| | | if (this.options.extraParams) { |
| | | queryParams = this.options.extraParams; |
| | | } |
| | | if (this.options.useFormKey && this.options.formValues) { |
| | | //使ç¨è¡¨åä¸çåæ®µæ¥è¿æ»¤ |
| | | queryParams[ (this.options.paramForFormKey ? this.options.paramForFormKey : this.options.useFormKey)] = this.options.formValues[this.options.useFormKey]; |
| | | } |
| | | queryParams['referBusCode'] =this.options['referBusCode']; |
| | | if (!this.options.tableConfig || !this.options.tableConfig.cols || this.options.tableConfig.cols.length == 0) { |
| | | this.option.column = [{ |
| | | prop: 'code', |
| | | label: 'ç¼å·', |
| | | sortable: true, |
| | | width: 150, |
| | | search: true |
| | | }, { |
| | | prop: 'name', |
| | | label: 'åç§°', |
| | | sortable: true, |
| | | width: 260, |
| | | search: true |
| | | }, { |
| | | prop: 'description', |
| | | label: 'æè¿°' |
| | | }, { |
| | | prop: 'secretShow', |
| | | label: 'å¯çº§', |
| | | width: 60, |
| | | hide: (!this.controllerSecret) |
| | | }]; |
| | | } else { |
| | | this.option.column = this.options.tableConfig.cols.map(item => { |
| | | let formatter = item.formatter; |
| | | if (typeof formatter == "string" && formatter != '') { |
| | | formatter = eval("(" + formatter + ")"); |
| | | } |
| | | return { |
| | | ...item, |
| | | formatter: formatter |
| | | }; |
| | | }); |
| | | } |
| | | this.params = queryParams; |
| | | }, |
| | | changeValue(val){ |
| | | if(this.options.edit){ |
| | | let mapFields = this.referConfig.propMap || {}; |
| | | try { |
| | | if (this.options.propMap) { |
| | | mapFields = Object.assign(mapFields,this.options.propMap); |
| | | } |
| | | if (this.options.mapProps) { |
| | | mapFields = Object.assign(mapFields,this.options.mapProps); |
| | | } |
| | | } catch (e) { |
| | | ; |
| | | } |
| | | this.$emit("setReferValue", { |
| | | prop: this.referConfig.prop, |
| | | showProp: this.referConfig.showProp, |
| | | value: '', |
| | | text: val, |
| | | rawData: [], |
| | | propMap: mapFields |
| | | }); |
| | | } |
| | | }, |
| | | clearValue(){ |
| | | this.valueD = ''; |
| | | this.textD = ''; |
| | | let mapFields = this.referConfig.propMap || {}; |
| | | try { |
| | | if (this.options.propMap) { |
| | | mapFields = Object.assign(mapFields,this.options.propMap); |
| | | } |
| | | if (this.options.mapProps) { |
| | | mapFields = Object.assign(mapFields,this.options.mapProps); |
| | | } |
| | | } catch (e) { |
| | | ; |
| | | } |
| | | this.$emit("setReferValue", { |
| | | prop: this.referConfig.prop, |
| | | showProp: this.referConfig.showProp, |
| | | value: this.valueD, |
| | | text: this.textD, |
| | | rawData: [], |
| | | propMap: mapFields |
| | | }); |
| | | this.visible = false; |
| | | }, |
| | | setValue() { |
| | | if (this.selectionList.length == 0) { |
| | | this.$message.warning('没æéæ©æ°æ®'); |
| | | return false; |
| | | } else if (this.selectionList.length > 1 && !this.isMuti) { |
| | | this.$message.warning('æ¯æ¬¡åªè½éæ©ä¸æ¡æ°æ®'); |
| | | return false; |
| | | } |
| | | |
| | | let value = []; |
| | | let text = []; |
| | | let isMutiValue = (this.props.value.indexOf(",") > -1); |
| | | let isMutiRaw = (this.props.label.indexOf(",") > -1); |
| | | var _that = this; |
| | | this.selectionList.forEach((item) => { |
| | | if (isMutiValue) { |
| | | var valueFieldArray = _that.props.value.split(","); |
| | | valueFieldArray.forEach((_itemField) => { |
| | | let itemValue = item[_itemField]; |
| | | if (verifyNull(itemValue) && item['extendData']) { |
| | | itemValue = item['extendData'][_itemField]; |
| | | } |
| | | value.push(itemValue + (_that.referConfig.valueSep ? _that.referConfig.valueSep : ' ')); |
| | | }); |
| | | } else { |
| | | let itemValue = item[_that.props.value]; |
| | | if (verifyNull(itemValue) && item['extendData']) { |
| | | itemValue = item['extendData'][_that.props.value]; |
| | | } |
| | | value.push(itemValue); |
| | | } |
| | | if (isMutiRaw) { |
| | | var rawFieldArray = _that.props.label.split(","); |
| | | rawFieldArray.forEach((_itemField) => { |
| | | let itemText = item[_itemField]; |
| | | if (verifyNull(itemText) && item['extendData']) { |
| | | itemText = item['extendData'][_itemField]; |
| | | } |
| | | text.push(itemText + (_that.referConfig.textSep ? _that.referConfig.textSep : ' ')); |
| | | }); |
| | | } else { |
| | | let itemText = item[_that.props.label]; |
| | | if (verifyNull(itemText) && item['extendData']) { |
| | | itemText = item['extendData'][_that.props.label]; |
| | | } |
| | | text.push(itemText); |
| | | } |
| | | }); |
| | | let mapFields = this.referConfig.propMap || {}; |
| | | try { |
| | | if (this.options.propMap) { |
| | | mapFields = Object.assign(mapFields,this.options.propMap); |
| | | } |
| | | if (this.options.mapProps) { |
| | | mapFields = Object.assign(mapFields,this.options.mapProps); |
| | | } |
| | | } catch (e) { |
| | | ; |
| | | } |
| | | this.valueD = value.join(','); |
| | | this.textD = text.join(','); |
| | | this.$emit("setReferValue", { |
| | | prop: this.referConfig.prop, |
| | | showProp: this.referConfig.showProp, |
| | | value: this.valueD, |
| | | text: this.textD, |
| | | rawData: this.selectionList, |
| | | propMap: mapFields |
| | | }); |
| | | this.visible = false; |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page); |
| | | done(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | rowClick(row) { |
| | | this.$refs.referDefalutCrud.toggleSelection(); |
| | | this.$refs.referDefalutCrud.toggleRowSelection(row); //éä¸å½åè¡ |
| | | this.selectionList = [row]; |
| | | }, |
| | | selectionChange(list) { |
| | | if (!this.isMuti && list.length > 1) { |
| | | const nowVal = list.shift(); |
| | | this.$refs.referDefalutCrud.toggleRowSelection(nowVal, false); |
| | | } |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.referDefalutCrud.toggleSelection(); |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | if (this.url) { |
| | | this.loading = true; |
| | | getList(Object.assign(params, this.params, this.query), page.currentPage, page.pageSize, this.url, this.method).then(res => { |
| | | let data = []; |
| | | if (res.data && res.data.data) { |
| | | data = res.data.data; |
| | | this.page.total = res.data.total; |
| | | } else { |
| | | data = res.data; |
| | | this.page.total = res.total; |
| | | } |
| | | if(!data || data == null){ |
| | | data = []; |
| | | } |
| | | this.data = data; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }).catch(error => { |
| | | this.$message.error(error); |
| | | this.loading = false; |
| | | }); |
| | | } |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .valueInfo { |
| | | float: left; |
| | | border: 1px solid #E9E7E7; |
| | | display: inline-block; |
| | | vertical-align: middle; |
| | | padding: 6px 15px; |
| | | line-height: 1; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-dialogDrag |
| | | :height="height|| 'auto'" :title="title" |
| | | :visible.sync="visible" |
| | | :width="width" |
| | | :append-to-body="true" |
| | | class="avue-dialog avue-dialog--top" |
| | | @close="dialogClose"> |
| | | <avue-crud ref="referCrud" |
| | | v-model="formValue" |
| | | :data="data" |
| | | :option="option" |
| | | :page.sync="page" |
| | | :table-loading="loading" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @row-click="rowClick" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <template slot="icon" slot-scope="scope"> |
| | | <i :class="scope.row.icon" style="font-size:24px"></i> |
| | | </template> |
| | | </avue-crud> |
| | | <div class="avue-dialog__footer"> |
| | | <div class="avue-dialog__footer--left valueInfo">{{ valueInfo }}</div> |
| | | <el-button @click="escHandler">å æ¶</el-button> |
| | | <el-button @click="clearValue">æ¸
空</el-button> |
| | | <el-button type="primary" @click="setValue">ç¡® å®</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <el-input v-if="options.edit" class="w100" :clearable="true" v-model="textD" :disabled="disabled" :placeholder="placeholder" type="text" @change="changeValue" @clear="clearValue"> |
| | | <i slot="suffix" class="el-input__icon el-icon-search" style="cursor: pointer" @click="handleFocus"></i> |
| | | </el-input> |
| | | <el-input v-else class="w100" :clearable="true" v-model="textD" :disabled="disabled" :placeholder="placeholder" :readonly="true" type="text" |
| | | @focus="handleFocus" @clear="clearValue"></el-input> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {verifyNull} from "@/util/validate"; |
| | | import {getList} from "@/api/refer/table"; |
| | | |
| | | export default { |
| | | name: "vciWebReferTable", |
| | | props: { |
| | | referConfig: { |
| | | type: Object, |
| | | }, |
| | | value: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | text: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default:'' |
| | | }, |
| | | referType: { |
| | | type: String, |
| | | default:'' |
| | | }, width: { |
| | | type: String, |
| | | default:'70%' |
| | | }, height: { |
| | | type: String, |
| | | default:'60%' |
| | | }, |
| | | reloadFormKey: { |
| | | type: String, |
| | | default: '', |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | reloadData:this.referConfig.options.reloadData || false, |
| | | visible: false, |
| | | options: this.referConfig.options || {}, |
| | | textD: this.text || '', |
| | | valueD: this.value || '', |
| | | formValue:{}, |
| | | isMuti: ("true" == this.referConfig.options.isMuti || this.referConfig.options.isMuti == true || this.referConfig.options.muti == true) ? true : false, |
| | | props: { |
| | | value: this.referConfig.valueField || this.referConfig.options.valueField || 'id', |
| | | label: this.referConfig.textField || this.referConfig.options.textField || "name" |
| | | }, |
| | | url: this.referConfig.options.url || 'referGrid', |
| | | method: this.referConfig.options.method || 'get', |
| | | query: {}, |
| | | loading: false, |
| | | page: { |
| | | layout: "sizes,prev,pager,next,jumper,total", |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: this.referConfig.options.data ? this.referConfig.options.data.length : 0 |
| | | }, |
| | | data: this.referConfig.options.data || [], |
| | | selectionList: [], |
| | | option: { |
| | | addBtn: false, |
| | | columnBtn: false, |
| | | calcHeight: 30, |
| | | tip: false, |
| | | menu: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | searchLabelWidth: 90, |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | | reserveSelection: true, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | rowKey: 'id', |
| | | rowParentKey: 'parentId', |
| | | column: [] |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.formValue[this.props.value]=this.valueD; |
| | | this.formValue[this.props.label]=this.textD; |
| | | this.getParams(); |
| | | }, |
| | | mounted() { |
| | | if (this.referConfig.options.tableConfig && this.referConfig.options.tableConfig.page) { |
| | | this.page.pageSize = this.referConfig.options.tableConfig.page.limit || this.referConfig.options.tableConfig.page.pageSize; |
| | | this.page.currentPage = this.referConfig.options.tableConfig.page.page || this.referConfig.options.tableConfig.page.currentPage; |
| | | } else if (!verifyNull(this.referConfig.options.limit)) { |
| | | this.page.pageSize = this.referConfig.options.limit; |
| | | } else if (this.referConfig.options.tableConfig && !verifyNull(this.referConfig.options.tableConfig.limit)) { |
| | | this.page.pageSize = this.referConfig.options.tableConfig.limit; |
| | | } |
| | | this.$nextTick(() => { |
| | | if(this.visible){ |
| | | this.$refs.referCrud.doLayout(); |
| | | } |
| | | }); |
| | | }, |
| | | watch:{ |
| | | text:{ |
| | | handler(val) { |
| | | this.textD=val; |
| | | } |
| | | }, |
| | | value:{ |
| | | handler(val) { |
| | | this.valueD=val; |
| | | } |
| | | }, |
| | | reloadFormKey:{ |
| | | handler(val) { |
| | | if(val != this.params[(this.options.paramForFormKey ? this.options.paramForFormKey : this.options.useFormKey)]){ |
| | | this.params[(this.options.paramForFormKey ? this.options.paramForFormKey : this.options.useFormKey)] = val; |
| | | this.clearValue(); |
| | | this.onLoad(this.page); |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | computed: { |
| | | valueInfo: function () { |
| | | return this.text ? ("已设置çå¼ä¸º[" + this.text + "]") : 'æªè®¾ç½®å¼'; |
| | | }, |
| | | placeholder: function () { |
| | | return this.options.placeholder ? this.options.placeholder : this.title; |
| | | } |
| | | }, |
| | | methods: { |
| | | escHandler() { |
| | | this.visible = false; |
| | | this.$refs.referCrud.refreshTable(); |
| | | }, |
| | | dialogClose() { |
| | | this.visible = false; |
| | | this.$refs.referCrud.refreshTable(); |
| | | }, |
| | | handleFocus() { |
| | | if (!this.disabled) { |
| | | this.visible = true; |
| | | } |
| | | }, |
| | | getParams: function () { |
| | | var queryParams = {}; |
| | | if (this.options.extraParams) { |
| | | queryParams = this.options.extraParams; |
| | | } |
| | | if (this.options.useFormKey && this.options.formValues) { |
| | | //使ç¨è¡¨åä¸çåæ®µæ¥è¿æ»¤ |
| | | queryParams[ (this.options.paramForFormKey ? this.options.paramForFormKey : this.options.useFormKey)] = this.options.formValues[this.options.useFormKey]; |
| | | } |
| | | queryParams['referBusCode'] = this.options['referBusCode']; |
| | | //è¯´ææ¯èªå®ä¹çè¡¨æ ¼ |
| | | var tableConfig = this.options.tableConfig; |
| | | if (!tableConfig) { |
| | | this.$message.error('没æå®ä¹åç
§çè¡¨æ ¼é
ç½®'); |
| | | } |
| | | if (this.options.tableConfig && this.options.tableConfig.cols && this.options.tableConfig.cols.length > 0) { |
| | | //说æä¼ éäºç |
| | | this.option.column = this.options.tableConfig.cols.map(item => { |
| | | let formatter = item.formatter; |
| | | if (typeof formatter == "string" && formatter != '') { |
| | | formatter = eval("(" + formatter + ")"); |
| | | } |
| | | return { |
| | | ...item, |
| | | formatter: formatter |
| | | }; |
| | | }); |
| | | } |
| | | this.params = queryParams; |
| | | }, |
| | | changeValue(val){ |
| | | if(this.options.edit){ |
| | | let mapFields = this.referConfig.propMap || {}; |
| | | try { |
| | | if (this.options.propMap) { |
| | | mapFields = Object.assign(mapFields,this.options.propMap); |
| | | } |
| | | if (this.options.mapProps) { |
| | | mapFields = Object.assign(mapFields,this.options.mapProps); |
| | | } |
| | | } catch (e) { |
| | | ; |
| | | } |
| | | this.$emit("setReferValue", { |
| | | prop: this.referConfig.prop, |
| | | showProp: this.referConfig.showProp, |
| | | value: '', |
| | | text: val, |
| | | rawData: [], |
| | | propMap: mapFields |
| | | }); |
| | | } |
| | | }, |
| | | clearValue(){ |
| | | this.valueD = ''; |
| | | this.textD = ''; |
| | | let mapFields = this.referConfig.propMap || {}; |
| | | try { |
| | | if (this.options.propMap) { |
| | | mapFields = Object.assign(mapFields,this.options.propMap); |
| | | } |
| | | if (this.options.mapProps) { |
| | | mapFields = Object.assign(mapFields,this.options.mapProps); |
| | | } |
| | | } catch (e) { |
| | | ; |
| | | } |
| | | this.$emit("setReferValue", { |
| | | prop: this.referConfig.prop, |
| | | showProp: this.referConfig.showProp, |
| | | value: this.valueD, |
| | | text: this.textD, |
| | | rawData: [], |
| | | propMap: mapFields |
| | | }); |
| | | this.visible = false; |
| | | }, |
| | | setValue() { |
| | | if (this.selectionList.length == 0) { |
| | | this.$message.warning('没æéæ©æ°æ®'); |
| | | return false; |
| | | } else if (this.selectionList.length > 1 && !this.isMuti) { |
| | | this.$message.warning('æ¯æ¬¡åªè½éæ©ä¸æ¡æ°æ®'); |
| | | return false; |
| | | } |
| | | |
| | | let value = []; |
| | | let text = []; |
| | | let isMutiValue = (this.props.value.indexOf(",") > -1); |
| | | let isMutiRaw = (this.props.label.indexOf(",") > -1); |
| | | var _that = this; |
| | | this.selectionList.forEach((item) => { |
| | | if (isMutiValue) { |
| | | var valueFieldArray = _that.props.value.split(","); |
| | | valueFieldArray.forEach((_itemField) => { |
| | | let itemValue = item[_itemField]; |
| | | if (verifyNull(itemValue) && item['extendData']) { |
| | | itemValue = item['extendData'][_itemField]; |
| | | } |
| | | value.push(itemValue + (_that.referConfig.valueSep ? _that.referConfig.valueSep : ' ')); |
| | | }); |
| | | } else { |
| | | let itemValue = item[_that.props.value]; |
| | | if (verifyNull(itemValue) && item['extendData']) { |
| | | itemValue = item['extendData'][_that.props.value]; |
| | | } |
| | | value.push(itemValue); |
| | | } |
| | | if (isMutiRaw) { |
| | | var rawFieldArray = _that.props.label.split(","); |
| | | rawFieldArray.forEach((_itemField) => { |
| | | let itemText = item[_itemField]; |
| | | if (verifyNull(itemText) && item['extendData']) { |
| | | itemText = item['extendData'][_itemField]; |
| | | } |
| | | text.push(itemText + (_that.referConfig.textSep ? _that.referConfig.textSep : ' ')); |
| | | }); |
| | | } else { |
| | | let itemText = item[_that.props.label]; |
| | | if (verifyNull(itemText) && item['extendData']) { |
| | | itemText = item['extendData'][_that.props.label]; |
| | | } |
| | | text.push(itemText); |
| | | } |
| | | }); |
| | | let mapFields = this.referConfig.propMap || {}; |
| | | try { |
| | | if (this.options.propMap) { |
| | | mapFields = Object.assign(mapFields,this.options.propMap); |
| | | } |
| | | if (this.options.mapProps) { |
| | | mapFields = Object.assign(mapFields,this.options.mapProps); |
| | | } |
| | | } catch (e) { |
| | | ; |
| | | } |
| | | this.valueD = value.join(','); |
| | | this.textD = text.join(','); |
| | | this.$emit("setReferValue", { |
| | | prop: this.referConfig.prop, |
| | | showProp: this.referConfig.showProp, |
| | | value: this.valueD, |
| | | text: this.textD, |
| | | rawData: this.selectionList, |
| | | propMap: mapFields |
| | | }); |
| | | this.visible = false; |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page); |
| | | done(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | rowClick(row) { |
| | | this.$refs.referCrud.toggleSelection(); |
| | | this.$refs.referCrud.toggleRowSelection(row); //éä¸å½åè¡ |
| | | this.selectionList = [row]; |
| | | }, |
| | | selectionChange(list) { |
| | | if (!this.isMuti && list.length > 1) { |
| | | const nowVal = list.shift(); |
| | | this.$refs.referCrud.toggleRowSelection(nowVal, false); |
| | | } |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.referCrud.toggleSelection(); |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | if (this.url) { |
| | | this.loading = true; |
| | | getList(Object.assign(params, this.params, this.query), page.currentPage, page.pageSize, this.url,this.method).then(res => { |
| | | let data = []; |
| | | if (res.data && res.data.data) { |
| | | data = res.data.data; |
| | | this.page.total = res.data.total; |
| | | } else { |
| | | data = res.data; |
| | | this.page.total = res.total; |
| | | } |
| | | if(!data || data == null){ |
| | | data = []; |
| | | } |
| | | this.data = data; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }).catch(error => { |
| | | this.$message.error(error); |
| | | this.loading = false; |
| | | }); |
| | | } |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .valueInfo { |
| | | float: left; |
| | | border: 1px solid #E9E7E7; |
| | | display: inline-block; |
| | | vertical-align: middle; |
| | | padding: 6px 15px; |
| | | line-height: 1; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <avue-input-tree ref="referTree" class="w100" :clearable="true" |
| | | v-model="valueD" |
| | | :checked="checked" |
| | | :dic="treeData" |
| | | :disabled="disabled" |
| | | :lazy="lazy" |
| | | :leaf-only="referConfig.onlyLeaf" |
| | | :multiple="isMuti" |
| | | :node-click="nodeClick" |
| | | :placeholder="placeholder" |
| | | :props="props" |
| | | :default-expand-all="true" |
| | | :tree-load="treeLoad"></avue-input-tree> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getTree, getLazyTree} from "@/api/refer/tree"; |
| | | import {verifyNull} from "@/util/validate"; |
| | | |
| | | export default { |
| | | name: "vciWebReferTree", |
| | | props: { |
| | | referConfig: { |
| | | type: Object, |
| | | }, |
| | | value: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | text: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default:'' |
| | | }, width: { |
| | | type: String, |
| | | default:'70%' |
| | | }, height: { |
| | | type: String, |
| | | default:'60%' |
| | | }, |
| | | reloadFormKey: { |
| | | type: String, |
| | | default: '', |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | reloadData: this.referConfig.options.reloadData || false, |
| | | visible: false, |
| | | options: this.referConfig.options, |
| | | textD: this.text || '', |
| | | valueD: this.value || '', |
| | | lazy: this.referConfig.options.loadType == 'node', |
| | | isMuti: ("true" == this.referConfig.options.isMuti || this.referConfig.options.isMuti == true || this.referConfig.options.muti == true) ? true : false, |
| | | props: { |
| | | label: 'label', |
| | | value: 'value', |
| | | children: 'children' |
| | | }, |
| | | config: { |
| | | valueField: this.referConfig.valueField || this.referConfig.options.valueField || 'id', |
| | | textField: this.referConfig.textField || this.referConfig.options.textField || "name", |
| | | textSep: this.referConfig.textSep || ' ' |
| | | }, |
| | | treeUrl: this.referConfig.options.url || 'defaultReferTree', |
| | | treeData: [], |
| | | checkedData: [], |
| | | currentNode: {}, |
| | | params: {}, |
| | | loadType: {'all': 'all', 'node': 'node'} |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getParams(); |
| | | }, |
| | | mounted() { |
| | | if(!this.lazy){ |
| | | if (this.options.data) {//妿æ¯åºå®æ°æ®çæ
åµä¸ |
| | | this.treeData = this.options.data; |
| | | } else { |
| | | this.getTree(); |
| | | } |
| | | } |
| | | }, |
| | | watch:{ |
| | | text:{ |
| | | handler(val) { |
| | | this.textD=val; |
| | | } |
| | | }, |
| | | value:{ |
| | | handler(val) { |
| | | this.valueD=val; |
| | | } |
| | | }, |
| | | reloadFormKey:{ |
| | | handler(val) { |
| | | if(val != this.params[(this.options.paramForFormKey ? this.options.paramForFormKey : this.options.useFormKey)]){ |
| | | this.params[(this.options.paramForFormKey ? this.options.paramForFormKey : this.options.useFormKey)] = val; |
| | | this.clearValue(); |
| | | this.getTree(); |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | placeholder: function () { |
| | | return this.options.placeholder ? this.options.placeholder : this.title; |
| | | } |
| | | }, |
| | | methods: { |
| | | getParams: function () { |
| | | var queryParams = {}; |
| | | if (this.options.extraParams) { |
| | | queryParams = this.options.extraParams; |
| | | } |
| | | queryParams['referBusCode'] = this.options['referBusCode']; |
| | | if (this.options.useFormKey && this.options.formValues) { |
| | | //使ç¨è¡¨åä¸çåæ®µæ¥è¿æ»¤ |
| | | queryParams[ (this.options.paramForFormKey ? this.options.paramForFormKey : this.options.useFormKey)] = this.options.formValues[this.options.useFormKey]; |
| | | } |
| | | if (this.options.rootParams) { |
| | | for (let key in this.options.rootParams) { |
| | | queryParams[key] = this.options.rootParams[key]; |
| | | } |
| | | } |
| | | this.params = queryParams; |
| | | |
| | | }, |
| | | getTree() { |
| | | //å è½½å
¨é¨ |
| | | getTree(this.params, this.treeUrl).then(res => { |
| | | this.treeData = this.initTreeData(res.data); |
| | | }); |
| | | }, |
| | | treeLoad: function (treeNode, resolve) { |
| | | //é级å è½½ |
| | | const parentId = (treeNode.level === 0) ? 0 : treeNode.data.attributes.id; |
| | | this.params.parentId = parentId; |
| | | this.params.parentValue = parentId; |
| | | |
| | | if (this.options.rootParams && treeNode.level !== 0) { |
| | | for (var key in this.options.rootParams) { |
| | | delete this.params[key]; |
| | | } |
| | | } |
| | | getLazyTree(this.params, this.treeUrl).then(res => { |
| | | resolve(this.initTreeData(res.data)); |
| | | }); |
| | | }, |
| | | initTreeData:function (nodes){ |
| | | let treeData=[]; |
| | | if(nodes && nodes.length>0){ |
| | | nodes.forEach(item => { |
| | | let children=item.children || []; |
| | | if(children && children.length>0){ |
| | | children=this.initTreeData(children); |
| | | } |
| | | treeData.push({ |
| | | label:item[this.config.textField], |
| | | value:item[this.config.valueField], |
| | | leaf: !item.children, |
| | | children:children, |
| | | attributes:item |
| | | }); |
| | | }); |
| | | } |
| | | return treeData; |
| | | }, |
| | | nodeClick(data) { |
| | | if (!this.isMuti) { |
| | | this.setValue({checkedNodes: [data]}); |
| | | } |
| | | }, |
| | | checked(checkedNode, checkedData) { |
| | | this.setValue(checkedData); |
| | | }, |
| | | clearValue(){ |
| | | this.valueD = ''; |
| | | this.textD = ''; |
| | | let mapFields = this.referConfig.propMap || {}; |
| | | try { |
| | | if (this.options.propMap) { |
| | | mapFields = Object.assign(mapFields,this.options.propMap); |
| | | } |
| | | if (this.options.mapProps) { |
| | | mapFields = Object.assign(mapFields,this.options.mapProps); |
| | | } |
| | | } catch (e) { |
| | | ; |
| | | } |
| | | this.$emit("setReferValue", { |
| | | prop: this.referConfig.prop, |
| | | showProp: this.referConfig.showProp, |
| | | value: this.valueD, |
| | | text: this.textD, |
| | | rawData: [], |
| | | propMap: mapFields |
| | | }); |
| | | this.visible = false; |
| | | }, |
| | | setValue: function (checkedData) { |
| | | this.checkedData = checkedData; |
| | | let value = []; |
| | | let text = []; |
| | | let rawData=[]; |
| | | const textSep = this.config.textSep; |
| | | for (var j = 0; j < checkedData.checkedNodes.length; j++) { |
| | | const item = checkedData.checkedNodes[j].attributes || checkedData.checkedNodes[j]; |
| | | rawData.push(item); |
| | | let v = item[this.config.valueField] || item.extendData[this.config.valueField]; |
| | | value.push(v); |
| | | var tempRaw = []; |
| | | var textFieldArray = this.config.textField.split(","); |
| | | for (var i = 0; i < textFieldArray.length; i++) {//æ¾ç¤ºçåæ®µå¯è½æå¤ä¸ª |
| | | if (!verifyNull(textFieldArray[i])) { |
| | | var t = item[textFieldArray[i]] || item.extendData[textFieldArray[i]]; |
| | | tempRaw.push(t); |
| | | } |
| | | } |
| | | text.push(tempRaw.join(textSep)); |
| | | } |
| | | let mapFields = this.referConfig.propMap || {}; |
| | | try { |
| | | if (this.options.propMap) { |
| | | mapFields = Object.assign(mapFields,this.options.propMap); |
| | | } |
| | | if (this.options.mapProps) { |
| | | mapFields = Object.assign(mapFields,this.options.mapProps); |
| | | } |
| | | } catch (e) { |
| | | ; |
| | | } |
| | | this.valueD = value.join(','); |
| | | this.textD = text.join(','); |
| | | this.$emit("setReferValue", { |
| | | prop: this.referConfig.prop, |
| | | showProp: this.referConfig.showProp, |
| | | value: this.valueD, |
| | | text: this.textD || '', |
| | | isTreeMuti: this.isMuti, |
| | | rawData: rawData, |
| | | propMap: mapFields |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * å¹´(Y) å¯ç¨1-4个å ä½ç¬¦ |
| | | * æ(m)ãæ¥(d)ãå°æ¶(H)ãå(M)ãç§(S) å¯ç¨1-2个å ä½ç¬¦ |
| | | * ææ(W) å¯ç¨1-3个å ä½ç¬¦ |
| | | * å£åº¦(qä¸ºé¿æä¼¯æ°åï¼Qä¸ºä¸ææ°å)å¯ç¨1æ4个å ä½ç¬¦ |
| | | * |
| | | * let date = new Date() |
| | | * formatDate(date, "YYYY-mm-dd HH:MM:SS") // 2020-02-09 14:04:23 |
| | | * formatDate(date, "YYYY-mm-dd HH:MM:SS Q") // 2020-02-09 14:09:03 ä¸ |
| | | * formatDate(date, "YYYY-mm-dd HH:MM:SS WWW") // 2020-02-09 14:45:12 æææ¥ |
| | | * formatDate(date, "YYYY-mm-dd HH:MM:SS QQQQ") // 2020-02-09 14:09:36 第ä¸å£åº¦ |
| | | * formatDate(date, "YYYY-mm-dd HH:MM:SS WWW QQQQ") // 2020-02-09 14:46:12 æææ¥ 第ä¸å£åº¦ |
| | | */ |
| | | export function formatDate(date, format) { |
| | | if(!date){ |
| | | return ""; |
| | | } |
| | | date = new Date(date); |
| | | let we = date.getDay(); // ææ |
| | | let qut = Math.floor((date.getMonth() + 3) / 3).toString(); // å£åº¦ |
| | | const opt = { |
| | | "y+": date.getFullYear().toString(), // å¹´ |
| | | "M+": (date.getMonth() + 1).toString(), // æ(æä»½ä»0å¼å§ï¼è¦+1) |
| | | "d+": date.getDate().toString(), // æ¥ |
| | | "H+": date.getHours().toString(), // æ¶ |
| | | "m+": date.getMinutes().toString(), // å |
| | | "s+": date.getSeconds().toString(), // ç§ |
| | | "q+": qut, // å£åº¦ |
| | | }; |
| | | const week = { |
| | | // 䏿æ°å (ææ) |
| | | 0: "æ¥", |
| | | 1: "ä¸", |
| | | 2: "äº", |
| | | 3: "ä¸", |
| | | 4: "å", |
| | | 5: "äº", |
| | | 6: "å
", |
| | | }; |
| | | const quarter = { |
| | | // 䏿æ°åï¼å£åº¦ï¼ |
| | | 1: "ä¸", |
| | | 2: "äº", |
| | | 3: "ä¸", |
| | | 4: "å", |
| | | }; |
| | | if (/(W+)/.test(format)) { |
| | | format = format.replace( |
| | | RegExp.$1, |
| | | RegExp.$1.length > 1 |
| | | ? RegExp.$1.length > 2 |
| | | ? "ææ" + week[we] |
| | | : "å¨" + week[we] |
| | | : week[we] |
| | | ); |
| | | } |
| | | if (/(Q+)/.test(format)) { |
| | | // è¾å
¥ä¸ä¸ªQï¼åªè¾åºä¸ä¸ªä¸ææ°åï¼è¾å
¥4个Qï¼åæ¼æ¥ä¸å符串 |
| | | format = format.replace( |
| | | RegExp.$1, |
| | | RegExp.$1.length == 4 ? "第" + quarter[qut] + "å£åº¦" : quarter[qut] |
| | | ); |
| | | } |
| | | for (let k in opt) { |
| | | let r = new RegExp("(" + k + ")").exec(format); |
| | | if (r) { |
| | | // è¥è¾å
¥çé¿åº¦ä¸ä¸º1ï¼ååé¢è¡¥é¶ |
| | | format = format.replace( |
| | | r[1], |
| | | RegExp.$1.length == 1 ? opt[k] : opt[k].padStart(RegExp.$1.length, "0") |
| | | ); |
| | | } |
| | | } |
| | | return format; |
| | | } |
| | | // æ¶é´å½æ°ç²¾ç¡®æ¯«ç§ |
| | | export function formatMilliseconds(date) { |
| | | const year = date.getFullYear(); |
| | | const month = addLeadingZero(date.getMonth() + 1); |
| | | const day = addLeadingZero(date.getDate()); |
| | | const hours = addLeadingZero(date.getHours()); |
| | | const minutes = addLeadingZero(date.getMinutes()); |
| | | const seconds = addLeadingZero(date.getSeconds()); |
| | | const milliseconds = addLeadingZero(date.getMilliseconds(), 3); |
| | | |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}.${milliseconds}`; |
| | | } |
| | | |
| | | export function addLeadingZero(value, digits = 2) { |
| | | return value.toString().padStart(digits, "0"); |
| | | } |
| | | /** |
| | | * 10ç§ï¼ 10 * 1000 |
| | | * 1åï¼ 60 * 1000 |
| | | * 1å°æ¶ï¼ 60 * 60 * 1000 |
| | | * 24å°æ¶ï¼60 * 60 * 24 * 1000 |
| | | * 3å¤©ï¼ 60 * 60* 24 * 1000 * 3 |
| | | * |
| | | * let data = new Date() |
| | | * formatPast(data) // åå |
| | | * formatPast(data - 11 * 1000) // 11ç§å |
| | | * formatPast(data - 2 * 60 * 1000) // 2åéå |
| | | * formatPast(data - 60 * 60 * 2 * 1000) // 2å°æ¶å |
| | | * formatPast(data - 60 * 60 * 2 * 1000) // 2å°æ¶å |
| | | * formatPast(data - 60 * 60 * 71 * 1000) // 2天å |
| | | * formatPast("2020-06-01") // 2020-06-01 |
| | | * formatPast("2020-06-01", "YYYY-mm-dd HH:MM:SS WWW QQQQ") // 2020-06-01 08:00:00 ææä¸ 第äºå£åº¦ |
| | | */ |
| | | export function formatPast(param, format = "YYYY-mm-dd") { |
| | | const params = typeof param; |
| | | // ä¼ å
¥æ ¼å¼å¤çãåå¨è½¬æ¢å¼ |
| | | let t, s; |
| | | // è·åjs æ¶é´æ³ |
| | | let time = new Date().getTime(); |
| | | // æ¯å¦æ¯å¯¹è±¡ |
| | | if (params === "string" || params === "object") t = new Date(param).getTime(); |
| | | else t = param; |
| | | // å½åæ¶é´æ³ - ä¼ å
¥æ¶é´æ³ |
| | | time = Number.parseInt(time - t); |
| | | if (time < 10000) { |
| | | // 10ç§å
|
| | | return "åå"; |
| | | } else if (time < 60000 && time >= 10000) { |
| | | // è¶
è¿10ç§å°äº1åéå
|
| | | s = Math.floor(time / 1000); |
| | | return `${s}ç§å`; |
| | | } else if (time < 3600000 && time >= 60000) { |
| | | // è¶
è¿1åéå°äº1å°æ¶ |
| | | s = Math.floor(time / 60000); |
| | | return `${s}åéå`; |
| | | } else if (time < 86400000 && time >= 3600000) { |
| | | // è¶
è¿1å°æ¶å°äº24å°æ¶ |
| | | s = Math.floor(time / 3600000); |
| | | return `${s}å°æ¶å`; |
| | | } else if (time < 259200000 && time >= 86400000) { |
| | | // è¶
è¿1天å°äº3天å
|
| | | s = Math.floor(time / 86400000); |
| | | return `${s}天å`; |
| | | } else { |
| | | // è¶
è¿3天 |
| | | let date = |
| | | params === "string" || params === "object" ? new Date(param) : param; |
| | | return formatDate(date, format); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * formatAxis(new Date()) // ä¸å好 |
| | | */ |
| | | export function formatAxis(param) { |
| | | let hour = new Date(param).getHours(); |
| | | if (hour < 6) { |
| | | return "忍好"; |
| | | } else if (hour < 9) { |
| | | return "æ©ä¸å¥½"; |
| | | } else if (hour < 12) { |
| | | return "ä¸å好"; |
| | | } else if (hour < 14) { |
| | | return "ä¸å好"; |
| | | } else if (hour < 17) { |
| | | return "ä¸å好"; |
| | | } else if (hour < 19) { |
| | | return "åæå¥½"; |
| | | } else if (hour < 22) { |
| | | return "æä¸å¥½"; |
| | | } else { |
| | | return "å¤é好"; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { formatDate } from "@/util/formatTime"; |
| | | |
| | | //å¤çå¨æè¡¨å彿°æ°ç»æåæ ¼å¼ {prop:key} |
| | | export const handlerObj = (prop, key, data) => { |
| | | const keyObj = data.reduce((v, cur) => { |
| | | if (!v[cur[prop]]) { |
| | | v[cur[prop]] = []; |
| | | } |
| | | v[cur[prop]] = cur[key]; |
| | | return v; |
| | | }, {}); |
| | | return keyObj; |
| | | }; |
| | | //å¤çå¨æè¡¨å彿°æ°ç»æåæ ¼å¼ {prop:key} |
| | | export const handlerProp = (prop, data) => { |
| | | const keyObj = data.reduce((v, cur) => { |
| | | if (!v[cur[prop]]) { |
| | | v[cur[prop]] = []; |
| | | } |
| | | v[cur[prop]] = undefined; |
| | | return v; |
| | | }, {}); |
| | | return keyObj; |
| | | }; |
| | | |
| | | //è¿æ»¤å¯¹è±¡ç©ºå¼/åä¸ªå¼ |
| | | export const filterateObj = (obj, filter) => { |
| | | return Object.entries(obj).reduce((acc, [key, value]) => { |
| | | if (!filter) { |
| | | if (value !== "" && value !== null && value !== undefined) { |
| | | acc[key] = value; |
| | | } |
| | | } else { |
| | | if (value !== filter) { |
| | | acc[key] = value; |
| | | } |
| | | } |
| | | return acc; |
| | | }, {}); |
| | | }; |
| | | // è¿æ»¤æ°ç»å¤ä¸ªå¼ |
| | | export const filterateKeys = (data, keys, prop = "prop") => { |
| | | if (typeof keys === "string") keys = keys.split(","); |
| | | return data.filter((v) => { |
| | | if (keys.length > 0) { |
| | | for (let key of keys) { |
| | | if (v[prop] == key) { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | return true; |
| | | }); |
| | | }; |
| | | |
| | | /** |
| | | * ä¸è½½æä»¶ |
| | | * @param data æä»¶æµç¨ |
| | | */ |
| | | export function blobDownload(data) { |
| | | const newFileName = formatDate(new Date(), "yyyyMMddHHmmss"); |
| | | //妿è½ç¨ï¼æèµä¸å å主çåä¸å®¹æ 头åé½ç½äºå¾å¤ |
| | | let name = newFileName; |
| | | var content = data; |
| | | var datas = new Blob([content], { |
| | | type: "application/vnd.ms-excel;charset=utf-8", |
| | | }); |
| | | var downloadUrl = window.URL.createObjectURL(datas); |
| | | var anchor = document.createElement("a"); |
| | | anchor.href = downloadUrl; |
| | | anchor.download = name + ".xls"; |
| | | anchor.click(); |
| | | window.URL.revokeObjectURL(datas); |
| | | } |
| | | /** |
| | | * æ°ç»åå¹¶åå¹¶é |
| | | * @param arr æ°ç»1 主 |
| | | * @param data æ°ç»2 è¾
|
| | | * @param key æ°ç»2çç¸ååæ®µkey |
| | | * @param prop æ°ç»2çåæ®µæ¼æ¥å°æ°ç»1ä¸ï¼ä¸ä¼ é»è®¤å
¨é¨å段 |
| | | */ |
| | | export function combineData(arr, data, key, prop) { |
| | | let newArr = []; |
| | | data.forEach((d) => { |
| | | let findObj = arr.find((a) => a.id === d[key]); |
| | | if (findObj) { |
| | | newArr.push(findObj); |
| | | } |
| | | }); |
| | | |
| | | const arrArray = newArr.map((obj, index) => { |
| | | if (prop) { |
| | | const filteredObj = Object.fromEntries( |
| | | Object.entries(data[index]).filter(([key]) => prop.includes(key)) |
| | | ); |
| | | return { ...obj, ...filteredObj }; |
| | | } else { |
| | | return { ...obj, ...data[index] }; |
| | | } |
| | | }); |
| | | const differentObjects = arr.filter( |
| | | (v) => !data.some((da) => da[key] === v.id) |
| | | ); |
| | | console.log("newArr", differentObjects); |
| | | const r = [...differentObjects, ...arrArray]; |
| | | return r; |
| | | } |
| | |
| | | /** |
| | | * Created by jiachenpan on 16/11/18. |
| | | * éªè¯ç¾åæ¯ï¼ä¸å¯ä»¥å°æ°ï¼ |
| | | * @param val å½åå¼å符串 |
| | | * @returns è¿åå¤çåçå符串 |
| | | */ |
| | | |
| | | export function isvalidUsername(str) { |
| | | const valid_map = ['admin', 'editor'] |
| | | return valid_map.indexOf(str.trim()) >= 0 |
| | | } |
| | | |
| | | /* åæ³uri*/ |
| | | export function validateURL(textval) { |
| | | const urlregex = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/ |
| | | return urlregex.test(textval) |
| | | } |
| | | export const verifyNumberPercentage = (val) => { |
| | | const patternSpace = /(^\s*)|(\s*$)/g; |
| | | const patternNum = /[^\d]/g; |
| | | // å¹é
ç©ºæ ¼ |
| | | let v = val.replace(patternSpace, ""); |
| | | // åªè½æ¯æ°ååå°æ°ç¹ï¼ä¸è½æ¯å
¶ä»è¾å
¥ |
| | | v = v.replace(patternNum, ""); |
| | | // ä¸è½ä»¥0å¼å§ |
| | | v = v.replace(/^0/g, ""); |
| | | // æ°åè¶
è¿100ï¼èµå¼ææå¤§å¼100 |
| | | v = v.replace(/^[1-9]\d\d{1,3}$/, "100"); |
| | | // è¿åç»æ |
| | | return v; |
| | | }; |
| | | /** |
| | | * é®ç®± |
| | | * @param {*} s |
| | | * éªè¯ç¾åæ¯ï¼å¯ä»¥å°æ°ï¼ |
| | | * @param val å½åå¼å符串 |
| | | * @returns è¿åå¤çåçå符串 |
| | | */ |
| | | export function isEmail(s) { |
| | | return /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test(s) |
| | | } |
| | | |
| | | export const verifyNumberPercentageFloat = (val) => { |
| | | let v = verifyNumberIntegerAndFloat(val); |
| | | // æ°åè¶
è¿100ï¼èµå¼ææå¤§å¼100 |
| | | v = v.replace(/^[1-9]\d\d{1,3}$/, "100"); |
| | | // è¶
è¿100ä¹åä¸ç»åè¾å
¥å¼ |
| | | v = v.replace(/^100\.$/, "100"); |
| | | // è¿åç»æ |
| | | return v; |
| | | }; |
| | | /** |
| | | * ææºå·ç |
| | | * @param {*} s |
| | | * å°æ°ææ´æ°(ä¸å¯ä»¥è´æ°) |
| | | * @param val å½åå¼å符串 |
| | | * @returns è¿åå¤çåçå符串 |
| | | */ |
| | | export function isMobile(s) { |
| | | return /^1[0-9]{10}$/.test(s) |
| | | } |
| | | export const verifyNumberIntegerAndFloat = (val) => { |
| | | // å¹é
ç©ºæ ¼ |
| | | let v = val.replace(/(^\s*)|(\s*$)/g, ""); |
| | | // åªè½æ¯æ°ååå°æ°ç¹ï¼ä¸è½æ¯å
¶ä»è¾å
¥ |
| | | v = v.replace(/[^\d.]/g, ""); |
| | | // 以0å¼å§åªè½è¾å
¥ä¸ä¸ª |
| | | v = v.replace(/^0{2}$/g, "0"); |
| | | // ä¿è¯ç¬¬ä¸ä½åªè½æ¯æ°åï¼ä¸è½æ¯ç¹ |
| | | v = v.replace(/^\./g, ""); |
| | | // å°æ°åªè½åºç°1ä½ |
| | | v = v.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); |
| | | // å°æ°ç¹åé¢ä¿ç2ä½ |
| | | v = v.replace(/^(\\-)*(\d+)\.(\d\d).*$/, "$1$2.$3"); |
| | | // è¿åç»æ |
| | | return v; |
| | | }; |
| | | // æ£æ´æ°éªè¯ |
| | | export const verifiyNumberInteger = (val) => { |
| | | const pattern = /(^\s*)|(\s*$)/g; |
| | | // å¹é
ç©ºæ ¼ |
| | | let v = val.replace(pattern, ""); |
| | | // 廿 '.' , 鲿¢è´´è´´çæ¶ååºç°é®é¢ å¦ 0.1.12.12 |
| | | v = v.replace(/[\\.]*/g, ""); |
| | | // 廿以 0 å¼å§åé¢çæ°, 鲿¢è´´è´´çæ¶ååºç°é®é¢ å¦ 00121323 |
| | | v = v.replace(/(^0[\d]*)$/g, "0"); |
| | | // é¦ä½æ¯0,åªè½åºç°ä¸æ¬¡ |
| | | v = v.replace(/^0\d$/g, "0"); |
| | | // åªå¹é
æ°å |
| | | v = v.replace(/[^\d]/g, ""); |
| | | // è¿åç»æ |
| | | return v; |
| | | }; |
| | | // 廿䏿åç©ºæ ¼ |
| | | export const verifyCnAndSpace = (val) => { |
| | | const pattern = /[\u4e00-\u9fa5\s]+/g; |
| | | // å¹é
䏿ä¸ç©ºæ ¼ |
| | | let v = val.replace(pattern, ""); |
| | | // å¹é
ç©ºæ ¼ |
| | | v = v.replace(/(^\s*)|(\s*$)/g, ""); |
| | | // è¿åç»æ |
| | | return v; |
| | | }; |
| | | // å»æè±æåç©ºæ ¼ |
| | | export const verifyEnAndSpace = (val) => { |
| | | const pattern = /[a-zA-Z]+/g; |
| | | const patternSpace = /(^\s*)|(\s*$)/g; |
| | | // å¹é
è±æä¸ç©ºæ ¼ |
| | | let v = val.replace(pattern, ""); |
| | | // å¹é
ç©ºæ ¼ |
| | | v = v.replace(patternSpace, ""); |
| | | // è¿åç»æ |
| | | return v; |
| | | }; |
| | | // ç¦æ¢è¾å
¥ç©ºæ ¼ |
| | | export const verifyAndSpace = (val) => { |
| | | const pattern = /(^\s*)|(\s*$)/g; |
| | | // å¹é
ç©ºæ ¼ |
| | | let v = val.replace(pattern, ""); |
| | | // è¿åç»æ |
| | | return v; |
| | | }; |
| | | // éé¢ç¨ `,` åºåå¼ |
| | | export const verifyNumberComma = (val) => { |
| | | const pattern = /\B(?=(\d{3})+(?!\d))/g; |
| | | // è°ç¨å°æ°ææ´æ°(ä¸å¯ä»¥è´æ°)æ¹æ³ |
| | | let v = verifyNumberIntegerAndFloat(val); |
| | | // åç¬¦ä¸²è½¬ææ°ç» |
| | | v = v.toString().split("."); |
| | | // \B å¹é
éåè¯è¾¹çï¼ä¸¤è¾¹é½æ¯åè¯å符æè
ä¸¤è¾¹é½æ¯éåè¯å符 |
| | | v[0] = v[0].replace(pattern, ","); |
| | | // æ°ç»è½¬å符串 |
| | | v = v.join("."); |
| | | // è¿åç»æ |
| | | return v; |
| | | }; |
| | | // å¹é
æååè²ï¼æç´¢æ¶ï¼ |
| | | export const verifyTextColor = (val, text = "", color = "red") => { |
| | | // è¿åå
å®¹ï¼æ·»å é¢è² |
| | | let v = text.replace( |
| | | new RegExp(val, "gi"), |
| | | `<span style='color: ${color}'>${val}</span>` |
| | | ); |
| | | // è¿åç»æ |
| | | return v; |
| | | }; |
| | | // æ°åè½¬ä¸æå¤§å |
| | | export const verifyNumberCnUppercase = ( |
| | | val, |
| | | unit = "ä»ä½°æ¾äº¿ä»ä½°æ¾ä¸ä»ä½°æ¾å
è§å", |
| | | v = "" |
| | | ) => { |
| | | // å½åå
容å符串添å 2个0ï¼ä¸ºä»ä¹?? |
| | | val += "00"; |
| | | // è¿åæä¸ªæå®çå符串å¼å¨å符串ä¸é¦æ¬¡åºç°çä½ç½®ï¼æ²¡æåºç°ï¼åè¯¥æ¹æ³è¿å -1 |
| | | let lookup = val.indexOf("."); |
| | | // substringï¼ä¸å
å«ç»æä¸æ å
容ï¼substrï¼å
å«ç»æä¸æ å
容 |
| | | if (lookup >= 0) |
| | | val = val.substring(0, lookup) + val.substring(lookup + 1, 2); |
| | | // æ ¹æ®å
容 val çé¿åº¦ï¼æªåè¿å对åºå¤§å |
| | | unit = unit.substring(unit.length - val.length); |
| | | // å¾ªç¯æªåæ¼æ¥å¤§å |
| | | for (let i = 0; i < val.length; i++) { |
| | | v += |
| | | "é¶å£¹è´°åèä¼éææç".substring(val.substring(i, 1), 1) + |
| | | unit.substring(i, 1); |
| | | } |
| | | // æ£åå¤ç |
| | | v = v |
| | | .replace(/é¶è§é¶å$/, "æ´") |
| | | .replace(/é¶[ä»ä½°æ¾]/g, "é¶") |
| | | .replace(/é¶{2,}/g, "é¶") |
| | | .replace(/é¶([亿|ä¸])/g, "$1") |
| | | .replace(/é¶+å
/, "å
") |
| | | .replace(/亿é¶{0,3}ä¸/, "亿") |
| | | .replace(/^å
/, "é¶å
"); |
| | | // è¿åç»æ |
| | | return v; |
| | | }; |
| | | // ææºå·ç |
| | | export const verifyPhone = (val) => { |
| | | const petter = |
| | | /^((12[0-9])|(13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0,5-9]))\d{8}$/; |
| | | // false: ææºå·ç 䏿£ç¡® |
| | | if (!petter.test(val)) return false; |
| | | // true: ææºå·ç æ£ç¡® |
| | | else return true; |
| | | }; |
| | | |
| | | /** |
| | | * çµè¯å·ç |
| | | * @param {*} s |
| | | */ |
| | | export function isPhone(s) { |
| | | return /^([0-9]{3,4}-)?[0-9]{7,8}$/.test(s) |
| | | } |
| | | // å½å
çµè¯å·ç |
| | | export const verifyTelPhone = (val) => { |
| | | const petter = /\d{3}-\d{8}|\d{4}-\d{7}/; |
| | | // false: å½å
çµè¯å·ç 䏿£ç¡® |
| | | if (!petter.test(val)) return false; |
| | | // true: å½å
çµè¯å·ç æ£ç¡® |
| | | else return true; |
| | | }; |
| | | |
| | | /** |
| | | * URLå°å |
| | | * @param {*} s |
| | | */ |
| | | export function isURL(s) { |
| | | return /^http[s]?:\/\/.*/.test(s) |
| | | } |
| | | // ç»å½è´¦å· (忝å¼å¤´ï¼å
许5-16åèï¼å
è®¸åæ¯æ°åä¸å线) |
| | | export const verifyAccount = (val) => { |
| | | const petter = /^[a-zA-Z][a-zA-Z0-9_]{4,15}$/; |
| | | // false: ç»å½è´¦å·ä¸æ£ç¡® |
| | | if (!petter.test(val)) return false; |
| | | // true: ç»å½è´¦å·æ£ç¡® |
| | | else return true; |
| | | }; |
| | | |
| | | /* å°å忝*/ |
| | | export function validateLowerCase(str) { |
| | | const reg = /^[a-z]+$/ |
| | | return reg.test(str) |
| | | } |
| | | // å¯ç (以忝å¼å¤´ï¼é¿åº¦å¨6~16ä¹é´ï¼åªè½å
å«åæ¯ãæ°ååä¸å线) |
| | | export const verifyPassword = (val) => { |
| | | const petter = /^[a-zA-Z]\w{5,15}$/; |
| | | // false: å¯ç 䏿£ç¡® |
| | | if (!petter.test(val)) return false; |
| | | // true: å¯ç æ£ç¡® |
| | | else return true; |
| | | }; |
| | | |
| | | /* 大å忝*/ |
| | | export function validateUpperCase(str) { |
| | | const reg = /^[A-Z]+$/ |
| | | return reg.test(str) |
| | | } |
| | | // 强å¯ç (忝+æ°å+ç¹æ®å符ï¼é¿åº¦å¨6-16ä¹é´) |
| | | export const verifyPasswordPowerful = (val) => { |
| | | const petter = |
| | | /^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\\.*]+$)(?![\d!@#$%^&\\.*]+$)[a-zA-Z\d!@#$%^&\\.*]{6,16}$/; |
| | | // false: 强å¯ç 䏿£ç¡® |
| | | if (!petter.test(val)) return false; |
| | | // true: 强å¯ç æ£ç¡® |
| | | else return true; |
| | | }; |
| | | |
| | | /* 大å°å忝*/ |
| | | export function validatAlphabets(str) { |
| | | const reg = /^[A-Za-z]+$/ |
| | | return reg.test(str) |
| | | } |
| | | /*éªè¯padè¿æ¯pc*/ |
| | | export const vaildatePc = function() { |
| | | const userAgentInfo = navigator.userAgent; |
| | | const Agents = ["Android", "iPhone", |
| | | "SymbianOS", "Windows Phone", |
| | | "iPad", "iPod" |
| | | ]; |
| | | let flag = true; |
| | | for (var v = 0; v < Agents.length; v++) { |
| | | if (userAgentInfo.indexOf(Agents[v]) > 0) { |
| | | flag = false; |
| | | break; |
| | | } |
| | | } |
| | | return flag; |
| | | } |
| | | /** |
| | | * validate email |
| | | * @param email |
| | | * @returns {boolean} |
| | | */ |
| | | export function validateEmail(email) { |
| | | const re = /^(([^<>()\\[\]\\.,;:\s@"]+(\.[^<>()\\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ |
| | | return re.test(email) |
| | | } |
| | | // å¯ç 强度 |
| | | export const verifyPasswordStrength = (val) => { |
| | | const weak = /^(?:\d+|[a-zA-Z]+|[!@#$%^&\\.*]+){6,16}$/; |
| | | const centre = |
| | | /^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\\.*]+$)[a-zA-Z\d!@#$%^&\\.*]{6,16}$/; |
| | | const strong = |
| | | /^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\\.*]+$)(?![\d!@#$%^&\\.*]+$)[a-zA-Z\d!@#$%^&\\.*]{6,16}$/; |
| | | let v = ""; |
| | | // å¼±ï¼çº¯æ°åï¼çº¯åæ¯ï¼çº¯ç¹æ®å符 |
| | | if (weak.test(val)) v = "å¼±"; |
| | | // ä¸ï¼åæ¯+æ°åï¼åæ¯+ç¹æ®åç¬¦ï¼æ°å+ç¹æ®å符 |
| | | if (centre.test(val)) v = "ä¸"; |
| | | // 强ï¼åæ¯+æ°å+ç¹æ®å符 |
| | | if (strong.test(val)) v = "强"; |
| | | // è¿åç»æ |
| | | return v; |
| | | }; |
| | | |
| | | /** |
| | | * å¤æèº«ä»½è¯å·ç |
| | | */ |
| | | export function cardid(code) { |
| | | let list = []; |
| | | let result = true; |
| | | let msg = ''; |
| | | var city = { |
| | | 11: "å京", |
| | | 12: "天津", |
| | | 13: "æ²³å", |
| | | 14: "山西", |
| | | 15: "å
èå¤", |
| | | 21: "è¾½å®", |
| | | 22: "åæ", |
| | | 23: "é»é¾æ± ", |
| | | 31: "䏿µ·", |
| | | 32: "æ±è", |
| | | 33: "æµæ±", |
| | | 34: "å®å¾½", |
| | | 35: "ç¦å»º", |
| | | 36: "æ±è¥¿", |
| | | 37: "å±±ä¸", |
| | | 41: "æ²³å", |
| | | 42: "æ¹å ", |
| | | 43: "æ¹å", |
| | | 44: "广ä¸", |
| | | 45: "广西", |
| | | 46: "æµ·å", |
| | | 50: "éåº", |
| | | 51: "åå·", |
| | | 52: "è´µå·", |
| | | 53: "äºå", |
| | | 54: "西è ", |
| | | 61: "é西", |
| | | 62: "çè", |
| | | 63: "éæµ·", |
| | | 64: "å®å¤", |
| | | 65: "æ°ç", |
| | | 71: "å°æ¹¾", |
| | | 81: "馿¸¯", |
| | | 82: "æ¾³é¨", |
| | | 91: "å½å¤ " |
| | | }; |
| | | if (!validatenull(code)) { |
| | | if (code.length == 18) { |
| | | if (!code || !/(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(code)) { |
| | | msg = "è¯ä»¶å·ç æ ¼å¼é误"; |
| | | } else if (!city[code.substr(0, 2)]) { |
| | | msg = "å°åç¼ç é误"; |
| | | } else { |
| | | //18ä½èº«ä»½è¯éè¦éªè¯æåä¸ä½æ ¡éªä½ |
| | | code = code.split(''); |
| | | //â(aiÃWi)(mod 11) |
| | | //å æå å |
| | | var factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2]; |
| | | //æ ¡éªä½ |
| | | var parity = [1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2, 'x']; |
| | | var sum = 0; |
| | | var ai = 0; |
| | | var wi = 0; |
| | | for (var i = 0; i < 17; i++) { |
| | | ai = code[i]; |
| | | wi = factor[i]; |
| | | sum += ai * wi; |
| | | } |
| | | if (parity[sum % 11] != code[17]) { |
| | | msg = "è¯ä»¶å·ç æ ¡éªä½é误"; |
| | | } else { |
| | | result = false; |
| | | } |
| | | // IPå°å |
| | | export const verifyIPAddress = (val) => { |
| | | const petter = |
| | | /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/; |
| | | // false: IPå°å䏿£ç¡® |
| | | if (!petter.test(val)) return false; |
| | | // true: IPå°åæ£ç¡® |
| | | else return true; |
| | | }; |
| | | |
| | | } |
| | | } else { |
| | | msg = "è¯ä»¶å·ç é¿åº¦ä¸ä¸º18ä½"; |
| | | } |
| | | // é®ç®± |
| | | export const verifyEmail = (val) => { |
| | | const petter = |
| | | /^(([^<>()\\[\]\\.,;:\s@"]+(\.[^<>()\\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; |
| | | // false: é®ç®±ä¸æ£ç¡® |
| | | if (!petter.test(val)) return false; |
| | | // true: é®ç®±æ£ç¡® |
| | | else return true; |
| | | }; |
| | | |
| | | } else { |
| | | msg = "è¯ä»¶å·ç ä¸è½ä¸ºç©º"; |
| | | } |
| | | list.push(result); |
| | | list.push(msg); |
| | | return list; |
| | | } |
| | | /** |
| | | * å¤æææºå·ç æ¯å¦æ£ç¡® |
| | | */ |
| | | export function isvalidatemobile(phone) { |
| | | let list = []; |
| | | let result = true; |
| | | let msg = ''; |
| | | var isPhone = /^0\d{2,3}-?\d{7,8}$/; |
| | | //å¢å 134 åå°|1349[0-9]{7}ï¼å¢å 181,å¢å 145ï¼å¢å 17[678] |
| | | if (!validatenull(phone)) { |
| | | if (phone.length == 11) { |
| | | if (isPhone.test(phone)) { |
| | | msg = 'ææºå·ç æ ¼å¼ä¸æ£ç¡®'; |
| | | } else { |
| | | result = false; |
| | | } |
| | | } else { |
| | | msg = 'ææºå·ç é¿åº¦ä¸ä¸º11ä½'; |
| | | } |
| | | } else { |
| | | msg = 'ææºå·ç ä¸è½ä¸ºç©º'; |
| | | } |
| | | list.push(result); |
| | | list.push(msg); |
| | | return list; |
| | | } |
| | | /** |
| | | * 夿å§åæ¯å¦æ£ç¡® |
| | | */ |
| | | export function validatename(name) { |
| | | var regName = /^[\u4e00-\u9fa5]{2,4}$/; |
| | | if (!regName.test(name)) return false; |
| | | return true; |
| | | } |
| | | /** |
| | | * 夿æ¯å¦ä¸ºæ´æ° |
| | | */ |
| | | export function validatenum(num, type) { |
| | | let regName = /[^\d.]/g; |
| | | if (type == 1) { |
| | | if (!regName.test(num)) return false; |
| | | } else if (type == 2) { |
| | | regName = /[^\d]/g; |
| | | if (!regName.test(num)) return false; |
| | | } |
| | | return true; |
| | | } |
| | | /** |
| | | * 夿æ¯å¦ä¸ºå°æ° |
| | | */ |
| | | export function validatenumord(num, type) { |
| | | let regName = /[^\d.]/g; |
| | | if (type == 1) { |
| | | if (!regName.test(num)) return false; |
| | | } else if (type == 2) { |
| | | regName = /[^\d.]/g; |
| | | if (!regName.test(num)) return false; |
| | | } |
| | | return true; |
| | | } |
| | | // èº«ä»½è¯ |
| | | export const verifyIdCard = (val) => { |
| | | const petter = |
| | | /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; |
| | | // false: 身份è¯ä¸æ£ç¡® |
| | | if (!petter.test(val)) return false; |
| | | // true: èº«ä»½è¯æ£ç¡® |
| | | else return true; |
| | | }; |
| | | |
| | | // å§å |
| | | export const verifyFullName = (val) => { |
| | | const petter = /^[\u4e00-\u9fa5]{1,6}(·[\u4e00-\u9fa5]{1,6}){0,2}$/; |
| | | // false: å§å䏿£ç¡® |
| | | if (!petter.test(val)) return false; |
| | | // true: å§åæ£ç¡® |
| | | else return true; |
| | | }; |
| | | |
| | | // 鮿¿ç¼ç |
| | | export const verifyPostalCode = (val) => { |
| | | const petter = /^[1-9][0-9]{5}$/; |
| | | // false: 鮿¿ç¼ç 䏿£ç¡® |
| | | if (!petter.test(val)) return false; |
| | | // true: 鮿¿ç¼ç æ£ç¡® |
| | | else return true; |
| | | }; |
| | | |
| | | // url |
| | | export const verifyUrl = (val) => { |
| | | const petter = |
| | | /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i; |
| | | // false: url䏿£ç¡® |
| | | if (!petter.test(val)) return false; |
| | | // true: urlæ£ç¡® |
| | | else return true; |
| | | }; |
| | | |
| | | // 车çå· |
| | | export const verifyCarNum = (val) => { |
| | | const petter = |
| | | /^(([京津沪æ¸å豫äºè¾½é»æ¹ç鲿°èæµèµ£éæ¡çæèéåé½è´µç²¤éèå·å®ç¼ä½¿é¢][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪æ¸å豫äºè¾½é»æ¹ç鲿°èæµèµ£éæ¡çæèéåé½è´µç²¤éèå·å®ç¼ä½¿é¢][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9æå¦è¦æ¸¯æ¾³ä½¿é¢]))$/; |
| | | // false: 车çå·ä¸æ£ç¡® |
| | | if (!petter.test(val)) return false; |
| | | // trueï¼è½¦çå·æ£ç¡® |
| | | else return true; |
| | | }; |
| | | // ææ |
| | | export const verifySlash = (val) => { |
| | | const regex = /\//g; |
| | | if (!regex.test(val)) return false; |
| | | else return true; |
| | | }; |
| | | // åç¬¦ä¸²ï¼æ°ç»ï¼å¯¹è±¡é空 |
| | | export const verifyNotNull = (val) => { |
| | | if (val === null || val === undefined || val ==="") { |
| | | return false; |
| | | } |
| | | if (typeof val === "string") { |
| | | return val.trim().length !== 0; |
| | | } |
| | | if (Array.isArray(val)) { |
| | | return val.length !== 0; |
| | | } |
| | | if (typeof val === "object" && val !== null) { |
| | | return Object.keys(val).length !== 0; |
| | | } |
| | | return true; |
| | | }; |
| | | |
| | | export const verifyNull = (val) => { |
| | | return !verifyNotNull(val); |
| | | }; |
| | | /** |
| | | * 夿æ¯å¦ä¸ºç©º |
| | | * å¯ä»¥å¤ææ°ç»å对象 å¦å¤æ"null"ã"undefined"ä¹ä¼è¿åæ¯ç©º |
| | | */ |
| | | export function validatenull(val) { |
| | | if (typeof val == 'boolean') { |
| | | return false; |
| | | } |
| | | if (typeof val == 'number') { |
| | | return false; |
| | | } |
| | | if (val instanceof Array) { |
| | | if (val.length == 0) return true; |
| | | } else if (val instanceof Object) { |
| | | if (JSON.stringify(val) === '{}') return true; |
| | | } else { |
| | | if (val == 'null' || val == null || val == 'undefined' || val == undefined || val == '') return true; |
| | | return false; |
| | | } |
| | | if (typeof val == 'boolean') { |
| | | return false; |
| | | } |
| | | if (typeof val == 'number') { |
| | | return false; |
| | | } |
| | | if (val instanceof Array) { |
| | | if (val.length == 0) return true; |
| | | } else if (val instanceof Object) { |
| | | if (JSON.stringify(val) === '{}') return true; |
| | | } else { |
| | | if (val == 'null' || val == null || val == 'undefined' || val == undefined || val == '') return true; |
| | | return false; |
| | | } |
| | | return false; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form |
| | | ref="dynamincsFormRef" |
| | | :model="ruleForm" |
| | | :label-width="labelWidth" |
| | | :rules="rules" |
| | | > |
| | | <el-row :gutter="row"> |
| | | <el-col |
| | | :xs="ft.col" |
| | | :sm="ft.col" |
| | | :md="ft.col" |
| | | :lg="ft.col" |
| | | :xl="ft.col" |
| | | :class="ft.inputType === 'textarea' ? 'mb20' : 'form-col'" |
| | | v-for="ft in formTemplateData" |
| | | :key="ft.fieldId" |
| | | > |
| | | <el-form-item :label="ft.label" :prop="ft.prop"> |
| | | <!--dateï¼datetimeç»ä»¶--> |
| | | <template v-if="ft.type == 'date'"> |
| | | <el-date-picker |
| | | class="w100" |
| | | v-model="ruleForm[ft.prop]" |
| | | :disabled="ft.disabled || false" |
| | | :type="ft.type" |
| | | clearable |
| | | :format="ft.format" |
| | | :value-format="ft.format" |
| | | :placeholder=" |
| | | ft.placeholder ? ft.placeholder : ` è¯·éæ©${ft.label}` |
| | | " |
| | | > |
| | | </el-date-picker> |
| | | </template> |
| | | <!--dateï¼datetimeç»ä»¶--> |
| | | <template v-if="ft.type == 'datetime'"> |
| | | <el-date-picker |
| | | class="w100" |
| | | v-model="ruleForm[ft.prop]" |
| | | :disabled="ft.disabled || false" |
| | | :type="ft.type" |
| | | clearable |
| | | :format="ft.format" |
| | | :value-format="ft.format" |
| | | :placeholder=" |
| | | ft.placeholder ? ft.placeholder : ` è¯·éæ©${ft.label}` |
| | | " |
| | | > |
| | | </el-date-picker> |
| | | </template> |
| | | <!--timeç»ä»¶--> |
| | | <template v-if="ft.type == 'time'"> |
| | | <el-time-picker |
| | | class="w100" |
| | | clearable |
| | | v-model="ruleForm[ft.prop]" |
| | | :disabled="ft.disabled || false" |
| | | arrow-control |
| | | :default-value="new Date()" |
| | | :value-format="ft.format" |
| | | :placeholder="`è¯·éæ©${ft.label}`" |
| | | > |
| | | </el-time-picker> |
| | | </template> |
| | | <!--åéç»ä»¶--> |
| | | <template v-if="ft.type == 'radio'"> |
| | | <el-radio-group v-model="ruleForm[ft.prop]" :disabled="ft.disabled"> |
| | | <el-radio |
| | | :label="r[props.value]" |
| | | v-for="r in ft.dictData" |
| | | :key="r[props.key]" |
| | | >{{ r[props.label] }} |
| | | </el-radio> |
| | | </el-radio-group> |
| | | </template> |
| | | <!--æ°åç»ä»¶--> |
| | | <template v-if="ft.type == 'number'"> |
| | | <el-input-number |
| | | class="w100" |
| | | v-model.number="ruleForm[ft.prop]" |
| | | controls-position="right" |
| | | clearable |
| | | :disabled="ft.disabled || false" |
| | | ></el-input-number> |
| | | </template> |
| | | <!--å¼å
³ç»ä»¶--> |
| | | <template v-if="ft.type == 'switch'"> |
| | | <el-switch |
| | | v-model="ruleForm[ft.prop]" |
| | | :disabled="ft.disabled || false" |
| | | :active-text="ft.activeText || ''" |
| | | :inactive-text="ft.inactiveText || ''" |
| | | > |
| | | </el-switch> |
| | | </template> |
| | | <!--ææ¬ç»ä»¶--> |
| | | <template v-if="ft.type == 'input'"> |
| | | <el-input |
| | | class="w100" |
| | | :type="ft.inputType || 'text'" |
| | | v-model="ruleForm[ft.prop]" |
| | | :disabled="ft.disabled || false" |
| | | :maxlength="ft.maxlength" |
| | | clearable |
| | | :show-password="ft.inputType === 'password' ? true : false" |
| | | :autosize="{ minRows: 3, maxRows: 6 }" |
| | | :placeholder=" |
| | | ft.placeholder ? ft.placeholder : ` 请è¾å
¥${ft.label}` |
| | | " |
| | | ></el-input> |
| | | </template> |
| | | <!--éæ©å¨--> |
| | | <template v-if="ft.type == 'select'"> |
| | | <el-select |
| | | class="w100" |
| | | v-model="ruleForm[ft.prop]" |
| | | :disabled="ft.disabled || false" |
| | | clearable |
| | | :placeholder=" |
| | | ft.placeholder ? ft.placeholder : ` è¯·éæ©${ft.label}` |
| | | " |
| | | > |
| | | <el-option |
| | | v-for="item in ft.dictData" |
| | | :key="item.key" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | <!--åç
§--> |
| | | <template v-if="ft.type == 'refer'"> |
| | | <vciWebRefer |
| | | :key="ft.prop" |
| | | referType="master" |
| | | :data-key="ft.prop" |
| | | :disabled="ft.disabled || false" |
| | | :display="ft.display || true" |
| | | :referConfig="ft.referConfigTemp || {}" |
| | | :reloadFormKey="(ft.referConfig.useFormKey && ft.referConfig.formValues && ft.referConfig.formValues[ft.referConfig.useFormKey]) || ''" |
| | | :text="ruleForm[ft.referConfig.showProp]" |
| | | :value="ruleForm[ft.prop]" |
| | | @setReferValue="setReferValue" |
| | | :ref="'referFormRef'+ft.prop" |
| | | ></vciWebRefer> |
| | | </template> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </template> |
| | | <script> |
| | | import vciWebRefer from "@/components/refer/vciWebRefer.vue"; |
| | | import { handlerObj } from "@/util/platformUtils"; |
| | | import { verifySlash, verifyNull } from "@/util/validate"; |
| | | export default { |
| | | name: "DynamicsFrom", |
| | | components: { vciWebRefer }, |
| | | props: { |
| | | // è¡¨åæ°ç» |
| | | formData: { |
| | | type: Array, |
| | | default: () => [], |
| | | }, |
| | | // rowï¼æ
æ ¼é´é |
| | | row: { |
| | | type: Number, |
| | | default: 35, |
| | | }, |
| | | // 表åé
ç½® |
| | | labelWidth: { |
| | | type: String, |
| | | default: "120px", |
| | | }, |
| | | formProp: { |
| | | type: Object, |
| | | default: () => {}, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | ruleForm: {}, |
| | | formTemplateData: [], |
| | | rules: {}, |
| | | props: { |
| | | key: "value", |
| | | label: "label", |
| | | value: "value", |
| | | }, |
| | | }; |
| | | }, |
| | | watch: { |
| | | //formPropä¸å®è¦åå¨formDataä¸é¢,å¦åå½±åreferConfigéformValuesçæå»º |
| | | formProp: { |
| | | handler(val) { |
| | | this.ruleForm = val; |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | formData: { |
| | | handler(val) { |
| | | this.rules = handlerObj("prop", "rule", val); |
| | | //this.getDictList(val); |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | ruleForm: { |
| | | handler(val) { |
| | | for (let code of this.formTemplateData) { |
| | | if ( |
| | | code.type == "refer" && |
| | | code.referConfig && |
| | | code.referConfig.useFormKey |
| | | ) { |
| | | code.referConfig.formValues = val; |
| | | |
| | | code.referConfigTemp.options = code.referConfig; |
| | | } |
| | | } |
| | | this.$emit("input", val); |
| | | }, |
| | | deep: true, |
| | | immediate: true, |
| | | }, |
| | | }, |
| | | methods: { |
| | | //æ°æ®åå
¸ |
| | | async getDictList(val) { |
| | | for (let code of val) { |
| | | if (!verifyNull(code.dictData) && code.type == "select") { |
| | | if ( |
| | | verifySlash(code.dictCode) && |
| | | Object.prototype.hasOwnProperty.call(code, "dictCode") |
| | | ) { |
| | | const res = await getlistByCode(code.dictCode); |
| | | if (res.success) { |
| | | const dic = res.data; |
| | | code.dictData = dic.map((d) => { |
| | | return { |
| | | label: d.name, |
| | | key: d.code, |
| | | value: d.id, |
| | | }; |
| | | }); |
| | | } |
| | | } else { |
| | | this.getDicts(code.dictCode) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | const dic = res.obj.datas; |
| | | code.dictData = dic.map((d) => { |
| | | return { |
| | | label: d.name, |
| | | key: d.code, |
| | | value: d.code, |
| | | }; |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | this.$message.error(` æ°æ®åå
¸${code.dictCode}é误`); |
| | | }); |
| | | } |
| | | } |
| | | if (code.type == "refer") { |
| | | if (code.referConfig && code.referConfig.useFormKey) { |
| | | if (verifyNull(code.referConfig.formValuesKey)) { |
| | | code.referConfig.formValuesKey = "ruleForm"; |
| | | } |
| | | code.referConfig.formValues = this[code.referConfig.formValuesKey]; |
| | | } |
| | | code.referConfigTemp = { |
| | | title: code.label, |
| | | showProp: |
| | | code.showProp || code.referConfig.showProp || code.prop + "Name", |
| | | prop: code.prop, |
| | | propMap: code.propMap || {}, |
| | | placeholder: code.placeholder |
| | | ? code.placeholder |
| | | : ` è¯·éæ©` + code.label, |
| | | options: code.referConfig, |
| | | }; |
| | | } |
| | | } |
| | | this.formTemplateData = val; |
| | | }, |
| | | // æå¼åç
§ |
| | | openReferDialog(refer, lable) { |
| | | const e = { refer: refer, lable: lable }; |
| | | this.$refs.referDialogRef.openDialog(e); |
| | | }, |
| | | // éªè¯ |
| | | validate(callback) { |
| | | this.$refs.dynamincsFormRef.validate((valid) => { |
| | | callback(valid, this.ruleForm); |
| | | }); |
| | | }, |
| | | clearValidate() { |
| | | this.$refs.dynamincsFormRef.clearValidate(); |
| | | }, |
| | | // æ¸
餿 ¡éª |
| | | reset() { |
| | | this.$refs.dynamincsFormRef.resetFields(); |
| | | }, |
| | | // æ¸
餿 ¡éª |
| | | resetFields() { |
| | | this.$refs.dynamincsFormRef.resetFields(); |
| | | }, |
| | | setReferValue(data) { |
| | | if (data.prop) { |
| | | this.ruleForm[data.prop] = data.value || ""; |
| | | this.ruleForm[data.showProp] = data.text || ""; |
| | | if (data.propMap) { |
| | | //说æéè¦æ å° |
| | | for (let key in data.propMap) { |
| | | let mapFields = data.propMap[key].split(","); |
| | | let value = []; |
| | | data.rawData.forEach((_item) => { |
| | | var temp; |
| | | if (!_item.extendData) { |
| | | _item.extendData = {}; |
| | | } |
| | | if (mapFields.length == 1) { |
| | | var mapField = mapFields[0]; |
| | | temp = _item[mapField] || _item["extendData"][mapField]; |
| | | } else { |
| | | //æå¤ä¸ª |
| | | var mutiTemp = []; |
| | | mapFields.forEach((_itemField) => { |
| | | mutiTemp.push( |
| | | _item[_itemField] || _item["extendData"][_itemField] |
| | | ); |
| | | }); |
| | | temp = mutiTemp.join(" "); |
| | | } |
| | | if (temp != null && temp != "") { |
| | | value.push(temp); |
| | | } |
| | | }); |
| | | this.ruleForm[key] = value.join(","); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <basic-container show-form> |
| | | <el-button |
| | | class="ml10" |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | @click="onOpenDialogByAdd('add')" |
| | | >æ°å¢</el-button |
| | | > |
| | | <refer-dialog ref="referDialogRef"></refer-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import referDialog from "./referDemoDialog.vue"; |
| | | |
| | | export default { |
| | | name: "referIndex", |
| | | components: { referDialog }, |
| | | methods: { |
| | | // æ°å¢ |
| | | onOpenDialogByAdd(type) { |
| | | this.$refs.referDialogRef.openDialog({ type: type }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped></style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | //表åçå®ä¹ |
| | | export const deferFormTemplate = [ |
| | | { |
| | | prop: "userId", |
| | | fieldId: "userId", |
| | | label: "ç¨æ·åç
§", |
| | | rule: [], |
| | | type: "refer", |
| | | referConfig: { |
| | | showProp: "userIdName", |
| | | type:'user', |
| | | extraParams:{ |
| | | aaa:'111' |
| | | },//æ¥è¯¢æ¡ä»¶ï¼å¯é |
| | | paramForFormKey:'formDeptId', //使ç¨è¡¨åä¸çæ°æ®ä½ä¸ºæ¥è¯¢æ¡ä»¶åæ°,æ²¡ææ¶ä½¿ç¨useFormKey |
| | | formValuesKey:'ruleForm',//页é¢ä¸çè¡¨åæ°æ®å¯¹è±¡åç§°ï¼é»è®¤å¼âformâ |
| | | useFormKey:'deptId',//éè¦ä»formValuesä¸è·åç表ååæ®µ,æ ¹æ®é¨é¨æ åç
§é䏿°æ®å¨ææ¥è¯¢ç¨æ· |
| | | isMuti:true,//æ¯å¦å¤éï¼å¯é |
| | | width: '1000px', |
| | | referBusCode: "user", |
| | | mapProps:{ |
| | | 'personClassifyText':'personClassify' |
| | | }, |
| | | defalutValue: '1', //åç
§é»è®¤å¼ |
| | | defalutText: 'æµè¯é»è®¤å¼' //åç
§é»è®¤æ¾ç¤ºå¼ |
| | | }, |
| | | col: 12, |
| | | value: null, |
| | | }, |
| | | { |
| | | prop: "deptId", |
| | | fieldId: "deptId", |
| | | label: "é¨é¨æ åç
§", |
| | | rule: [], |
| | | type: "refer", |
| | | referConfig: { |
| | | showProp: "deptIdName", |
| | | type: 'dept', |
| | | width: '400px',//å¼¹çªå®½åº¦ï¼å¯é |
| | | height: '500px',//å¼¹çªé«åº¦ï¼å¯é |
| | | extraParams: { |
| | | 'deptId':'tree' |
| | | },//æ¥è¯¢æ¡ä»¶ï¼å¯é |
| | | paramForFormKey: 'formName', //使ç¨è¡¨åä¸çæ°æ®ä½ä¸ºæ¥è¯¢æ¡ä»¶,æ²¡ææ¶ä½¿ç¨useFormKey |
| | | useFormKey: 'defaultId',//éè¦è·åç表ååæ®µ |
| | | isMuti: false,//æ¯å¦å¤éï¼å¯é |
| | | referBusCode: "dept", |
| | | defalutValue: '1742475833773264896', //åç
§é»è®¤å¼ |
| | | defalutText: 'æµè¯é»è®¤å¼11' //åç
§é»è®¤æ¾ç¤ºå¼ |
| | | }, |
| | | col: 12, |
| | | value: null, |
| | | }, |
| | | { |
| | | prop: "deptGridId", |
| | | fieldId: "deptGridId", |
| | | label: "é¨é¨å表åç
§", |
| | | rule: [], |
| | | type: "refer", |
| | | referConfig: { |
| | | showProp: "deptGridIdName", |
| | | type:'deptGrid', |
| | | width:'1500px',//å¼¹çªå®½åº¦ï¼å¯é |
| | | height:'500px',//å¼¹çªé«åº¦ï¼å¯é |
| | | extraParams:{ |
| | | 'deptGridId':'grid' |
| | | },//æ¥è¯¢æ¡ä»¶ï¼å¯é |
| | | isMuti:true,//æ¯å¦å¤éï¼å¯é |
| | | referBusCode: "dept", |
| | | defalutValue: '1', //åç
§é»è®¤å¼ |
| | | defalutText: 'æµè¯é»è®¤å¼222' //åç
§é»è®¤æ¾ç¤ºå¼ |
| | | }, |
| | | col: 12, |
| | | value: null, |
| | | }, |
| | | { |
| | | prop: "treeId", |
| | | fieldId: "treeId", |
| | | label: "æ åç
§", |
| | | rule: [], |
| | | type: "refer", |
| | | referConfig: { |
| | | showProp: "treeIdName", |
| | | type:'tree', |
| | | url:'/org/deptController/referGrid', |
| | | extraParams:{},//æ¥è¯¢æ¡ä»¶ï¼å¯é |
| | | isMuti:false,//æ¯å¦å¤éï¼å¯é |
| | | referBusCode: "dept", |
| | | defalutValue: '1742475833773264896', //åç
§é»è®¤å¼ |
| | | defalutText: '' //åç
§é»è®¤æ¾ç¤ºå¼ |
| | | }, |
| | | col: 12, |
| | | value: null, |
| | | }, |
| | | { |
| | | prop: "gridId", |
| | | fieldId: "gridId", |
| | | label: "å表åç
§", |
| | | rule: [], |
| | | type: "refer", |
| | | referConfig: { |
| | | edit:true, |
| | | showProp: "gridIdName", |
| | | url: "/bd/customerSaleClassifyController/list", |
| | | type: "grid", |
| | | width:'900px',//å¼¹çªå®½åº¦ï¼å¯é |
| | | height:'70%',//å¼¹çªé«åº¦ï¼å¯é |
| | | extraParams:{},//æ¥è¯¢æ¡ä»¶ï¼å¯é |
| | | paramForFormKey:'formDeptId', //使ç¨è¡¨åä¸çæ°æ®ä½ä¸ºæ¥è¯¢æ¡ä»¶,æ²¡ææ¶ä½¿ç¨useFormKey |
| | | useFormKey:'deptId',//éè¦è·åç表ååæ®µ |
| | | isMuti:false,//æ¯å¦å¤éï¼å¯é |
| | | referBusCode: "customerSaleClf", |
| | | tableConfig: { |
| | | cols: [{ |
| | | prop: 'code', |
| | | label: 'ç¼å·', |
| | | sortable: true, |
| | | width: 150, |
| | | search: true, |
| | | formatter: function (d) { |
| | | return d.code || d.extendData.code; |
| | | } |
| | | }, { |
| | | prop: 'name', |
| | | label: 'åç§°', |
| | | sortable: true, |
| | | width: 150, |
| | | search: true, |
| | | formatter: function (d) { |
| | | return d.name || d.extendData.name; |
| | | } |
| | | }, { |
| | | prop: 'description', |
| | | label: 'æè¿°' |
| | | }] |
| | | } |
| | | }, |
| | | col: 12, |
| | | value: null, |
| | | }, |
| | | { |
| | | prop: "defaultId", |
| | | fieldId: "defaultId", |
| | | label: "é»è®¤å表åç
§", |
| | | rule: [], |
| | | type: "refer", |
| | | referConfig: { |
| | | edit:true, |
| | | showProp: "defaultIdName", |
| | | url: "/org/deptController/referGrid", |
| | | width:'60%',//å¼¹çªå®½åº¦ï¼å¯é |
| | | height:'500px',//å¼¹çªé«åº¦ï¼å¯é |
| | | extraParams:{},//æ¥è¯¢æ¡ä»¶ï¼å¯é |
| | | isMuti:false,//æ¯å¦å¤éï¼å¯é |
| | | referBusCode: "dept", |
| | | }, |
| | | col: 12, |
| | | value: null, |
| | | }, |
| | | { |
| | | prop: "classifyId", |
| | | fieldId: "classifyId", |
| | | label: "åç±»åç
§", |
| | | rule: [], |
| | | type: "refer", |
| | | referConfig: { |
| | | edit:true, |
| | | placeholder:'èªå®ä¹placeholder', |
| | | showProp: "classifyIdName", |
| | | type: "classify", |
| | | classifys:[{ |
| | | title:'tab1', |
| | | treeUrl:'/bd/customerClassifyController/referGrid', //åç±»çè·¯å¾ |
| | | treeParams:{ |
| | | tree:'classifyId1' //æ æ¥è¯¢æ¡ä»¶ï¼å¯é |
| | | },//åç±»æ¥è¯¢æ¡ä»¶ |
| | | queryByClassifyUrl:'/org/deptController/referGrid', //'å表' |
| | | queryField:'treeId', //åè¡¨æ°æ®ä¸åç±»çåæ®µ |
| | | classifyValueField:'id', //仿 ä¸è·åçåæ®µ |
| | | },{ |
| | | title:'tab2', |
| | | treeUrl:'/bd/materialClassifyController/referGrid', //åç±»çè·¯å¾ |
| | | treeParams:{ |
| | | tree:'classifyId2' //æ æ¥è¯¢æ¡ä»¶ï¼å¯é |
| | | },//åç±»æ¥è¯¢æ¡ä»¶ |
| | | queryByClassifyUrl:'/org/personController/referGrid', //'å表' |
| | | queryField:'treeName', //åè¡¨æ°æ®ä¸åç±»çåæ®µ |
| | | classifyValueField:'name', //仿 ä¸è·åçåæ®µ |
| | | }], |
| | | width:'70%',//å¼¹çªå®½åº¦ï¼å¯é |
| | | isMuti:false,//æ¯å¦å¤éï¼å¯é |
| | | referBusCode: "", |
| | | url: "/org/deptController/referGrid", //å表çè·¯å¾ |
| | | extraParams:{ |
| | | aa:'classifyId' |
| | | },//æ¥è¯¢æ¡ä»¶ï¼å¯é |
| | | onlyTable:false, //åªæ¾ç¤ºå表,é»è®¤false |
| | | tableConfig: { |
| | | cols: [{ |
| | | prop: 'code', |
| | | label: 'ç¼å·', |
| | | sortable: true, |
| | | width: 150, |
| | | search: true, |
| | | formatter: function (d) { |
| | | return d.code || d.extendData.code; |
| | | } |
| | | }, { |
| | | prop: 'name', |
| | | label: 'åç§°', |
| | | sortable: true, |
| | | width: 150, |
| | | search: true, |
| | | formatter: function (d) { |
| | | return d.name || d.extendData.name; |
| | | } |
| | | }, { |
| | | prop: 'description', |
| | | label: 'æè¿°' |
| | | }] |
| | | } |
| | | }, |
| | | col: 12, |
| | | value: null, |
| | | } |
| | | ]; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <basic-dialog |
| | | :visible.sync="dialog.showDialog" |
| | | :title="dialog.title" |
| | | width="40%" |
| | | :submit-icon="dialog.submitIcon" |
| | | :submit-txt="dialog.submitTxt" |
| | | :loading="dialog.loading" |
| | | @cancel="cancleDialog" |
| | | @submit="submitDialog" |
| | | > |
| | | <!--å¨ææ¨¡æ¿--> |
| | | <d-from |
| | | :form-data="formData" |
| | | :form-prop="ruleForm" |
| | | ref="referDialogFormRef" |
| | | ></d-from> |
| | | </basic-dialog> |
| | | </template> |
| | | <script> |
| | | import { DFrom } from "@/views/test/referDemo/DynamicsFrom"; |
| | | import { deferFormTemplate } from "@/views/test/referDemo/referDemo"; |
| | | import { handlerObj } from "@/util/platformUtils"; |
| | | export default { |
| | | name: "referDemoDialog", |
| | | components:{DFrom}, |
| | | data() { |
| | | return { |
| | | dialog: { |
| | | showDialog: false, |
| | | title: "", |
| | | submitTxt: "", |
| | | submitIcon: "", |
| | | loading: false, |
| | | type: "add", |
| | | }, |
| | | formData: deferFormTemplate, |
| | | ruleForm: {}, |
| | | }; |
| | | }, |
| | | methods: { |
| | | // æå¼å¯¹è¯æ¡ |
| | | openDialog(event) { |
| | | this.dialog.type = event.type; |
| | | if (event.type === "add") { |
| | | this.dialog.title = "æ°å¢"; |
| | | this.dialog.submitTxt = "æ°å¢"; |
| | | this.dialog.submitIcon = "el-icon-plus"; |
| | | this.formData = deferFormTemplate; |
| | | this.ruleForm = handlerObj("prop", "value", deferFormTemplate); |
| | | } else if (event.type === "edit") { |
| | | this.dialog.title = "ä¿®æ¹"; |
| | | this.dialog.submitTxt = "ä¿®æ¹"; |
| | | this.dialog.submitIcon = "el-icon-edit"; |
| | | // å¤çä¿®æ¹é»è¾ |
| | | this.handleEditForm(event.row); |
| | | } |
| | | this.dialog.showDialog = true; |
| | | }, |
| | | // 确认æäº¤ |
| | | submitDialog() { |
| | | this.$refs.referDialogFormRef.validate((valid, form) => { |
| | | console.log("referDialogFormRef"); |
| | | console.log(form); |
| | | }); |
| | | }, |
| | | // åæ¶ |
| | | cancleDialog() { |
| | | this.dialog.loading = false; |
| | | this.dialog.showDialog = false; |
| | | this.formData = deferFormTemplate; |
| | | this.ruleForm = {}; |
| | | this.$refs.referDialogFormRef.reset(); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |