ocpview-plus 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -0
- package/README.md +0 -0
- package/dist/efviewplus.min.esm.js +99954 -0
- package/dist/efviewplus.min.js +142 -0
- package/dist/locale/lang.js +1 -0
- package/dist/locale/zh-CN.js +1 -0
- package/dist/locale/zh-TW.js +1 -0
- package/dist/locale/zh-UG.js +1 -0
- package/dist/style.css +9 -0
- package/dist/styles/efviewplus.css +1 -0
- package/package.json +144 -0
- package/src/components/base/controlbase.vue +191 -0
- package/src/components/base/controlbox.vue +102 -0
- package/src/components/base/index.js +3 -0
- package/src/components/base/load.js +20 -0
- package/src/components/base/probase.js +220 -0
- package/src/components/base/size.js +78 -0
- package/src/components/billbox/billbox.vue +68 -0
- package/src/components/billbox/index.js +2 -0
- package/src/components/cascaderbox/cascaderbox.vue +184 -0
- package/src/components/cascaderbox/index.js +2 -0
- package/src/components/checkbox/checkbox.vue +76 -0
- package/src/components/checkbox/checkgroupbox.vue +104 -0
- package/src/components/checkbox/index.js +3 -0
- package/src/components/colorbox/colorbox.vue +44 -0
- package/src/components/colorbox/index.js +2 -0
- package/src/components/combobox/combobox.vue +220 -0
- package/src/components/combobox/index.js +2 -0
- package/src/components/conditionbox/conditionbase.vue +195 -0
- package/src/components/conditionbox/conditionbox.vue +63 -0
- package/src/components/conditionbox/conditionfilterbox.vue +477 -0
- package/src/components/conditionbox/conditionselectorbox.vue +237 -0
- package/src/components/conditionbox/index.js +5 -0
- package/src/components/conditionbox/queryconditionbox.vue +26 -0
- package/src/components/conditionbox/queryconditionboxbase.vue +124 -0
- package/src/components/conditionbox/searchconditionbox.vue +114 -0
- package/src/components/conditionbox/searchgrid.vue +391 -0
- package/src/components/datebox/datebox.vue +129 -0
- package/src/components/datebox/daterangebox.vue +155 -0
- package/src/components/datebox/index.js +3 -0
- package/src/components/form/baseform.vue +677 -0
- package/src/components/form/detailsbox.vue +487 -0
- package/src/components/form/formbox.vue +29 -0
- package/src/components/form/formcardbox.vue +268 -0
- package/src/components/form/formcardgroupbox.vue +252 -0
- package/src/components/form/formcompro.js +19 -0
- package/src/components/form/formdetail.vue +129 -0
- package/src/components/form/formdetailtwo.vue +302 -0
- package/src/components/form/index.js +8 -0
- package/src/components/form/toolanchor.js +46 -0
- package/src/components/form/workform.vue +168 -0
- package/src/components/grid/basegrid.vue +1061 -0
- package/src/components/grid/editgrid.vue +51 -0
- package/src/components/grid/editgridbase.vue +947 -0
- package/src/components/grid/editgridcard.vue +193 -0
- package/src/components/grid/expandrow.vue +137 -0
- package/src/components/grid/index.js +6 -0
- package/src/components/grid/viewgrid.vue +122 -0
- package/src/components/grid/viewgridbase.vue +1284 -0
- package/src/components/icon/common-icon.vue +53 -0
- package/src/components/icon/eicon.vue +29 -0
- package/src/components/icon/icons.vue +42 -0
- package/src/components/icon/index.js +2 -0
- package/src/components/label/index.js +3 -0
- package/src/components/label/showtext.vue +95 -0
- package/src/components/load/loadcartoon.vue +228 -0
- package/src/components/map/index.js +2 -0
- package/src/components/map/mapbox.vue +348 -0
- package/src/components/masterplate/appendix.vue +586 -0
- package/src/components/masterplate/approval.vue +803 -0
- package/src/components/masterplate/base.vue +985 -0
- package/src/components/masterplate/billasyncimport.vue +614 -0
- package/src/components/masterplate/billconditionbox.vue +224 -0
- package/src/components/masterplate/billconditionsbox.vue +427 -0
- package/src/components/masterplate/billdetailform.vue +990 -0
- package/src/components/masterplate/billimport.vue +263 -0
- package/src/components/masterplate/billquerygrid.vue +316 -0
- package/src/components/masterplate/billsinglegrid.vue +234 -0
- package/src/components/masterplate/birtreport.vue +185 -0
- package/src/components/masterplate/detailbtntoolbar.vue +311 -0
- package/src/components/masterplate/detailsbox.vue +386 -0
- package/src/components/masterplate/editgridcard.vue +222 -0
- package/src/components/masterplate/editgridcard2.vue +109 -0
- package/src/components/masterplate/formcard.vue +106 -0
- package/src/components/masterplate/formcardgroupbox.vue +168 -0
- package/src/components/masterplate/formdetailtwo.vue +356 -0
- package/src/components/masterplate/gridcolset.vue +227 -0
- package/src/components/masterplate/index.js +23 -0
- package/src/components/masterplate/layouttemplate.vue +33 -0
- package/src/components/masterplate/leftlistrightdetails.vue +474 -0
- package/src/components/masterplate/leftlistrightlist.vue +465 -0
- package/src/components/masterplate/lefttreerightdetails.vue +619 -0
- package/src/components/masterplate/levelreport.vue +510 -0
- package/src/components/masterplate/listbtntoolbar.vue +257 -0
- package/src/components/masterplate/listdetails.vue +769 -0
- package/src/components/masterplate/operlog.vue +272 -0
- package/src/components/masterplate/options.vue +110 -0
- package/src/components/masterplate/page.vue +102 -0
- package/src/components/masterplate/promptmessage.vue +74 -0
- package/src/components/masterplate/querybar.vue +490 -0
- package/src/components/masterplate/report.vue +357 -0
- package/src/components/masterplate/rowbtntoolbar.vue +126 -0
- package/src/components/masterplate/simpletree.vue +129 -0
- package/src/components/masterplate/simpleviewgrid.vue +144 -0
- package/src/components/mychart/bar/bar.vue +202 -0
- package/src/components/mychart/basechart.vue +190 -0
- package/src/components/mychart/complexmychart/barline.vue +154 -0
- package/src/components/mychart/gauge/gauge.vue +83 -0
- package/src/components/mychart/index.js +9 -0
- package/src/components/mychart/line/line.vue +202 -0
- package/src/components/mychart/liquidfill/liquidfill.vue +109 -0
- package/src/components/mychart/pie/pie.vue +96 -0
- package/src/components/mychart/radar/radar.vue +122 -0
- package/src/components/mychart/scatter/scatter.vue +76 -0
- package/src/components/numberbox/append.js +11 -0
- package/src/components/numberbox/index.js +3 -0
- package/src/components/numberbox/numberbox.vue +303 -0
- package/src/components/numberbox/numberrangebox.vue +423 -0
- package/src/components/picturebox/filebox.vue +365 -0
- package/src/components/picturebox/index.js +3 -0
- package/src/components/picturebox/picturebox.vue +541 -0
- package/src/components/picturebox/uploadbox.vue +164 -0
- package/src/components/poptagbox/index.js +2 -0
- package/src/components/poptagbox/poptagbox.vue +389 -0
- package/src/components/poptextbox/index.js +2 -0
- package/src/components/poptextbox/poptextbox.vue +601 -0
- package/src/components/radiobox/index.js +2 -0
- package/src/components/radiobox/radiogroupbox.vue +76 -0
- package/src/components/richtextbox/editor.vue +150 -0
- package/src/components/richtextbox/index.js +2 -0
- package/src/components/richtextbox/richtextbox.vue +448 -0
- package/src/components/textbox/index.js +2 -0
- package/src/components/textbox/textbox.vue +98 -0
- package/src/components/timebox/index.js +2 -0
- package/src/components/timebox/timebox.vue +76 -0
- package/src/components/toolbar/ebutton.vue +169 -0
- package/src/components/toolbar/index.js +3 -0
- package/src/components/toolbar/toolbar.vue +446 -0
- package/src/components/tree/basetree.vue +725 -0
- package/src/components/tree/index.js +3 -0
- package/src/components/tree/treedata.vue +51 -0
- package/src/components/tree/treedatabase.vue +189 -0
- package/src/components/upload/billimport.vue +233 -0
- package/src/components/upload/index.js +2 -0
- package/src/components/videobox/index.js +2 -0
- package/src/components/videobox/uploadbox.vue +148 -0
- package/src/components/videobox/videobox.vue +503 -0
- package/src/components/wrichtextbox/editor.vue +219 -0
- package/src/components/wrichtextbox/index.js +2 -0
- package/src/components/wrichtextbox/wrichtextbox.vue +63 -0
- package/src/index.js +215 -0
- package/src/locale/format.js +51 -0
- package/src/locale/index.js +63 -0
- package/src/locale/lang/zh-CN.js +123 -0
- package/src/locale/lang/zh-TW.js +114 -0
- package/src/locale/lang/zh-UG.js +115 -0
- package/src/locale/lang.js +15 -0
- package/src/method/case/case.js +1180 -0
- package/src/method/config/queryconfig.js +24 -0
- package/src/method/const/const.js +815 -0
- package/src/method/index.js +8 -0
- package/src/static/excel/exportexcel.js +627 -0
- package/src/static/iview/coustom.js +463 -0
- package/src/store/index.js +19 -0
- package/src/store/modules/app.js +53 -0
- package/src/styles/README.md +3 -0
- package/src/styles/common.less +75 -0
- package/src/styles/components/anchor.less +74 -0
- package/src/styles/components/approval.less +136 -0
- package/src/styles/components/button.less +208 -0
- package/src/styles/components/card.less +51 -0
- package/src/styles/components/content.less +38 -0
- package/src/styles/components/font.less +314 -0
- package/src/styles/components/form.less +72 -0
- package/src/styles/components/iconfont/fonts/iconfont.less +1376 -0
- package/src/styles/components/iconfont/fonts/iconfont.svg +699 -0
- package/src/styles/components/iconfont/fonts/iconfont.ttf +0 -0
- package/src/styles/components/iconfont/fonts/iconfont.woff +0 -0
- package/src/styles/components/iconfont/fonts/iconfont.woff2 +0 -0
- package/src/styles/components/index.less +16 -0
- package/src/styles/components/input.less +290 -0
- package/src/styles/components/modal.less +203 -0
- package/src/styles/components/page.less +340 -0
- package/src/styles/components/select.less +361 -0
- package/src/styles/components/steps.less +367 -0
- package/src/styles/components/table.less +544 -0
- package/src/styles/components/tabs.less +249 -0
- package/src/styles/components/upload.less +83 -0
- package/src/styles/custom.less +67 -0
- package/src/styles/index.less +6 -0
- package/src/styles/pack.less +6 -0
- package/src/utils/EfuMessenger.js +155 -0
- package/src/utils/assist.js +353 -0
- package/src/utils/index.js +1 -0
- package/src/utils/random_str.js +10 -0
package/package.json
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ocpview-plus",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"title": "efviewPlus",
|
|
5
|
+
"description": "A high quality Service UI components Library with Vue.js",
|
|
6
|
+
"homepage": "",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"efview",
|
|
9
|
+
"iview",
|
|
10
|
+
"vue",
|
|
11
|
+
"viewui",
|
|
12
|
+
"viewuiplus",
|
|
13
|
+
"vue.js",
|
|
14
|
+
"component",
|
|
15
|
+
"components",
|
|
16
|
+
"ui",
|
|
17
|
+
"framework"
|
|
18
|
+
],
|
|
19
|
+
"main": "dist/efviewplus.min.js",
|
|
20
|
+
"typings": "types/index.d.ts",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"src",
|
|
24
|
+
"types"
|
|
25
|
+
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"dev": "vue-cli-service serve",
|
|
28
|
+
"build": "npm run build:prod && npm run build:style && npm run build:lang",
|
|
29
|
+
"build:style": "gulp --gulpfile build/build-style.js",
|
|
30
|
+
"build:prod": "vite build",
|
|
31
|
+
"build:lang": "vite build --config build/vite.lang.config.js",
|
|
32
|
+
"lint": "vue-cli-service lint --fix"
|
|
33
|
+
},
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": ""
|
|
37
|
+
},
|
|
38
|
+
"author": "Tianhao",
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": ""
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@vueup/vue-quill": "^1.0.0-alpha.40",
|
|
45
|
+
"@wangeditor/editor": "^5.1.23",
|
|
46
|
+
"@wangeditor/editor-for-vue": "^5.1.12",
|
|
47
|
+
"async-validator": "^3.3.0",
|
|
48
|
+
"autoprefixer-loader": "^3.2.0",
|
|
49
|
+
"axios": "^0.18.0",
|
|
50
|
+
"deepmerge": "^2.2.1",
|
|
51
|
+
"echarts": "^4.3.0",
|
|
52
|
+
"echarts-liquidfill": "^2.0.0",
|
|
53
|
+
"element-resize-detector": "^1.2.0",
|
|
54
|
+
"file-saver": "^2.0.5",
|
|
55
|
+
"good-storage": "^1.1.1",
|
|
56
|
+
"html2canvas": "^1.4.1",
|
|
57
|
+
"jquery": "^3.3.1",
|
|
58
|
+
"js-cookie": "^2.2.0",
|
|
59
|
+
"js-md5": "^0.7.3",
|
|
60
|
+
"ol": "^6.7.0",
|
|
61
|
+
"pako": "^1.0.3",
|
|
62
|
+
"pdfobject": "^2.3.0",
|
|
63
|
+
"popper.js": "^1.14.6",
|
|
64
|
+
"view-ui-plus": "^1.3.17",
|
|
65
|
+
"viewerjs": "^1.11.6",
|
|
66
|
+
"vue-draggable-plus": "^0.5.0",
|
|
67
|
+
"vuex": "^4.0.2",
|
|
68
|
+
"xlsx": "^0.18.5",
|
|
69
|
+
"xlsx-style-vite": "^0.0.2"
|
|
70
|
+
},
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"@vitejs/plugin-vue": "^1.9.3",
|
|
73
|
+
"@vue/cli-plugin-babel": "~4.5.0",
|
|
74
|
+
"@vue/cli-plugin-eslint": "~4.5.0",
|
|
75
|
+
"@vue/cli-service": "~4.5.0",
|
|
76
|
+
"@vue/compiler-sfc": "^3.0.0",
|
|
77
|
+
"autoprefixer-loader": "^3.2.0",
|
|
78
|
+
"babel-cli": "^6.26.0",
|
|
79
|
+
"babel-core": "^6.26.0",
|
|
80
|
+
"babel-eslint": "^10.1.0",
|
|
81
|
+
"babel-helper-vue-jsx-merge-props": "^2.0.3",
|
|
82
|
+
"babel-loader": "^7.1.5",
|
|
83
|
+
"babel-plugin-dynamic-import-node": "^1.2.0",
|
|
84
|
+
"babel-plugin-import": "^1.13.3",
|
|
85
|
+
"babel-plugin-syntax-jsx": "^6.18.0",
|
|
86
|
+
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
87
|
+
"babel-plugin-transform-es5-property-mutators": "^6.24.1",
|
|
88
|
+
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
|
89
|
+
"babel-plugin-transform-runtime": "^6.23.0",
|
|
90
|
+
"babel-plugin-transform-vue-jsx": "^3.7.0",
|
|
91
|
+
"babel-preset-env": "^1.6.1",
|
|
92
|
+
"babel-preset-stage-3": "^6.24.1",
|
|
93
|
+
"babel-runtime": "^6.26.0",
|
|
94
|
+
"chai": "^4.2.0",
|
|
95
|
+
"compression-webpack-plugin": "^1.1.12",
|
|
96
|
+
"copy-webpack-plugin": "^6.4.1",
|
|
97
|
+
"cross-env": "^5.2.0",
|
|
98
|
+
"css-loader": "^0.28.10",
|
|
99
|
+
"eslint": "^6.7.2",
|
|
100
|
+
"eslint-plugin-vue": "^7.0.0-0",
|
|
101
|
+
"extract-text-webpack-plugin": "^2.1.2",
|
|
102
|
+
"file-loader": "^1.1.11",
|
|
103
|
+
"friendly-errors-webpack-plugin": "^1.6.1",
|
|
104
|
+
"gulp": "^4.0.2",
|
|
105
|
+
"gulp-autoprefixer": "^8.0.0",
|
|
106
|
+
"gulp-clean-css": "^4.3.0",
|
|
107
|
+
"gulp-less": "^4.0.1",
|
|
108
|
+
"gulp-rename": "^2.0.0",
|
|
109
|
+
"html-loader": "^0.5.5",
|
|
110
|
+
"html-webpack-plugin": "^3.0.6",
|
|
111
|
+
"karma": "^2.0.5",
|
|
112
|
+
"karma-chrome-launcher": "^2.2.0",
|
|
113
|
+
"karma-coverage": "^1.1.1",
|
|
114
|
+
"karma-mocha": "^1.3.0",
|
|
115
|
+
"karma-sinon-chai": "^1.3.3",
|
|
116
|
+
"karma-sourcemap-loader": "^0.3.7",
|
|
117
|
+
"karma-spec-reporter": "^0.0.32",
|
|
118
|
+
"karma-webpack": "^2.0.13",
|
|
119
|
+
"less": "^2.7.3",
|
|
120
|
+
"less-loader": "^6.2.0",
|
|
121
|
+
"lint-staged": "^10.5.4",
|
|
122
|
+
"lolex": "^2.7.5",
|
|
123
|
+
"mocha": "^5.0.4",
|
|
124
|
+
"rollup-plugin-visualizer": "^5.12.0",
|
|
125
|
+
"script-loader": "^0.7.2",
|
|
126
|
+
"sinon": "^4.4.2",
|
|
127
|
+
"sinon-chai": "^3.3.0",
|
|
128
|
+
"style-loader": "^0.20.2",
|
|
129
|
+
"tslint": "^5.14.0",
|
|
130
|
+
"typescript": "^3.3.4000",
|
|
131
|
+
"uglifyjs-webpack-plugin": "^1.3.0",
|
|
132
|
+
"url-loader": "^1.1.2",
|
|
133
|
+
"vite": "^2.6.4",
|
|
134
|
+
"vite-plugin-compression2": "^1.3.0",
|
|
135
|
+
"vite-plugin-importer": "^0.2.5",
|
|
136
|
+
"vue": "^3.2.47",
|
|
137
|
+
"vue-hot-reload-api": "^2.3.4",
|
|
138
|
+
"vue-html-loader": "^1.2.4",
|
|
139
|
+
"vue-loader": "^17.0.0",
|
|
140
|
+
"vue-router": "^4.0.14",
|
|
141
|
+
"vue-style-loader": "^4.1.3",
|
|
142
|
+
"vue-template-compiler": "^2.6.14"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import size from '@/components/base/size';
|
|
3
|
+
export default {
|
|
4
|
+
mixins: [size],
|
|
5
|
+
data() {
|
|
6
|
+
return {
|
|
7
|
+
globalConfig: {
|
|
8
|
+
label: '',
|
|
9
|
+
name: '',
|
|
10
|
+
readOnly: false,
|
|
11
|
+
visible: true,
|
|
12
|
+
size: 'default',
|
|
13
|
+
valueChanged: '',
|
|
14
|
+
placeholder: null,
|
|
15
|
+
place: '',
|
|
16
|
+
required: false,
|
|
17
|
+
},
|
|
18
|
+
myConfig: {},
|
|
19
|
+
value: '',
|
|
20
|
+
oldValue: '',
|
|
21
|
+
hackReset: true,
|
|
22
|
+
showTooltip: false,
|
|
23
|
+
isEnter:false
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
config: {
|
|
28
|
+
type: Object,
|
|
29
|
+
default: () => {},
|
|
30
|
+
},
|
|
31
|
+
fatherValue: {
|
|
32
|
+
type: [String, Number, Array],
|
|
33
|
+
default: '',
|
|
34
|
+
},
|
|
35
|
+
readOnly:{
|
|
36
|
+
type:Boolean,
|
|
37
|
+
default:false
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
created() {
|
|
41
|
+
this.init();
|
|
42
|
+
},
|
|
43
|
+
methods: {
|
|
44
|
+
init() {
|
|
45
|
+
// 获取默认属性
|
|
46
|
+
this.myConfig = Object.assign({}, this.globalConfig, this.myConfig);
|
|
47
|
+
|
|
48
|
+
// 获取动态属性
|
|
49
|
+
if (this.config) {
|
|
50
|
+
this.myConfig = Object.assign({}, this.myConfig, this.config);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (this.customInit) {
|
|
54
|
+
this.customInit();
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
_fatherValueToValue(value) {
|
|
58
|
+
if (this.fatherValueToValue) {
|
|
59
|
+
return this.fatherValueToValue(value);
|
|
60
|
+
} else {
|
|
61
|
+
/*if (!value && value !== 0) {
|
|
62
|
+
return this.myConfig.defaultValue;
|
|
63
|
+
} else {
|
|
64
|
+
return value;
|
|
65
|
+
}*/
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
_valueToFatherValue() {
|
|
70
|
+
let curValue = this.value;
|
|
71
|
+
if (this.valueToFatherValue) {
|
|
72
|
+
return this.valueToFatherValue();
|
|
73
|
+
} else {
|
|
74
|
+
let para = {};
|
|
75
|
+
para.value = curValue;
|
|
76
|
+
return para;
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
keyDown(value) {
|
|
80
|
+
let name = value + 'KeyDown';
|
|
81
|
+
if (this[name]) {
|
|
82
|
+
this[name]();
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
enterKeyDown() {
|
|
86
|
+
if (this.customEnterKeyDown) {
|
|
87
|
+
this.customEnterKeyDown();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
let self= this;
|
|
91
|
+
this.$nextTick(() => {
|
|
92
|
+
let para = {};
|
|
93
|
+
para.controlName = self.myConfig.name;
|
|
94
|
+
if (self.myConfig.sname) {
|
|
95
|
+
para.controlName = self.myConfig.sname;
|
|
96
|
+
}
|
|
97
|
+
para.name = 'enterKeyDown';
|
|
98
|
+
self.$emit('doAction', para);
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
setFatherValue(e) {
|
|
102
|
+
let flag = true;
|
|
103
|
+
let para = this._valueToFatherValue();
|
|
104
|
+
para.name = this.myConfig.name;
|
|
105
|
+
if (this.myConfig.valueChanged) {
|
|
106
|
+
if (
|
|
107
|
+
para.value !== this.oldValue ||
|
|
108
|
+
para.svalue !== this.oldSvalue ||
|
|
109
|
+
para.evalue !== this.oldEvalue
|
|
110
|
+
) {
|
|
111
|
+
flag = this.myConfig.valueChanged(para);
|
|
112
|
+
if (flag === undefined) {
|
|
113
|
+
flag = true;
|
|
114
|
+
}
|
|
115
|
+
} else {
|
|
116
|
+
flag = false;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
if (flag) {
|
|
120
|
+
if (this.setFatherValueSuccess) {
|
|
121
|
+
this.setFatherValueSuccess(para);
|
|
122
|
+
} else {
|
|
123
|
+
this.$emit('inputValue', para);
|
|
124
|
+
}
|
|
125
|
+
this.$nextTick(() => {
|
|
126
|
+
if (this.isEnter) {
|
|
127
|
+
if (this.customEnterKeyDown) {
|
|
128
|
+
this.customEnterKeyDown(e);
|
|
129
|
+
} else {
|
|
130
|
+
if (this.$parent.enterKeyDown) {
|
|
131
|
+
this.$parent.enterKeyDown();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
this.isEnter = false;
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
} else {
|
|
138
|
+
if (this.setFatherValueFail) {
|
|
139
|
+
this.setFatherValueFail(e);
|
|
140
|
+
} else {
|
|
141
|
+
this.$nextTick(() => {
|
|
142
|
+
this.value = this.oldValue;
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
_setFatherValue(value) {
|
|
148
|
+
if (!value && value !== 0) {
|
|
149
|
+
value = this.myConfig.defaultValue;
|
|
150
|
+
}
|
|
151
|
+
this.value = value;
|
|
152
|
+
this.setFatherValue();
|
|
153
|
+
},
|
|
154
|
+
setPro(obj) {
|
|
155
|
+
if (this.setCustomPro) {
|
|
156
|
+
obj = this.setCustomPro(obj);
|
|
157
|
+
}
|
|
158
|
+
if (obj) {
|
|
159
|
+
this.myConfig = Object.assign({}, this.myConfig, obj);
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
setReadOnly(value) {
|
|
163
|
+
let obj = {};
|
|
164
|
+
obj.readOnly = value;
|
|
165
|
+
if (obj.readOnly === false) {
|
|
166
|
+
if (this.config.readOnly !== true) {
|
|
167
|
+
this.setPro(obj);
|
|
168
|
+
}
|
|
169
|
+
} else {
|
|
170
|
+
this.setPro(obj);
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
getPro(name) {
|
|
174
|
+
return this.myConfig[name];
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
},
|
|
178
|
+
watch: {
|
|
179
|
+
fatherValue: {
|
|
180
|
+
handler(newValue) {
|
|
181
|
+
this.value = this._fatherValueToValue(newValue);
|
|
182
|
+
this.oldValue = this.value;
|
|
183
|
+
if (this.watchCustomFatherValue) {
|
|
184
|
+
this.watchCustomFatherValue();
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
immediate: true,
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
};
|
|
191
|
+
</script>
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="hackReset" @keydown.enter="keyDown('enter')">
|
|
3
|
+
<template v-if="type === 'Divider'">
|
|
4
|
+
<Divider
|
|
5
|
+
:orientation="config.orientation"
|
|
6
|
+
:dashed="config.dashed"
|
|
7
|
+
:type="config.vtype"
|
|
8
|
+
:id="config.id"
|
|
9
|
+
:style="config.style"
|
|
10
|
+
>
|
|
11
|
+
<template v-if="!!config.label || !!config.hide " #default>
|
|
12
|
+
<span v-if="!!config.label" v-text="config.label"> </span>
|
|
13
|
+
<div v-if="!!config.hide">
|
|
14
|
+
<p v-if="hideFlag" @click.stop="hide" class="efuture-hide-text">
|
|
15
|
+
<Icon type="ios-arrow-up" />
|
|
16
|
+
<span>
|
|
17
|
+
收起查询条件
|
|
18
|
+
</span>
|
|
19
|
+
</p>
|
|
20
|
+
<p v-else @click.stop="hide" class="efuture-hide-text"><Icon type="ios-arrow-down" />
|
|
21
|
+
<span>展开查询条件</span>
|
|
22
|
+
</p>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
</Divider>
|
|
26
|
+
</template>
|
|
27
|
+
<template v-else-if="type === 'NumberRangeBox'">
|
|
28
|
+
<NumberRangeBox
|
|
29
|
+
ref="myControl"
|
|
30
|
+
:fatherSvalue="svalue"
|
|
31
|
+
:fatherEvalue="evalue"
|
|
32
|
+
@inputValue="input"
|
|
33
|
+
:config="config"
|
|
34
|
+
></NumberRangeBox>
|
|
35
|
+
</template>
|
|
36
|
+
<template v-else-if="type === 'DateRangeBox'">
|
|
37
|
+
<DateRangeBox
|
|
38
|
+
ref="myControl"
|
|
39
|
+
:fatherSvalue="svalue"
|
|
40
|
+
:fatherEvalue="evalue"
|
|
41
|
+
@inputValue="input"
|
|
42
|
+
:config="config"
|
|
43
|
+
></DateRangeBox>
|
|
44
|
+
</template>
|
|
45
|
+
<template v-else-if="type === 'PopTextBox'">
|
|
46
|
+
<PopTextBox
|
|
47
|
+
ref="myControl"
|
|
48
|
+
:fatherValue="value"
|
|
49
|
+
:fatherText="text"
|
|
50
|
+
@inputValue="input"
|
|
51
|
+
:config="config"
|
|
52
|
+
></PopTextBox>
|
|
53
|
+
</template>
|
|
54
|
+
<template v-else-if="type === 'PictureBox'">
|
|
55
|
+
<PictureBox
|
|
56
|
+
ref="myControl"
|
|
57
|
+
v-if="config.multiSelect !== true"
|
|
58
|
+
:fatherValue="value"
|
|
59
|
+
@inputValue="input"
|
|
60
|
+
:config="config"
|
|
61
|
+
:readOnly="readOnly"
|
|
62
|
+
:showStyle="config.showStyle"
|
|
63
|
+
></PictureBox>
|
|
64
|
+
<PictureBox
|
|
65
|
+
ref="myControl"
|
|
66
|
+
v-else
|
|
67
|
+
:config="config"
|
|
68
|
+
:readOnly="readOnly"
|
|
69
|
+
:showStyle="config.showStyle"
|
|
70
|
+
></PictureBox>
|
|
71
|
+
</template>
|
|
72
|
+
<template v-else-if="type === 'VideoBox'">
|
|
73
|
+
<VideoBox
|
|
74
|
+
ref="myControl"
|
|
75
|
+
v-if="config.multiSelect !== true"
|
|
76
|
+
:fatherValue="value"
|
|
77
|
+
@inputValue="input"
|
|
78
|
+
:config="config"
|
|
79
|
+
:readOnly="readOnly"
|
|
80
|
+
:showStyle="config.showStyle"
|
|
81
|
+
></VideoBox>
|
|
82
|
+
<VideoBox
|
|
83
|
+
ref="myControl"
|
|
84
|
+
v-else
|
|
85
|
+
:config="config"
|
|
86
|
+
:readOnly="readOnly"
|
|
87
|
+
:showStyle="config.showStyle"
|
|
88
|
+
></VideoBox>
|
|
89
|
+
</template>
|
|
90
|
+
<template v-else>
|
|
91
|
+
<component :is="type" ref="myControl" :fatherValue="value" :readOnly="readOnly" @inputValue="input" :config="config"/>
|
|
92
|
+
</template>
|
|
93
|
+
</div>
|
|
94
|
+
</template>
|
|
95
|
+
|
|
96
|
+
<script>
|
|
97
|
+
import proBase from './probase';
|
|
98
|
+
export default {
|
|
99
|
+
name: 'ControlBox',
|
|
100
|
+
mixins: [proBase],
|
|
101
|
+
};
|
|
102
|
+
</script>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
name:'load',
|
|
3
|
+
data () {
|
|
4
|
+
return {
|
|
5
|
+
loadingtext:'加载'
|
|
6
|
+
};
|
|
7
|
+
},
|
|
8
|
+
methods:{
|
|
9
|
+
showLoading () {
|
|
10
|
+
this.$Spin.show({
|
|
11
|
+
render: (h) => {
|
|
12
|
+
return h('div', '正在'+this.loadingtext+',请耐心等待...');
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
hideLoading(){
|
|
17
|
+
this.$Spin.hide();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
name: 'probase',
|
|
3
|
+
data() {
|
|
4
|
+
return {
|
|
5
|
+
value: '',
|
|
6
|
+
text: '',
|
|
7
|
+
svalue: '',
|
|
8
|
+
evalue: '',
|
|
9
|
+
type: '',
|
|
10
|
+
hackReset: true,
|
|
11
|
+
hideFlag:false
|
|
12
|
+
};
|
|
13
|
+
},
|
|
14
|
+
created() {
|
|
15
|
+
this.type = this.config.type;
|
|
16
|
+
if (this.type === 'Divider') {
|
|
17
|
+
if (!this.config.style) {
|
|
18
|
+
this.config.style = 'margin:12px 0';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
mounted () {
|
|
23
|
+
if(this.autofocus) {
|
|
24
|
+
this.$nextTick(() =>{
|
|
25
|
+
this.setFocus(true);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
methods: {
|
|
30
|
+
input(obj) {
|
|
31
|
+
// 去除字符串左右空格
|
|
32
|
+
if (obj) {
|
|
33
|
+
let proList = ['text', 'value', 'svalue', 'evalue'];
|
|
34
|
+
proList.forEach(el => {
|
|
35
|
+
if (obj[el] !== undefined) {
|
|
36
|
+
if (typeof obj[el] === 'string') {
|
|
37
|
+
obj[el] = obj[el].trim();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
if (obj.value !== undefined) {
|
|
43
|
+
this.value = obj.value;
|
|
44
|
+
}
|
|
45
|
+
if (obj.text !== undefined) {
|
|
46
|
+
this.text = obj.text;
|
|
47
|
+
}
|
|
48
|
+
if (obj.svalue !== undefined) {
|
|
49
|
+
this.svalue = obj.svalue;
|
|
50
|
+
}
|
|
51
|
+
if (obj.evalue !== undefined) {
|
|
52
|
+
this.evalue = obj.evalue;
|
|
53
|
+
}
|
|
54
|
+
if (this.editIndex !== '') {
|
|
55
|
+
obj.editIndex = this.editIndex;
|
|
56
|
+
}
|
|
57
|
+
this.$emit('inputValue', obj);
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
setPro(value) {
|
|
61
|
+
this.$refs.myControl.setPro(value);
|
|
62
|
+
},
|
|
63
|
+
setReadOnly(value) {
|
|
64
|
+
if (this.$refs.myControl.setReadOnly) {
|
|
65
|
+
this.$refs.myControl.setReadOnly(value);
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
getPro(name) {
|
|
69
|
+
return this.$refs.myControl.getPro(name);
|
|
70
|
+
},
|
|
71
|
+
getValue() {
|
|
72
|
+
if (this.config.textName) {
|
|
73
|
+
let obj = {};
|
|
74
|
+
obj.text = this.text;
|
|
75
|
+
obj.value = this.value;
|
|
76
|
+
return obj;
|
|
77
|
+
} else if (this.config.sname) {
|
|
78
|
+
let obj = {};
|
|
79
|
+
obj.svalue = this.svalue;
|
|
80
|
+
obj.evalue = this.evalue;
|
|
81
|
+
return obj;
|
|
82
|
+
} else {
|
|
83
|
+
return this.value;
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
setValue(value) {
|
|
87
|
+
this.value = value;
|
|
88
|
+
},
|
|
89
|
+
setText(value) {
|
|
90
|
+
this.text = value;
|
|
91
|
+
},
|
|
92
|
+
setSvalue(svalue) {
|
|
93
|
+
this.svalue = svalue;
|
|
94
|
+
},
|
|
95
|
+
setEvalue(evalue) {
|
|
96
|
+
this.evalue = evalue;
|
|
97
|
+
},
|
|
98
|
+
reset() {
|
|
99
|
+
this.hackReset = false;
|
|
100
|
+
this.$nextTick(() => {
|
|
101
|
+
this.hackReset = true;
|
|
102
|
+
});
|
|
103
|
+
},
|
|
104
|
+
setFocus(value) {
|
|
105
|
+
if (this.$refs.myControl && this.$refs.myControl.setFocus) {
|
|
106
|
+
this.$refs.myControl.setFocus(value);
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
keyDown(value) {
|
|
110
|
+
let name = value + 'KeyDown';
|
|
111
|
+
if (this[name]) {
|
|
112
|
+
this[name]();
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
enterKeyDown() {
|
|
116
|
+
let self= this;
|
|
117
|
+
let para = {};
|
|
118
|
+
para.controlName = self.config.name;
|
|
119
|
+
if (self.config.sname) {
|
|
120
|
+
para.controlName = self.config.sname;
|
|
121
|
+
}
|
|
122
|
+
para.name = 'enterKeyDown';
|
|
123
|
+
self.$emit('doAction', para);
|
|
124
|
+
},
|
|
125
|
+
doAction (obj) {
|
|
126
|
+
this.$emit('doAction' , obj);
|
|
127
|
+
},
|
|
128
|
+
hide() {
|
|
129
|
+
this.hideFlag = !this.hideFlag;
|
|
130
|
+
let obj = {};
|
|
131
|
+
obj.name = 'hideItem'
|
|
132
|
+
obj.value = this.hideFlag;
|
|
133
|
+
if (this.config.doHide) {
|
|
134
|
+
this.config.doHide(obj);
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
setHide(value) {
|
|
138
|
+
this.hideFlag = value;
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
props: {
|
|
142
|
+
config: {
|
|
143
|
+
type: Object,
|
|
144
|
+
default: null,
|
|
145
|
+
},
|
|
146
|
+
valueData: {
|
|
147
|
+
type: Object,
|
|
148
|
+
default() {
|
|
149
|
+
return {};
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
autofocus: {
|
|
153
|
+
type: Boolean,
|
|
154
|
+
default: false,
|
|
155
|
+
},
|
|
156
|
+
readOnly:{
|
|
157
|
+
type:Boolean,
|
|
158
|
+
default: false,
|
|
159
|
+
},
|
|
160
|
+
editIndex:{
|
|
161
|
+
type:[String,Number],
|
|
162
|
+
default: '',
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
watch: {
|
|
166
|
+
valueData: {
|
|
167
|
+
handler(data) {
|
|
168
|
+
if (
|
|
169
|
+
this.config.textName &&
|
|
170
|
+
data[this.config.textName] !== undefined
|
|
171
|
+
) {
|
|
172
|
+
if (this.text !== data[this.config.textName]) {
|
|
173
|
+
this.text = data[this.config.textName];
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
let flag = false;
|
|
177
|
+
if (
|
|
178
|
+
this.config.sname &&
|
|
179
|
+
data[this.config.sname] !== undefined
|
|
180
|
+
) {
|
|
181
|
+
flag = true;
|
|
182
|
+
if (this.svalue !== data[this.config.sname]) {
|
|
183
|
+
this.svalue = data[this.config.sname];
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
if (
|
|
187
|
+
this.config.ename &&
|
|
188
|
+
data[this.config.sname] !== undefined
|
|
189
|
+
) {
|
|
190
|
+
if (this.evalue !== data[this.config.ename]) {
|
|
191
|
+
this.evalue = data[this.config.ename];
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (!flag && this.config.name && data[this.config.name] !== undefined) {
|
|
195
|
+
if (this.value !== data[this.config.name]) {
|
|
196
|
+
this.value = data[this.config.name];
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
if (this.config.proName) {
|
|
201
|
+
if (this.$refs.myControl) {
|
|
202
|
+
this.$refs.myControl.setProValue(data);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
deep: true,
|
|
207
|
+
immediate: true,
|
|
208
|
+
},
|
|
209
|
+
autofocus: {
|
|
210
|
+
handler(newValue) {
|
|
211
|
+
if (newValue) {
|
|
212
|
+
this.setFocus(true);
|
|
213
|
+
} else {
|
|
214
|
+
this.setFocus(false);
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
immediate: true,
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
};
|