xs-common-plugins 1.2.0 → 1.2.3
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 +298 -290
- package/common.js +110 -110
- package/index.js +1 -1
- package/package.json +16 -16
- package/src/common/common.js +548 -548
- package/src/components/CheckBox_Cmp/index.vue +62 -62
- package/src/components/FormItem/index.vue +92 -92
- package/src/components/ReportCmp/index.vue +76 -76
- package/src/components/Search/index.scss +219 -219
- package/src/components/Search/index.vue +410 -406
- package/src/components/Search/product_option/index.scss +1 -1
- package/src/components/Search/product_option/index.vue +1 -8
- package/src/components/Search/product_option/methods.js +16 -4
- package/src/components/Search_filter/index.scss +104 -104
- package/src/components/TableItem/TableItem.vue +55 -55
- package/src/components/TextOVer/index.vue +55 -55
- package/src/components/UploadImg/index.vue +177 -177
- package/src/components/im/index.vue +155 -155
- package/src/components/im/pages/chatList/index.vue +45 -45
- package/src/components/im/pages/chatRoom/index.vue +159 -159
- package/src/components/xsSelect/index.vue +125 -125
- package/src/mixin/keepAlive.js +52 -0
- package/src/plugins/im/components/chat/index.scss +163 -163
- package/src/plugins/im/components/chat/index.vue +144 -144
- package/src/plugins/im/components/chat/methods.js +149 -149
- package/src/plugins/im/components/msg-image/index.vue +40 -40
- package/src/plugins/im/components/send-msg/index.scss +164 -164
- package/src/plugins/im/components/send-msg/index.vue +107 -107
- package/src/plugins/im/components/send-msg/methods.js +125 -125
- package/src/plugins/im/components/template-message/index.vue +76 -76
- package/src/plugins/im/components/without.vue +19 -19
- package/src/plugins/im/index.js +31 -31
- package/src/plugins/im/utils/services.js +625 -625
- package/src/plugins/index.js +60 -60
- package/src/plugins/row-col-cmp/index.js +20 -20
- package/src/router/permission.js +126 -126
- package/src/store/modules/dic.js +74 -74
- package/src/store/modules/oss.js +40 -40
- package/src/styles/index.scss +91 -91
- package/src/styles/table.scss +90 -90
- package/src/utils/api.js +54 -54
- package/src/utils/auth.js +38 -38
- package/src/utils/concat_batch_btns.js +88 -88
- package/src/utils/enum.js +150 -150
- package/src/utils/filter.js +5 -5
- package/src/utils/filterRules.js +55 -55
- package/src/utils/getMenu.js +82 -82
- package/src/utils/global_directive.js +10 -0
- package/src/utils/ossService.js +55 -55
- package/src/utils/prototype.js +46 -46
- package/src/utils/search.js +33 -33
- package/src/utils/signalR.js +24 -24
- package/src/views/callback/index.vue +35 -35
- package/src/views/home/index.vue +25 -25
- package/src/views/layout/components/AppMain.vue +21 -5
- package/src/views/layout/components/Navbar.vue +20 -13
- package/src/views/layout/components/TagsView/index.vue +130 -91
- package/src/views/slienceAuth/index.vue +42 -42
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="checkbox-wrap">
|
|
3
|
-
<el-checkbox-group v-model="checkList" @change="handleChecked">
|
|
4
|
-
<el-checkbox
|
|
5
|
-
v-for="(item,index) in checkSourceList"
|
|
6
|
-
:key="index"
|
|
7
|
-
:label="item.Id"
|
|
8
|
-
>{{ item.Text }}</el-checkbox>
|
|
9
|
-
</el-checkbox-group>
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
<script>
|
|
13
|
-
export default {
|
|
14
|
-
props: {
|
|
15
|
-
value: [String, Number],
|
|
16
|
-
sourceData: {
|
|
17
|
-
type: Array,
|
|
18
|
-
default: () => []
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
data() {
|
|
22
|
-
return {
|
|
23
|
-
checkSourceList: this.sourceData,
|
|
24
|
-
checkList: [],
|
|
25
|
-
selfValue: this.value
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
watch: {
|
|
29
|
-
value: {
|
|
30
|
-
immediate: true,
|
|
31
|
-
handler(val) {
|
|
32
|
-
this.selfValue = val
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
created() {
|
|
37
|
-
this.backFill()
|
|
38
|
-
},
|
|
39
|
-
methods: {
|
|
40
|
-
handleChecked(val) {
|
|
41
|
-
let count = 0
|
|
42
|
-
val.forEach((item) => {
|
|
43
|
-
this.checkSourceList.forEach((_item) => {
|
|
44
|
-
if (item == _item.Id) {
|
|
45
|
-
count += item
|
|
46
|
-
}
|
|
47
|
-
})
|
|
48
|
-
})
|
|
49
|
-
this.$emit('input', count)
|
|
50
|
-
},
|
|
51
|
-
backFill() {
|
|
52
|
-
const _this = this
|
|
53
|
-
const arr = this.checkSourceList.map(item => { return item.Id })
|
|
54
|
-
arr.forEach((item, index) => {
|
|
55
|
-
if ((_this.selfValue & item) > 0) {
|
|
56
|
-
this.checkList.push(this.checkSourceList[index].Id)
|
|
57
|
-
}
|
|
58
|
-
})
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="checkbox-wrap">
|
|
3
|
+
<el-checkbox-group v-model="checkList" @change="handleChecked">
|
|
4
|
+
<el-checkbox
|
|
5
|
+
v-for="(item,index) in checkSourceList"
|
|
6
|
+
:key="index"
|
|
7
|
+
:label="item.Id"
|
|
8
|
+
>{{ item.Text }}</el-checkbox>
|
|
9
|
+
</el-checkbox-group>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
<script>
|
|
13
|
+
export default {
|
|
14
|
+
props: {
|
|
15
|
+
value: [String, Number],
|
|
16
|
+
sourceData: {
|
|
17
|
+
type: Array,
|
|
18
|
+
default: () => []
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
data() {
|
|
22
|
+
return {
|
|
23
|
+
checkSourceList: this.sourceData,
|
|
24
|
+
checkList: [],
|
|
25
|
+
selfValue: this.value
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
watch: {
|
|
29
|
+
value: {
|
|
30
|
+
immediate: true,
|
|
31
|
+
handler(val) {
|
|
32
|
+
this.selfValue = val
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
created() {
|
|
37
|
+
this.backFill()
|
|
38
|
+
},
|
|
39
|
+
methods: {
|
|
40
|
+
handleChecked(val) {
|
|
41
|
+
let count = 0
|
|
42
|
+
val.forEach((item) => {
|
|
43
|
+
this.checkSourceList.forEach((_item) => {
|
|
44
|
+
if (item == _item.Id) {
|
|
45
|
+
count += item
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
this.$emit('input', count)
|
|
50
|
+
},
|
|
51
|
+
backFill() {
|
|
52
|
+
const _this = this
|
|
53
|
+
const arr = this.checkSourceList.map(item => { return item.Id })
|
|
54
|
+
arr.forEach((item, index) => {
|
|
55
|
+
if ((_this.selfValue & item) > 0) {
|
|
56
|
+
this.checkList.push(this.checkSourceList[index].Id)
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-col :span="width">
|
|
3
|
-
<el-form-item :label="name" :prop="prop">
|
|
4
|
-
<template v-if="!isSlot">
|
|
5
|
-
<div class="space">
|
|
6
|
-
<el-input v-if="type == 'input'" v-model="formVal" />
|
|
7
|
-
<XSSelect v-else-if="type == 'select'" v-model="formVal" :options="options" :multiple="multiple ? multiple : false" />
|
|
8
|
-
<UploadImg v-else-if="type == 'image'" v-model="formVal" />
|
|
9
|
-
<el-input v-else-if="type == 'textarea'" v-model="formVal" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入内容"></el-input>
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
<template>
|
|
13
|
-
<div class="space">
|
|
14
|
-
<slot :name="slotName"></slot>
|
|
15
|
-
</div>
|
|
16
|
-
</template>
|
|
17
|
-
</el-form-item>
|
|
18
|
-
</el-col>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script>
|
|
22
|
-
import XSSelect from '@/components/xsSelect/index'
|
|
23
|
-
import UploadImg from '@/components/UploadImg/index'
|
|
24
|
-
export default {
|
|
25
|
-
name: 'formItem',
|
|
26
|
-
components: {
|
|
27
|
-
XSSelect,
|
|
28
|
-
UploadImg
|
|
29
|
-
},
|
|
30
|
-
props: {
|
|
31
|
-
options: {
|
|
32
|
-
type: Array,
|
|
33
|
-
default: () => []
|
|
34
|
-
},
|
|
35
|
-
width: {
|
|
36
|
-
type: [String, Number],
|
|
37
|
-
default: 12
|
|
38
|
-
},
|
|
39
|
-
multiple: {
|
|
40
|
-
type: [String, Boolean],
|
|
41
|
-
default: false
|
|
42
|
-
},
|
|
43
|
-
name: {
|
|
44
|
-
type: String
|
|
45
|
-
},
|
|
46
|
-
type: {
|
|
47
|
-
type: String,
|
|
48
|
-
default: 'input'
|
|
49
|
-
},
|
|
50
|
-
value: {
|
|
51
|
-
type: [String, Number, Array]
|
|
52
|
-
},
|
|
53
|
-
isSlot: {
|
|
54
|
-
type: [String, Boolean],
|
|
55
|
-
default: false
|
|
56
|
-
},
|
|
57
|
-
slotName: {
|
|
58
|
-
type: String
|
|
59
|
-
},
|
|
60
|
-
prop: {
|
|
61
|
-
type: String
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
watch: {
|
|
65
|
-
value: {
|
|
66
|
-
handler (newVal) {
|
|
67
|
-
this.formVal = newVal
|
|
68
|
-
},
|
|
69
|
-
immediate: true,
|
|
70
|
-
deep: true
|
|
71
|
-
},
|
|
72
|
-
formVal: {
|
|
73
|
-
handler(newVal) {
|
|
74
|
-
this.$emit('input', newVal)
|
|
75
|
-
},
|
|
76
|
-
deep: true,
|
|
77
|
-
immediate: true,
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
data () {
|
|
81
|
-
return {
|
|
82
|
-
formVal: this.value,
|
|
83
|
-
url: '',
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
</script>
|
|
88
|
-
|
|
89
|
-
<style lang="scss" scoped>
|
|
90
|
-
.space {
|
|
91
|
-
margin: 3px 0;
|
|
92
|
-
}
|
|
1
|
+
<template>
|
|
2
|
+
<el-col :span="width">
|
|
3
|
+
<el-form-item :label="name" :prop="prop">
|
|
4
|
+
<template v-if="!isSlot">
|
|
5
|
+
<div class="space">
|
|
6
|
+
<el-input v-if="type == 'input'" v-model="formVal" />
|
|
7
|
+
<XSSelect v-else-if="type == 'select'" v-model="formVal" :options="options" :multiple="multiple ? multiple : false" />
|
|
8
|
+
<UploadImg v-else-if="type == 'image'" v-model="formVal" />
|
|
9
|
+
<el-input v-else-if="type == 'textarea'" v-model="formVal" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入内容"></el-input>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
<template>
|
|
13
|
+
<div class="space">
|
|
14
|
+
<slot :name="slotName"></slot>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
</el-form-item>
|
|
18
|
+
</el-col>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
import XSSelect from '@/components/xsSelect/index'
|
|
23
|
+
import UploadImg from '@/components/UploadImg/index'
|
|
24
|
+
export default {
|
|
25
|
+
name: 'formItem',
|
|
26
|
+
components: {
|
|
27
|
+
XSSelect,
|
|
28
|
+
UploadImg
|
|
29
|
+
},
|
|
30
|
+
props: {
|
|
31
|
+
options: {
|
|
32
|
+
type: Array,
|
|
33
|
+
default: () => []
|
|
34
|
+
},
|
|
35
|
+
width: {
|
|
36
|
+
type: [String, Number],
|
|
37
|
+
default: 12
|
|
38
|
+
},
|
|
39
|
+
multiple: {
|
|
40
|
+
type: [String, Boolean],
|
|
41
|
+
default: false
|
|
42
|
+
},
|
|
43
|
+
name: {
|
|
44
|
+
type: String
|
|
45
|
+
},
|
|
46
|
+
type: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: 'input'
|
|
49
|
+
},
|
|
50
|
+
value: {
|
|
51
|
+
type: [String, Number, Array]
|
|
52
|
+
},
|
|
53
|
+
isSlot: {
|
|
54
|
+
type: [String, Boolean],
|
|
55
|
+
default: false
|
|
56
|
+
},
|
|
57
|
+
slotName: {
|
|
58
|
+
type: String
|
|
59
|
+
},
|
|
60
|
+
prop: {
|
|
61
|
+
type: String
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
watch: {
|
|
65
|
+
value: {
|
|
66
|
+
handler (newVal) {
|
|
67
|
+
this.formVal = newVal
|
|
68
|
+
},
|
|
69
|
+
immediate: true,
|
|
70
|
+
deep: true
|
|
71
|
+
},
|
|
72
|
+
formVal: {
|
|
73
|
+
handler(newVal) {
|
|
74
|
+
this.$emit('input', newVal)
|
|
75
|
+
},
|
|
76
|
+
deep: true,
|
|
77
|
+
immediate: true,
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
data () {
|
|
81
|
+
return {
|
|
82
|
+
formVal: this.value,
|
|
83
|
+
url: '',
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
</script>
|
|
88
|
+
|
|
89
|
+
<style lang="scss" scoped>
|
|
90
|
+
.space {
|
|
91
|
+
margin: 3px 0;
|
|
92
|
+
}
|
|
93
93
|
</style>
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div v-loading="glo_loading" class="ReportCmp-wrapper">
|
|
3
|
-
<div class="t-search">
|
|
4
|
-
<search-cmp v-model="query" :form-content="formContent" :btn-content="btnContent" @search-click="handleSearch"
|
|
5
|
-
@btn-click="handleCommand" @btns-click="btnsClick">
|
|
6
|
-
<div slot="search_custemBtn">
|
|
7
|
-
<slot name="custemBtn" />
|
|
8
|
-
</div>
|
|
9
|
-
</search-cmp>
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<div class="t-table">
|
|
13
|
-
<el-table v-if="query.data && query.data.data && query.data.data.length > 0" ref="table" size="mini"
|
|
14
|
-
:data="query.data.data" style="width: 100%" :height="'100%'" :show-summary="showSummary || query.report.totalCol == 2" border fit
|
|
15
|
-
highlight-current-row :row-class-name="rowClassName" @selection-change="handleSelectionChange"
|
|
16
|
-
@sort-change="customSortChange">
|
|
17
|
-
<!--:fixed="idx==0"-->
|
|
18
|
-
<el-table-column :label="rowGroup.title" header-align="center">
|
|
19
|
-
<el-table-column v-for="col in rowGroup.columns" :key="col.field" :prop="col.field+''" :label="col.title"
|
|
20
|
-
header-align="center" align="left" width="120" />
|
|
21
|
-
f
|
|
22
|
-
</el-table-column>
|
|
23
|
-
|
|
24
|
-
<el-table-column v-for="(sheet,idx) in dataSheet" :key="idx" :label="sheet.title" header-align="center">
|
|
25
|
-
<el-table-column v-for="col in sheet.columns" :key="col.field" :prop="col.field+''" :label="col.title"
|
|
26
|
-
header-align="center" align="right" width="120" />
|
|
27
|
-
</el-table-column>
|
|
28
|
-
<el-table-column />
|
|
29
|
-
|
|
30
|
-
</el-table>
|
|
31
|
-
<el-table v-else class="nullTable" :data="[]" style="width: 100%" />
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</template>
|
|
35
|
-
|
|
36
|
-
<script>
|
|
37
|
-
import data from "./data";
|
|
38
|
-
import methods from "./methods";
|
|
39
|
-
import SearchCmp from "../Search";
|
|
40
|
-
import { mapState } from "vuex";
|
|
41
|
-
export default {
|
|
42
|
-
name: "Report",
|
|
43
|
-
props: {
|
|
44
|
-
query: {
|
|
45
|
-
type: [Object],
|
|
46
|
-
},
|
|
47
|
-
formContent: {
|
|
48
|
-
type: [Object, Array],
|
|
49
|
-
},
|
|
50
|
-
btnContent: {
|
|
51
|
-
type: [Object, Array],
|
|
52
|
-
},
|
|
53
|
-
rowClassName: {
|
|
54
|
-
type: [String, Function],
|
|
55
|
-
}, // 合计
|
|
56
|
-
showSummary: {
|
|
57
|
-
type: Boolean,
|
|
58
|
-
default: false,
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
data,
|
|
62
|
-
computed: {
|
|
63
|
-
...mapState(["glo_loading"]),
|
|
64
|
-
rowGroup: function () {
|
|
65
|
-
return this.query.data.colGroups[0];
|
|
66
|
-
},
|
|
67
|
-
dataSheet: function () {
|
|
68
|
-
return this.query.data.colGroups.filter((val, idx) => idx > 0);
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
mounted() {},
|
|
72
|
-
methods,
|
|
73
|
-
components: { SearchCmp },
|
|
74
|
-
};
|
|
75
|
-
</script>
|
|
76
|
-
<style lang="scss" src="./index.scss" scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<div v-loading="glo_loading" class="ReportCmp-wrapper">
|
|
3
|
+
<div class="t-search">
|
|
4
|
+
<search-cmp v-model="query" :form-content="formContent" :btn-content="btnContent" @search-click="handleSearch"
|
|
5
|
+
@btn-click="handleCommand" @btns-click="btnsClick">
|
|
6
|
+
<div slot="search_custemBtn">
|
|
7
|
+
<slot name="custemBtn" />
|
|
8
|
+
</div>
|
|
9
|
+
</search-cmp>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div class="t-table">
|
|
13
|
+
<el-table v-if="query.data && query.data.data && query.data.data.length > 0" ref="table" size="mini"
|
|
14
|
+
:data="query.data.data" style="width: 100%" :height="'100%'" :show-summary="showSummary || query.report.totalCol == 2" border fit
|
|
15
|
+
highlight-current-row :row-class-name="rowClassName" @selection-change="handleSelectionChange"
|
|
16
|
+
@sort-change="customSortChange">
|
|
17
|
+
<!--:fixed="idx==0"-->
|
|
18
|
+
<el-table-column :label="rowGroup.title" header-align="center">
|
|
19
|
+
<el-table-column v-for="col in rowGroup.columns" :key="col.field" :prop="col.field+''" :label="col.title"
|
|
20
|
+
header-align="center" align="left" width="120" />
|
|
21
|
+
f
|
|
22
|
+
</el-table-column>
|
|
23
|
+
|
|
24
|
+
<el-table-column v-for="(sheet,idx) in dataSheet" :key="idx" :label="sheet.title" header-align="center">
|
|
25
|
+
<el-table-column v-for="col in sheet.columns" :key="col.field" :prop="col.field+''" :label="col.title"
|
|
26
|
+
header-align="center" align="right" width="120" />
|
|
27
|
+
</el-table-column>
|
|
28
|
+
<el-table-column />
|
|
29
|
+
|
|
30
|
+
</el-table>
|
|
31
|
+
<el-table v-else class="nullTable" :data="[]" style="width: 100%" />
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script>
|
|
37
|
+
import data from "./data";
|
|
38
|
+
import methods from "./methods";
|
|
39
|
+
import SearchCmp from "../Search";
|
|
40
|
+
import { mapState } from "vuex";
|
|
41
|
+
export default {
|
|
42
|
+
name: "Report",
|
|
43
|
+
props: {
|
|
44
|
+
query: {
|
|
45
|
+
type: [Object],
|
|
46
|
+
},
|
|
47
|
+
formContent: {
|
|
48
|
+
type: [Object, Array],
|
|
49
|
+
},
|
|
50
|
+
btnContent: {
|
|
51
|
+
type: [Object, Array],
|
|
52
|
+
},
|
|
53
|
+
rowClassName: {
|
|
54
|
+
type: [String, Function],
|
|
55
|
+
}, // 合计
|
|
56
|
+
showSummary: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
data,
|
|
62
|
+
computed: {
|
|
63
|
+
...mapState(["glo_loading"]),
|
|
64
|
+
rowGroup: function () {
|
|
65
|
+
return this.query.data.colGroups[0];
|
|
66
|
+
},
|
|
67
|
+
dataSheet: function () {
|
|
68
|
+
return this.query.data.colGroups.filter((val, idx) => idx > 0);
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
mounted() {},
|
|
72
|
+
methods,
|
|
73
|
+
components: { SearchCmp },
|
|
74
|
+
};
|
|
75
|
+
</script>
|
|
76
|
+
<style lang="scss" src="./index.scss" scoped></style>
|