@gonsin/gview 1.0.1 → 1.0.2
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/README.md +66 -13
- package/dist/fonts/element-icons.313f7dac.woff +0 -0
- package/dist/fonts/element-icons.45201881.ttf +0 -0
- package/dist/index.js +335 -0
- package/package.json +6 -2
- package/.browserslistrc +0 -2
- package/babel.config.js +0 -5
- package/gonsin-gview-1.0.1.tgz +0 -0
- package/postcss.config.js +0 -5
- package/public/css/theme/animate.min.css +0 -7
- package/public/css/theme/brownishTheme.css +0 -10
- package/public/css/theme/coffeeTheme.css +0 -10
- package/public/css/theme/cyanTheme.css +0 -10
- package/public/css/theme/defaultTheme.css +0 -10
- package/public/css/theme/greenTheme.css +0 -16
- package/public/css/theme/greyTheme.css +0 -10
- package/public/css/theme/orangeTheme.css +0 -10
- package/public/css/theme/purpleTheme.css +0 -10
- package/public/css/theme/skyblueTheme.css +0 -10
- package/public/favicon.ico +0 -0
- package/public/imgs/antOutline-border.png +0 -0
- package/public/imgs/bg.png +0 -0
- package/public/imgs/logo.png +0 -0
- package/public/imgs/menu.png +0 -0
- package/public/index.html +0 -17
- package/src/App.vue +0 -143
- package/src/api/api.js +0 -28
- package/src/api/index.js +0 -31
- package/src/api/request.js +0 -210
- package/src/assets/font/font.scss +0 -12
- package/src/assets/font/font_dev.scss +0 -12
- package/src/assets/font/icon.scss +0 -179
- package/src/assets/images/svg/color.svg +0 -1
- package/src/assets/logo.png +0 -0
- package/src/assets/scss/common.scss +0 -338
- package/src/assets/scss/themeColor.scss +0 -35
- package/src/components/MyDialog.vue +0 -251
- package/src/components/MyForm.vue +0 -324
- package/src/components/MyFormAutocomplete.vue +0 -135
- package/src/components/MyFormCascader.vue +0 -107
- package/src/components/MyFormCheckBox.vue +0 -67
- package/src/components/MyFormEditor.vue +0 -85
- package/src/components/MyFormInput.vue +0 -68
- package/src/components/MyFormLine.vue +0 -49
- package/src/components/MyFormRadio.vue +0 -92
- package/src/components/MyFormSelect.vue +0 -122
- package/src/components/MyFormSelectDate.vue +0 -72
- package/src/components/MyFormSelectDateTime.vue +0 -82
- package/src/components/MyFormSelectTime.vue +0 -84
- package/src/components/MyFormSwitch.vue +0 -60
- package/src/components/MyFormTag.vue +0 -67
- package/src/components/MyFormTree.vue +0 -137
- package/src/components/MyFormUploads.vue +0 -91
- package/src/components/MyHeader.vue +0 -176
- package/src/components/MyMenus.vue +0 -150
- package/src/components/MyPageHeader.vue +0 -344
- package/src/components/MyTab.vue +0 -69
- package/src/components/MyTable.vue +0 -244
- package/src/components/Templatess.vue +0 -630
- package/src/index.js +0 -23
- package/src/main.js +0 -86
- package/src/router.js +0 -52
- package/src/store/index.js +0 -71
- package/src/utils/common.js +0 -96
- package/src/utils/permission.js +0 -36
- package/src/views/GView.vue +0 -185
- package/src/views/Home.vue +0 -26
- package/src/views/Login.vue +0 -249
- package/src/websocket/test.js +0 -140
- package/src/websocket/websocket.js +0 -141
- package/src/websocket/websocket1.js +0 -117
- package/src/websocket/websocket2.js +0 -128
- package/vue.config.js +0 -42
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: your name
|
|
3
|
-
* @Date: 2022-04-29 16:16:26
|
|
4
|
-
* @LastEditTime: 2022-11-19 15:11:27
|
|
5
|
-
* @LastEditors: lrm lrm@gonsin.cn
|
|
6
|
-
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
7
|
-
* @FilePath: \client\src\components\MyFormSwitch.vue
|
|
8
|
-
-->
|
|
9
|
-
<!--
|
|
10
|
-
* @Author: your name
|
|
11
|
-
* @Date: 2022-04-28 15:10:38
|
|
12
|
-
* @LastEditTime: 2022-04-28 15:21:02
|
|
13
|
-
* @LastEditors: Please set LastEditors
|
|
14
|
-
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
15
|
-
* @FilePath: \gview\src\components\MyFormCheckBox copy.vue
|
|
16
|
-
-->
|
|
17
|
-
|
|
18
|
-
<template>
|
|
19
|
-
<div class="my_switch">
|
|
20
|
-
<el-switch
|
|
21
|
-
v-model="childData"
|
|
22
|
-
active-color="#13ce66"
|
|
23
|
-
inactive-color="#ff4949"
|
|
24
|
-
@change="forceUpdate"
|
|
25
|
-
></el-switch>
|
|
26
|
-
<!-- @change="forceUpdate" -->
|
|
27
|
-
</div>
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<script>
|
|
31
|
-
export default {
|
|
32
|
-
props: {
|
|
33
|
-
value:{
|
|
34
|
-
type:Boolean,
|
|
35
|
-
default:false,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
watch:{
|
|
39
|
-
value(){
|
|
40
|
-
this.childData = this.value
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
data() {
|
|
44
|
-
return {
|
|
45
|
-
childData:this.value,
|
|
46
|
-
|
|
47
|
-
};
|
|
48
|
-
},
|
|
49
|
-
computed: {
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
methods: {
|
|
53
|
-
forceUpdate(e) {
|
|
54
|
-
this.$emit('update:value', e)
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
</script>
|
|
59
|
-
<style lang="scss" scoped>
|
|
60
|
-
</style>
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: lrm lrm@gonsin.cn
|
|
3
|
-
* @Date: 2022-10-25 15:17:48
|
|
4
|
-
* @LastEditors: lrm lrm@gonsin.cn
|
|
5
|
-
* @LastEditTime: 2022-11-25 09:52:33
|
|
6
|
-
* @FilePath: \client\src\components\MyFormTag.vue
|
|
7
|
-
* @Description:
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) 2022 by lrm lrm@gonsin.cn, All Rights Reserved.
|
|
10
|
-
-->
|
|
11
|
-
\<!--
|
|
12
|
-
* @Author: your name
|
|
13
|
-
* @Date: 2022-04-28 09:31:37
|
|
14
|
-
* @LastEditTime: 2022-11-24 14:30:50
|
|
15
|
-
* @LastEditors: lrm lrm@gonsin.cn
|
|
16
|
-
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
17
|
-
* @FilePath: \client\src\components\MyFormTag.vue
|
|
18
|
-
-->
|
|
19
|
-
|
|
20
|
-
<template>
|
|
21
|
-
<div class="my_tag">
|
|
22
|
-
<el-tag>{{
|
|
23
|
-
returnLabel(target)
|
|
24
|
-
}}</el-tag>
|
|
25
|
-
</div>
|
|
26
|
-
</template>
|
|
27
|
-
|
|
28
|
-
<script>
|
|
29
|
-
export default {
|
|
30
|
-
props: {
|
|
31
|
-
form:{
|
|
32
|
-
type:Object
|
|
33
|
-
},
|
|
34
|
-
value:{
|
|
35
|
-
type:String
|
|
36
|
-
},
|
|
37
|
-
target:{
|
|
38
|
-
type:Object
|
|
39
|
-
},
|
|
40
|
-
size:{
|
|
41
|
-
type:String,
|
|
42
|
-
default:'medium',
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
components: {
|
|
46
|
-
},
|
|
47
|
-
data() {
|
|
48
|
-
return {
|
|
49
|
-
|
|
50
|
-
};
|
|
51
|
-
},
|
|
52
|
-
mounted(){
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
methods: {
|
|
56
|
-
returnLabel(item){
|
|
57
|
-
if(typeof this.form[item.keyName] =='undefined')
|
|
58
|
-
{ return ' ';}
|
|
59
|
-
else{
|
|
60
|
-
return this.form[item.keyName]
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
</script>
|
|
66
|
-
<style lang="scss" scoped>
|
|
67
|
-
</style>
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: your name
|
|
3
|
-
* @Date: 2022-04-29 16:16:08
|
|
4
|
-
* @LastEditTime: 2022-11-19 10:03:11
|
|
5
|
-
* @LastEditors: lrm lrm@gonsin.cn
|
|
6
|
-
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
7
|
-
* @FilePath: \client\src\components\MyFormTree.vue
|
|
8
|
-
-->
|
|
9
|
-
<template>
|
|
10
|
-
<div class="my_tree">
|
|
11
|
-
<el-tree
|
|
12
|
-
ref="tree"
|
|
13
|
-
:data="data"
|
|
14
|
-
:props="defaultProps"
|
|
15
|
-
:show-checkbox="isShowCheckBox"
|
|
16
|
-
node-key="value"
|
|
17
|
-
:default-checked-keys="defaultData"
|
|
18
|
-
@check-change="handleCheckChange"
|
|
19
|
-
></el-tree>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script>
|
|
24
|
-
import * as api from '../api'
|
|
25
|
-
|
|
26
|
-
export default {
|
|
27
|
-
props: {
|
|
28
|
-
value:{
|
|
29
|
-
type:String | Array
|
|
30
|
-
},
|
|
31
|
-
target:{
|
|
32
|
-
type:Object
|
|
33
|
-
},
|
|
34
|
-
targetViewName:{
|
|
35
|
-
type:String
|
|
36
|
-
},
|
|
37
|
-
size:{
|
|
38
|
-
type:String,
|
|
39
|
-
default:'medium',
|
|
40
|
-
},
|
|
41
|
-
isShowCheckBox:{
|
|
42
|
-
type:Boolean,
|
|
43
|
-
default:false,
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
components: {},
|
|
47
|
-
data() {
|
|
48
|
-
return {
|
|
49
|
-
childData:"",
|
|
50
|
-
data: [],
|
|
51
|
-
defaultData:[],
|
|
52
|
-
defaultProps: {
|
|
53
|
-
children: "children",
|
|
54
|
-
label: "label",
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
},
|
|
58
|
-
watch:{
|
|
59
|
-
value(){
|
|
60
|
-
// this.childData = this.value
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
mounted() {
|
|
64
|
-
this.getSelect(this.target);
|
|
65
|
-
},
|
|
66
|
-
methods: {
|
|
67
|
-
// 监听选中的数据变化返回到上一层
|
|
68
|
-
handleCheckChange(e, current){
|
|
69
|
-
// console.log('当前选中的值', this.$refs.tree.getCheckedKeys());
|
|
70
|
-
this.childData = this.$refs.tree.getCheckedKeys()
|
|
71
|
-
this.$emit("update:value", this.childData)
|
|
72
|
-
},
|
|
73
|
-
// 根据请求的数据重新设置新的数据
|
|
74
|
-
setData(list, model) {
|
|
75
|
-
let arrModel = [];
|
|
76
|
-
// 处理从服务器获取的数据
|
|
77
|
-
list.forEach(element => {
|
|
78
|
-
//判断数组是否为空,如果为空直接插入进去
|
|
79
|
-
if(arrModel.length==0){
|
|
80
|
-
arrModel.push({
|
|
81
|
-
label:element[model.treeData.titleName],
|
|
82
|
-
value:element[model.treeData.valueName],
|
|
83
|
-
children:[],
|
|
84
|
-
})
|
|
85
|
-
}else{
|
|
86
|
-
// 数组已经有数据
|
|
87
|
-
// 判断已有的数据中是否存在相同的parentKey
|
|
88
|
-
let filterArr = arrModel.filter((item)=>{
|
|
89
|
-
return item.value == element[model.treeData.parentKeyName]
|
|
90
|
-
})
|
|
91
|
-
if(filterArr.length !=0){
|
|
92
|
-
filterArr[0].children.push({
|
|
93
|
-
label:element[model.treeData.titleName],
|
|
94
|
-
value:element[model.treeData.valueName],
|
|
95
|
-
children:[],
|
|
96
|
-
})
|
|
97
|
-
}else{
|
|
98
|
-
arrModel.push({
|
|
99
|
-
label:element[model.treeData.titleName],
|
|
100
|
-
value:element[model.treeData.valueName],
|
|
101
|
-
children:[],
|
|
102
|
-
})
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
this.data = arrModel;
|
|
107
|
-
|
|
108
|
-
if (this.value == '') {
|
|
109
|
-
this.defaultData = []
|
|
110
|
-
} else {
|
|
111
|
-
this.childData = this.value
|
|
112
|
-
this.defaultData = this.value
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
},
|
|
116
|
-
//获取下拉的数据
|
|
117
|
-
getSelect(item) {
|
|
118
|
-
api
|
|
119
|
-
.getViewData({
|
|
120
|
-
viewName: this.targetViewName,
|
|
121
|
-
dataId:item.treeData.dataId,
|
|
122
|
-
})
|
|
123
|
-
.then((res) => {
|
|
124
|
-
if (res.data.state == 200) {
|
|
125
|
-
let list = res.data.data;
|
|
126
|
-
if (list != null && list.length != 0) {
|
|
127
|
-
this.setData(list, item)
|
|
128
|
-
}
|
|
129
|
-
} else {
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
};
|
|
135
|
-
</script>
|
|
136
|
-
<style lang="scss" scoped>
|
|
137
|
-
</style>
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: your name
|
|
3
|
-
* @Date: 2022-04-28 15:38:13
|
|
4
|
-
* @LastEditTime: 2022-11-17 15:25:47
|
|
5
|
-
* @LastEditors: lrm lrm@gonsin.cn
|
|
6
|
-
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
7
|
-
* @FilePath: \client\src\components\MyFormUploads.vue
|
|
8
|
-
-->
|
|
9
|
-
<!--
|
|
10
|
-
* @Author: your name
|
|
11
|
-
* @Date: 2022-04-28 15:10:38
|
|
12
|
-
* @LastEditTime: 2022-04-28 15:21:02
|
|
13
|
-
* @LastEditors: Please set LastEditors
|
|
14
|
-
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
15
|
-
* @FilePath: \gview\src\components\MyFormCheckBox copy.vue
|
|
16
|
-
-->
|
|
17
|
-
|
|
18
|
-
<template>
|
|
19
|
-
<div class="my_upload">
|
|
20
|
-
<el-upload
|
|
21
|
-
class="upload-demo"
|
|
22
|
-
drag
|
|
23
|
-
action="http://192.168.2.192:8088/restapi/s09/gview/active/upload_file"
|
|
24
|
-
:on-success="handleSuccess"
|
|
25
|
-
:on-error="handleError"
|
|
26
|
-
:size="size"
|
|
27
|
-
:accept="target.accept"
|
|
28
|
-
multiple>
|
|
29
|
-
<i class="el-icon-upload"></i>
|
|
30
|
-
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
31
|
-
<div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
32
|
-
</el-upload>
|
|
33
|
-
</div>
|
|
34
|
-
</template>
|
|
35
|
-
|
|
36
|
-
<script>
|
|
37
|
-
export default {
|
|
38
|
-
props: {
|
|
39
|
-
value:{
|
|
40
|
-
type:String
|
|
41
|
-
},
|
|
42
|
-
targetViewName:{
|
|
43
|
-
type:String
|
|
44
|
-
},
|
|
45
|
-
target:{
|
|
46
|
-
type:Object
|
|
47
|
-
},
|
|
48
|
-
size:{
|
|
49
|
-
type:String,
|
|
50
|
-
default:'medium',
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
watch:{
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
components: {
|
|
57
|
-
},
|
|
58
|
-
data() {
|
|
59
|
-
return {
|
|
60
|
-
|
|
61
|
-
};
|
|
62
|
-
},
|
|
63
|
-
mounted(){
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
methods: {
|
|
67
|
-
handleSuccess(res) {
|
|
68
|
-
if(res.state == 200 ){
|
|
69
|
-
this.$emit('update:value', res.data[0])
|
|
70
|
-
} else {
|
|
71
|
-
this.$message({
|
|
72
|
-
type: "error",
|
|
73
|
-
message: "上传出错",
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
handleError(e) {
|
|
78
|
-
// console.log("handleError");
|
|
79
|
-
this.$message({
|
|
80
|
-
type: "error",
|
|
81
|
-
message: "上传失败",
|
|
82
|
-
});
|
|
83
|
-
},
|
|
84
|
-
forceUpdate(e) {
|
|
85
|
-
this.$emit('update:value',e)
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
};
|
|
89
|
-
</script>
|
|
90
|
-
<style lang="scss" scoped>
|
|
91
|
-
</style>
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="my_header">
|
|
3
|
-
<div class="header_btns" v-if="data.buttons">
|
|
4
|
-
<div
|
|
5
|
-
class="btns"
|
|
6
|
-
v-for="(item, index) in data.buttons"
|
|
7
|
-
:key="index"
|
|
8
|
-
>
|
|
9
|
-
<el-upload
|
|
10
|
-
v-if="item.action == 'UPLOAD_FILE'"
|
|
11
|
-
class="upload-demo"
|
|
12
|
-
action="http://192.168.2.192:8088/restapi/s09/gview/active/upload_file"
|
|
13
|
-
:on-success="handleSuccess"
|
|
14
|
-
:on-error="handleError"
|
|
15
|
-
:show-file-list="false"
|
|
16
|
-
multiple
|
|
17
|
-
:limit="9"
|
|
18
|
-
size="mini"
|
|
19
|
-
>
|
|
20
|
-
<el-button type="primary" size="mini" @click="setUpLoadData(item)">{{
|
|
21
|
-
item.name
|
|
22
|
-
}}</el-button>
|
|
23
|
-
</el-upload>
|
|
24
|
-
<el-button
|
|
25
|
-
v-if="item.action != 'UPLOAD_FILE'"
|
|
26
|
-
type="primary"
|
|
27
|
-
:icon="item.icon != '' ? item.icon : ''"
|
|
28
|
-
size="mini"
|
|
29
|
-
@click="clickDom(item)"
|
|
30
|
-
>{{ item.name }}</el-button
|
|
31
|
-
>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
<div class="header_search" v-if="data.searchBar">
|
|
35
|
-
<div
|
|
36
|
-
class="filter_template"
|
|
37
|
-
v-for="(item, index) in data.searchBar.filters"
|
|
38
|
-
:key="index"
|
|
39
|
-
>
|
|
40
|
-
<div
|
|
41
|
-
class="item"
|
|
42
|
-
v-if="
|
|
43
|
-
item.itemType == 'text_input' && item.simpleListData == null
|
|
44
|
-
"
|
|
45
|
-
>
|
|
46
|
-
<myFormInput :value.sync="filter[item.keyName]" :targetViewName="viewName" :size="'mini'" :icon="'el-icon-search'" :placeholders="item.placeholder" :isSearch="data.searchBar?true:false" @changeSearch="searchValue"></myFormInput>
|
|
47
|
-
</div>
|
|
48
|
-
<div
|
|
49
|
-
class="item"
|
|
50
|
-
v-if="
|
|
51
|
-
item.itemType == 'text_input' && item.simpleListData != null
|
|
52
|
-
"
|
|
53
|
-
>
|
|
54
|
-
<myFormAutocomplete :value.sync="filter[item.keyName]" :target="item" :targetViewName="viewName" :size="'mini'" :isSpecial="true" :isSearch="data.searchBar?true:false" @changeSearch="searchValue"></myFormAutocomplete>
|
|
55
|
-
</div>
|
|
56
|
-
<div class="item" v-if="item.itemType == 'selector'">
|
|
57
|
-
<myFormSelect :value.sync="filter[item.keyName]" :target="item" :targetViewName="viewName" :size="'mini'" :isSearch="data.searchBar?true:false" @changeSearch="searchValue"></myFormSelect>
|
|
58
|
-
</div>
|
|
59
|
-
<div class="item" v-if="item.itemType == 'time_selector'">
|
|
60
|
-
<myFormSelectTime :value.sync="filter[item.keyName]" :target="item" :targetViewName="viewName" :size="'mini'" :isSearch="data.searchBar?true:false" @changeSearch="searchValue"></myFormSelectTime>
|
|
61
|
-
</div>
|
|
62
|
-
<div class="item" v-if="item.itemType == 'date_selector'">
|
|
63
|
-
<myFormSelectDate :value.sync="filter[item.keyName]" :target="item" :targetViewName="viewName" :size="'mini'" :isSearch="data.searchBar?true:false" @changeSearch="searchValue"></myFormSelectDate>
|
|
64
|
-
</div>
|
|
65
|
-
<div class="item" v-if="item.itemType == 'date_time_selector'">
|
|
66
|
-
<myFormSelectDateTime :value.sync="filter[item.keyName]" :target="item" :targetViewName="viewName" :size="'mini'" :isSearch="data.searchBar?true:false" @changeSearch="searchValue"></myFormSelectDateTime>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
</template>
|
|
72
|
-
|
|
73
|
-
<script>
|
|
74
|
-
import myFormInput from "./MyFormInput.vue";
|
|
75
|
-
import myFormSelect from "./MyFormSelect.vue";
|
|
76
|
-
import myFormAutocomplete from "./MyFormAutocomplete.vue";
|
|
77
|
-
import myFormSelectTime from "./MyFormSelectTime.vue";
|
|
78
|
-
import myFormSelectDate from "./MyFormSelectDate.vue";
|
|
79
|
-
import myFormSelectDateTime from "./MyFormSelectDateTime.vue";
|
|
80
|
-
export default {
|
|
81
|
-
props: {
|
|
82
|
-
data: {
|
|
83
|
-
type: Object,
|
|
84
|
-
},
|
|
85
|
-
viewName:{
|
|
86
|
-
type:String
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
components: {
|
|
90
|
-
myFormSelect,
|
|
91
|
-
myFormInput,
|
|
92
|
-
myFormAutocomplete,
|
|
93
|
-
myFormSelectTime,
|
|
94
|
-
myFormSelectDate,
|
|
95
|
-
myFormSelectDateTime
|
|
96
|
-
},
|
|
97
|
-
data() {
|
|
98
|
-
return {
|
|
99
|
-
//筛选所提交的内容
|
|
100
|
-
filter: {},
|
|
101
|
-
timeout: null,
|
|
102
|
-
restaurants: [],
|
|
103
|
-
upLoadData:{}
|
|
104
|
-
};
|
|
105
|
-
},
|
|
106
|
-
watch:{
|
|
107
|
-
filter: {
|
|
108
|
-
handler: function (newModel, oldModel) {
|
|
109
|
-
console.log('newModel')
|
|
110
|
-
// this.$emit('searchAction',newModel)
|
|
111
|
-
},
|
|
112
|
-
deep: true,
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
mounted() {
|
|
116
|
-
//循环列表输出筛选的字段添加到data里面进行绑定
|
|
117
|
-
if (this.data.searchBar !== null) {
|
|
118
|
-
let list = this.data.searchBar.filters;
|
|
119
|
-
if (list.length != 0) {
|
|
120
|
-
list.forEach((element) => {
|
|
121
|
-
this.filter[element.keyName] = "";
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
methods: {
|
|
127
|
-
setUpLoadData(item){
|
|
128
|
-
this.upLoadData = item;
|
|
129
|
-
},
|
|
130
|
-
handleSuccess(e) {
|
|
131
|
-
console.log("handlePreview");
|
|
132
|
-
this.$emit('returnFileUrl',e,this.upLoadData);
|
|
133
|
-
},
|
|
134
|
-
handleError(e) {
|
|
135
|
-
console.log("handleError");
|
|
136
|
-
this.$message({
|
|
137
|
-
type: "error",
|
|
138
|
-
message: "上传失败",
|
|
139
|
-
});
|
|
140
|
-
},
|
|
141
|
-
//点击按钮的操作
|
|
142
|
-
clickDom(item) {
|
|
143
|
-
this.$emit("clickAction", item);
|
|
144
|
-
},
|
|
145
|
-
searchValue(e){
|
|
146
|
-
// console.log(e);
|
|
147
|
-
this.$emit('searchAction',this.filter)
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
};
|
|
151
|
-
</script>
|
|
152
|
-
<style lang="scss" scoped>
|
|
153
|
-
.my_header {
|
|
154
|
-
overflow: hidden;
|
|
155
|
-
display: flex;
|
|
156
|
-
margin: 20px 0;
|
|
157
|
-
.header_btns {
|
|
158
|
-
flex: 1;
|
|
159
|
-
text-align: left;
|
|
160
|
-
.btns {
|
|
161
|
-
display: inline-block;
|
|
162
|
-
margin-right: 10px;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
.header_search {
|
|
166
|
-
overflow: hidden;
|
|
167
|
-
.filter_template {
|
|
168
|
-
float: left;
|
|
169
|
-
margin-right: 10px;
|
|
170
|
-
&:last-child {
|
|
171
|
-
margin: 0;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
</style>
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: your name
|
|
3
|
-
* @Date: 2022-04-22 15:51:20
|
|
4
|
-
* @LastEditTime: 2022-11-22 10:26:18
|
|
5
|
-
* @LastEditors: lrm lrm@gonsin.cn
|
|
6
|
-
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
7
|
-
* @FilePath: \client\src\components\MyMenus.vue
|
|
8
|
-
-->
|
|
9
|
-
|
|
10
|
-
<template>
|
|
11
|
-
<el-menu
|
|
12
|
-
v-loading="menuLoading"
|
|
13
|
-
:default-active="$router.path"
|
|
14
|
-
class="menu"
|
|
15
|
-
background-color="#FFFFFF"
|
|
16
|
-
text-color="#555555"
|
|
17
|
-
active-text-color="#3E99F6"
|
|
18
|
-
collapse-transition
|
|
19
|
-
:collapse="Collapse"
|
|
20
|
-
>
|
|
21
|
-
<template v-for="(item, idx) in menuList">
|
|
22
|
-
<template v-if="item.children.length === 0">
|
|
23
|
-
<el-menu-item
|
|
24
|
-
:key="item.name"
|
|
25
|
-
v-show="!Collapse && permissionFilter(item.name)"
|
|
26
|
-
:index="String(idx)"
|
|
27
|
-
@click="clickHandler({ path: '/' + item.url })"
|
|
28
|
-
>
|
|
29
|
-
<i :class="item.icon"></i>
|
|
30
|
-
<span>{{ item.title }}</span>
|
|
31
|
-
</el-menu-item>
|
|
32
|
-
</template>
|
|
33
|
-
<template v-if="item.children.length > 0">
|
|
34
|
-
<!-- v-show="permissionFilter(item.name)" -->
|
|
35
|
-
<el-submenu
|
|
36
|
-
:key="item.name"
|
|
37
|
-
:index="String(idx)"
|
|
38
|
-
v-show="permissionFilter(item.name)"
|
|
39
|
-
>
|
|
40
|
-
<template slot="title">
|
|
41
|
-
<i :class="item.icon"></i>
|
|
42
|
-
<span
|
|
43
|
-
class="submenu-title"
|
|
44
|
-
style="font-weight: 700; font-size: 14px"
|
|
45
|
-
>{{ item.title }}</span
|
|
46
|
-
>
|
|
47
|
-
</template>
|
|
48
|
-
|
|
49
|
-
<template>
|
|
50
|
-
<el-menu-item
|
|
51
|
-
v-for="(childItem, childIdx) in item.children"
|
|
52
|
-
:key="childIdx"
|
|
53
|
-
:index="idx + '-' + childIdx"
|
|
54
|
-
v-show="permissionFilter(childItem.name)"
|
|
55
|
-
@click="clickHandler({ path: '/' + childItem.url })"
|
|
56
|
-
>{{ childItem.title }}</el-menu-item
|
|
57
|
-
>
|
|
58
|
-
</template>
|
|
59
|
-
</el-submenu>
|
|
60
|
-
</template>
|
|
61
|
-
</template>
|
|
62
|
-
</el-menu>
|
|
63
|
-
</template>
|
|
64
|
-
|
|
65
|
-
<script>
|
|
66
|
-
import { mapState } from "vuex";
|
|
67
|
-
import { permissionFilter } from "../utils/permission";
|
|
68
|
-
export default {
|
|
69
|
-
props: {
|
|
70
|
-
menuList:{
|
|
71
|
-
type:Array,
|
|
72
|
-
default:[],
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
components: {},
|
|
76
|
-
data() {
|
|
77
|
-
return {
|
|
78
|
-
menuLoading:false,
|
|
79
|
-
sessionId: sessionStorage.getItem("sessionId"),
|
|
80
|
-
// defImage:require('../../public/imgs/antOutline-border.png'),
|
|
81
|
-
};
|
|
82
|
-
},
|
|
83
|
-
mounted() {
|
|
84
|
-
|
|
85
|
-
},
|
|
86
|
-
computed: {
|
|
87
|
-
...mapState({
|
|
88
|
-
Collapse: (state) => state.isCollapse,
|
|
89
|
-
// floorList: (state) => state.floorList,
|
|
90
|
-
// departmentList: (state) => state.departmentList,
|
|
91
|
-
}),
|
|
92
|
-
},
|
|
93
|
-
methods: {
|
|
94
|
-
clickHandler(e){
|
|
95
|
-
if (this.$route.fullPath != e.path) { // 解决重复点击菜单路由报错的问题
|
|
96
|
-
this.$router.push({
|
|
97
|
-
path: e.path
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
permissionFilter
|
|
102
|
-
},
|
|
103
|
-
};
|
|
104
|
-
</script>
|
|
105
|
-
<style lang="scss" scoped>
|
|
106
|
-
.el-menu{
|
|
107
|
-
border-right: none !important;
|
|
108
|
-
text-align: left;
|
|
109
|
-
margin:0;
|
|
110
|
-
}
|
|
111
|
-
.el-menu-item.is-active {
|
|
112
|
-
background-color: #ecf4ff !important;
|
|
113
|
-
color: #fff;
|
|
114
|
-
span {
|
|
115
|
-
color: #619fde !important;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
.el-submenu {
|
|
119
|
-
::v-deep .el-submenu__title:hover {
|
|
120
|
-
background-color: #ecf4ff !important;
|
|
121
|
-
span {
|
|
122
|
-
color: #619fde !important;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.el-menu-item:hover {
|
|
128
|
-
background-color: #ecf4ff !important;
|
|
129
|
-
color: #619fde !important;
|
|
130
|
-
span {
|
|
131
|
-
color: #619fde !important;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.el-scrollbar_wrap {
|
|
136
|
-
overflow-x: hidden;
|
|
137
|
-
}
|
|
138
|
-
el-menu {
|
|
139
|
-
el-menu-item {
|
|
140
|
-
height: 60px;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
.menu:not(.el-menu--collapse) {
|
|
144
|
-
width: 200px;
|
|
145
|
-
min-height: 400px;
|
|
146
|
-
}
|
|
147
|
-
// /deep/ .submenu-title{
|
|
148
|
-
// font-family: 'PingFangBold';
|
|
149
|
-
// }
|
|
150
|
-
</style>
|