From ebef4e035f5c6a00b291cf50b01ff008fa655609 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期四, 21 三月 2024 13:46:17 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/ProjectWeb/src/api/refer/tree.js | 21
Source/ProjectWeb/src/util/platformUtils.js | 107 +
Source/ProjectWeb/src/views/test/referDemo/index.vue | 29
Source/ProjectWeb/src/util/formatTime.js | 169 +
Source/ProjectWeb/src/views/test/referDemo/referDemoDialog.vue | 77
Source/ProjectWeb/src/api/refer/table.js | 33
Source/ProjectWeb/src/util/validate.js | 547 +++--
Source/ProjectWeb/src/views/test/referDemo/referDemo.js | 226 ++
Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue | 5
Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue | 1944 +++++++++++++++++++
Source/ProjectWeb/src/views/test/referDemo/DynamicsFrom.vue | 349 +++
Source/ProjectWeb/src/components/refer/BasicClassifyRefer.vue | 109 +
Source/ProjectWeb/src/components/dynamic-components/dynamic-custom.vue | 7
Source/ProjectWeb/src/components/dynamic-components/index.vue | 4
Source/ProjectWeb/src/components/refer/vciWebReferTable.vue | 414 ++++
Source/ProjectWeb/src/components/refer/vciWebRefer.vue | 252 ++
Source/ProjectWeb/src/components/refer/vciWebReferDefalut.vue | 427 ++++
Source/ProjectWeb/src/components/refer/orgDeptRefer.vue | 148 +
Source/ProjectWeb/src/components/refer/orgUserRefer.vue | 148 +
Source/ProjectWeb/src/components/refer/vciWebReferClassify.vue | 575 +++++
Source/ProjectWeb/src/components/refer/vciWebReferTree.vue | 260 ++
21 files changed, 5,613 insertions(+), 238 deletions(-)
diff --git a/Source/ProjectWeb/src/api/refer/table.js b/Source/ProjectWeb/src/api/refer/table.js
new file mode 100644
index 0000000..d559582
--- /dev/null
+++ b/Source/ProjectWeb/src/api/refer/table.js
@@ -0,0 +1,33 @@
+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
+ }
+ });
+}
diff --git a/Source/ProjectWeb/src/api/refer/tree.js b/Source/ProjectWeb/src/api/refer/tree.js
new file mode 100644
index 0000000..55b3c55
--- /dev/null
+++ b/Source/ProjectWeb/src/api/refer/tree.js
@@ -0,0 +1,21 @@
+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
+ }
+ });
+}
diff --git a/Source/ProjectWeb/src/components/dynamic-components/dynamic-custom.vue b/Source/ProjectWeb/src/components/dynamic-components/dynamic-custom.vue
index ea61245..f84226e 100644
--- a/Source/ProjectWeb/src/components/dynamic-components/dynamic-custom.vue
+++ b/Source/ProjectWeb/src/components/dynamic-components/dynamic-custom.vue
@@ -28,7 +28,12 @@
paramVOS:{
type:Object,
default: {}
- }
+ },
+ isShow: {
+ //鎵�鍦ㄥ尯鍩熸槸鍚﹀凡鏄剧ず锛岄拡瀵箃ab鍜宑ollapse
+ type: Boolean,
+ default: true
+ },
},
data() {
return {}
diff --git a/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue b/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue
index 0af4863..d3fcc57 100644
--- a/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue
+++ b/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue
@@ -47,6 +47,11 @@
type: Object,
default: {}
},
+ isShow: {
+ //鎵�鍦ㄥ尯鍩熸槸鍚﹀凡鏄剧ず锛岄拡瀵箃ab鍜宑ollapse
+ type: Boolean,
+ default: true
+ },
},
data() {
return {
diff --git a/Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue b/Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue
index be2d99e..33a947f 100644
--- a/Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue
+++ b/Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue
@@ -1,6 +1,19 @@
<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>
@@ -28,14 +41,1939 @@
paramVOS:{
type:Object,
default: {}
+ },
+ isShow: {
+ //鎵�鍦ㄥ尯鍩熸槸鍚﹀凡鏄剧ず锛岄拡瀵箃ab鍜宑ollapse
+ 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>
diff --git a/Source/ProjectWeb/src/components/dynamic-components/index.vue b/Source/ProjectWeb/src/components/dynamic-components/index.vue
index 313370c..82a3dd4 100644
--- a/Source/ProjectWeb/src/components/dynamic-components/index.vue
+++ b/Source/ProjectWeb/src/components/dynamic-components/index.vue
@@ -27,7 +27,7 @@
:areasName="areasName"
:paramVOS="paramVOS"
:isShow="isShow">
-
+sssss
</dynamic-tree>
<dynamic-custom v-else-if="componentVO.uiComponentType=='custom'" :inDialog="inDialog"
:key="areasName+'custom-'+componentVO.oid"
@@ -76,6 +76,8 @@
default: true
},
},
+ created() {
+ }
}
</script>
diff --git a/Source/ProjectWeb/src/components/refer/BasicClassifyRefer.vue b/Source/ProjectWeb/src/components/refer/BasicClassifyRefer.vue
new file mode 100644
index 0000000..0071ba0
--- /dev/null
+++ b/Source/ProjectWeb/src/components/refer/BasicClassifyRefer.vue
@@ -0,0 +1,109 @@
+<!--閫氱敤鐨勫垎绫荤殑鍙傜収锛屽彧鏄樉绀哄垎绫绘爲-->
+<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>
diff --git a/Source/ProjectWeb/src/components/refer/orgDeptRefer.vue b/Source/ProjectWeb/src/components/refer/orgDeptRefer.vue
new file mode 100644
index 0000000..407dbd3
--- /dev/null
+++ b/Source/ProjectWeb/src/components/refer/orgDeptRefer.vue
@@ -0,0 +1,148 @@
+<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>
diff --git a/Source/ProjectWeb/src/components/refer/orgUserRefer.vue b/Source/ProjectWeb/src/components/refer/orgUserRefer.vue
new file mode 100644
index 0000000..611d217
--- /dev/null
+++ b/Source/ProjectWeb/src/components/refer/orgUserRefer.vue
@@ -0,0 +1,148 @@
+<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>
diff --git a/Source/ProjectWeb/src/components/refer/vciWebRefer.vue b/Source/ProjectWeb/src/components/refer/vciWebRefer.vue
new file mode 100644
index 0000000..5f63690
--- /dev/null
+++ b/Source/ProjectWeb/src/components/refer/vciWebRefer.vue
@@ -0,0 +1,252 @@
+<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>
diff --git a/Source/ProjectWeb/src/components/refer/vciWebReferClassify.vue b/Source/ProjectWeb/src/components/refer/vciWebReferClassify.vue
new file mode 100644
index 0000000..55139a3
--- /dev/null
+++ b/Source/ProjectWeb/src/components/refer/vciWebReferClassify.vue
@@ -0,0 +1,575 @@
+<!--鍒嗙被鍙傜収锛屽乏鏍戝彸鍒楄〃-->
+<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>
diff --git a/Source/ProjectWeb/src/components/refer/vciWebReferDefalut.vue b/Source/ProjectWeb/src/components/refer/vciWebReferDefalut.vue
new file mode 100644
index 0000000..00a8097
--- /dev/null
+++ b/Source/ProjectWeb/src/components/refer/vciWebReferDefalut.vue
@@ -0,0 +1,427 @@
+<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>
diff --git a/Source/ProjectWeb/src/components/refer/vciWebReferTable.vue b/Source/ProjectWeb/src/components/refer/vciWebReferTable.vue
new file mode 100644
index 0000000..d6b6eef
--- /dev/null
+++ b/Source/ProjectWeb/src/components/refer/vciWebReferTable.vue
@@ -0,0 +1,414 @@
+<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>
diff --git a/Source/ProjectWeb/src/components/refer/vciWebReferTree.vue b/Source/ProjectWeb/src/components/refer/vciWebReferTree.vue
new file mode 100644
index 0000000..365ce65
--- /dev/null
+++ b/Source/ProjectWeb/src/components/refer/vciWebReferTree.vue
@@ -0,0 +1,260 @@
+<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>
diff --git a/Source/ProjectWeb/src/util/formatTime.js b/Source/ProjectWeb/src/util/formatTime.js
new file mode 100644
index 0000000..807b17d
--- /dev/null
+++ b/Source/ProjectWeb/src/util/formatTime.js
@@ -0,0 +1,169 @@
+/*
+ * 骞�(Y) 鍙敤1-4涓崰浣嶇
+ * 鏈�(m)銆佹棩(d)銆佸皬鏃�(H)銆佸垎(M)銆佺(S) 鍙敤1-2涓崰浣嶇
+ * 鏄熸湡(W) 鍙敤1-3涓崰浣嶇
+ * 瀛e害(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 绗竴瀛e害
+ * formatDate(date, "YYYY-mm-dd HH:MM:SS WWW QQQQ") // 2020-02-09 14:46:12 鏄熸湡鏃� 绗竴瀛e害
+ */
+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(); // 瀛e害
+ 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, // 瀛e害
+ };
+ 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)) {
+ // 杈撳叆涓�涓猀锛屽彧杈撳嚭涓�涓腑鏂囨暟瀛楋紝杈撳叆4涓猀锛屽垯鎷兼帴涓婂瓧绗︿覆
+ format = format.replace(
+ RegExp.$1,
+ RegExp.$1.length == 4 ? "绗�" + quarter[qut] + "瀛e害" : 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 鏄熸湡涓� 绗簩瀛e害
+ */
+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 "澶滈噷濂�";
+ }
+}
diff --git a/Source/ProjectWeb/src/util/platformUtils.js b/Source/ProjectWeb/src/util/platformUtils.js
new file mode 100644
index 0000000..06a255a
--- /dev/null
+++ b/Source/ProjectWeb/src/util/platformUtils.js
@@ -0,0 +1,107 @@
+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鐨勭浉鍚屽瓧娈祂ey
+ * @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;
+}
diff --git a/Source/ProjectWeb/src/util/validate.js b/Source/ProjectWeb/src/util/validate.js
index fb407d8..c4e4de8 100644
--- a/Source/ProjectWeb/src/util/validate.js
+++ b/Source/ProjectWeb/src/util/validate.js
@@ -1,254 +1,335 @@
/**
- * 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;
+};
+// 姝f暣鏁伴獙璇�
+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锛氫笉鍖呭惈缁撴潫涓嬫爣鍐呭锛宻ubstr锛氬寘鍚粨鏉熶笅鏍囧唴瀹�
+ 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 +=
+ "闆跺9璐板弫鑲嗕紞闄嗘煉鎹岀帠".substring(val.substring(i, 1), 1) +
+ unit.substring(i, 1);
+ }
+ // 姝e垯澶勭悊
+ 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: 鎵嬫満鍙风爜姝g‘
+ 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: 鍥藉唴鐢佃瘽鍙风爜姝g‘
+ 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: 鐧诲綍璐﹀彿姝g‘
+ 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: 瀵嗙爜姝g‘
+ 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: 寮哄瘑鐮佷笉姝g‘
+ 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鍦板潃姝g‘
+ 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: 閭姝g‘
+ else return true;
+};
- } else {
- msg = "璇佷欢鍙风爜涓嶈兘涓虹┖";
- }
- list.push(result);
- list.push(msg);
- return list;
-}
-/**
- * 鍒ゆ柇鎵嬫満鍙风爜鏄惁姝g‘
- */
-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;
-}
-/**
- * 鍒ゆ柇濮撳悕鏄惁姝g‘
- */
-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: 韬唤璇佷笉姝g‘
+ 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: 濮撳悕姝g‘
+ else return true;
+};
+
+// 閭斂缂栫爜
+export const verifyPostalCode = (val) => {
+ const petter = /^[1-9][0-9]{5}$/;
+ // false: 閭斂缂栫爜涓嶆纭�
+ if (!petter.test(val)) return false;
+ // true: 閭斂缂栫爜姝g‘
+ 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姝g‘
+ else return true;
+};
+
+// 杞︾墝鍙�
+export const verifyCarNum = (val) => {
+ const petter =
+ /^(([浜触娌笣鍐�璞簯杈介粦婀樼殩椴佹柊鑻忔禉璧i剛妗傜敇鏅嬭挋闄曞悏闂借吹绮ら潚钘忓窛瀹佺惣浣块][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([浜触娌笣鍐�璞簯杈介粦婀樼殩椴佹柊鑻忔禉璧i剛妗傜敇鏅嬭挋闄曞悏闂借吹绮ら潚钘忓窛瀹佺惣浣块][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9鎸傚璀︽腐婢充娇棰哴))$/;
+ // false: 杞︾墝鍙蜂笉姝g‘
+ if (!petter.test(val)) return false;
+ // true锛氳溅鐗屽彿姝g‘
+ 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;
}
diff --git a/Source/ProjectWeb/src/views/test/referDemo/DynamicsFrom.vue b/Source/ProjectWeb/src/views/test/referDemo/DynamicsFrom.vue
new file mode 100644
index 0000000..9d8704a
--- /dev/null
+++ b/Source/ProjectWeb/src/views/test/referDemo/DynamicsFrom.vue
@@ -0,0 +1,349 @@
+<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锛宒atetime缁勪欢-->
+ <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锛宒atetime缁勪欢-->
+ <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閲宖ormValues鐨勬瀯寤�
+ 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>
diff --git a/Source/ProjectWeb/src/views/test/referDemo/index.vue b/Source/ProjectWeb/src/views/test/referDemo/index.vue
new file mode 100644
index 0000000..52154b8
--- /dev/null
+++ b/Source/ProjectWeb/src/views/test/referDemo/index.vue
@@ -0,0 +1,29 @@
+<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>
diff --git a/Source/ProjectWeb/src/views/test/referDemo/referDemo.js b/Source/ProjectWeb/src/views/test/referDemo/referDemo.js
new file mode 100644
index 0000000..cc8d75e
--- /dev/null
+++ b/Source/ProjectWeb/src/views/test/referDemo/referDemo.js
@@ -0,0 +1,226 @@
+//琛ㄥ崟鐨勫畾涔�
+export const deferFormTemplate = [
+ {
+ prop: "userId",
+ fieldId: "userId",
+ label: "鐢ㄦ埛鍙傜収",
+ rule: [],
+ type: "refer",
+ referConfig: {
+ showProp: "userIdName",
+ type:'user',
+ extraParams:{
+ aaa:'111'
+ },//鏌ヨ鏉′欢锛屽彲閫�
+ paramForFormKey:'formDeptId', //浣跨敤琛ㄥ崟涓婄殑鏁版嵁浣滀负鏌ヨ鏉′欢鍙傛暟,娌℃湁鏃朵娇鐢╱seFormKey
+ formValuesKey:'ruleForm',//椤甸潰涓婄殑琛ㄥ崟鏁版嵁瀵硅薄鍚嶇О锛岄粯璁ゅ�尖�榝orm鈥�
+ 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', //浣跨敤琛ㄥ崟涓婄殑鏁版嵁浣滀负鏌ヨ鏉′欢,娌℃湁鏃朵娇鐢╱seFormKey
+ 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', //浣跨敤琛ㄥ崟涓婄殑鏁版嵁浣滀负鏌ヨ鏉′欢,娌℃湁鏃朵娇鐢╱seFormKey
+ 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:'鑷畾涔塸laceholder',
+ 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,
+ }
+];
diff --git a/Source/ProjectWeb/src/views/test/referDemo/referDemoDialog.vue b/Source/ProjectWeb/src/views/test/referDemo/referDemoDialog.vue
new file mode 100644
index 0000000..db97acf
--- /dev/null
+++ b/Source/ProjectWeb/src/views/test/referDemo/referDemoDialog.vue
@@ -0,0 +1,77 @@
+<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>
--
Gitblit v1.9.3