manage-client 3.2.54 → 3.2.59

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.
@@ -0,0 +1,155 @@
1
+ <template>
2
+ <div class='flex foot_tabset1'>
3
+ <!-- Nav tabs -->
4
+ <ul class="nav nav-{{navStyle}}" role="tablist" style="margin-left: 1%">
5
+ <li style="margin-right: 10px"
6
+ :id="'vc-tabset-li-'+attach +'-'+$index"
7
+ v-for="r in renderData"
8
+ @click.prevent="handleTabListClick($index, r)"
9
+ :disabled="r.disabled"
10
+ >
11
+ <button class="button_new" style="width: max-content" v-bind:class="{
12
+ 'btn-succ': ($index === active),
13
+ 'disabled': r.disabled
14
+ }">
15
+ <slot name="header">
16
+ {{r.header}}
17
+ </slot>
18
+ <!-- 关闭按钮 -->
19
+ <span class="glyphicon glyphicon-remove" style="margin-left: 15px;" @click="deletetTab(r)" v-if="close" :id="'vc-tabset-close-'+attach +'-'+$index"></span>
20
+ </button>
21
+
22
+ </li>
23
+ </ul>
24
+
25
+ <!-- Tab panes -->
26
+ <div class="tab-content span" v-el:tab-content>
27
+ <slot></slot>
28
+ </div>
29
+ </div>
30
+ </template>
31
+
32
+ <script>
33
+ import {remove} from 'vue-client/src/stores/Remove.js'
34
+
35
+ export default {
36
+ props: {
37
+ navStyle: {
38
+ type: String,
39
+ default: 'tabs'
40
+ },
41
+ effect: {
42
+ type: String,
43
+ default: 'fadein'
44
+ },
45
+ active: {
46
+ type: Number,
47
+ default: 0
48
+ },
49
+ close: {
50
+ type: Boolean,
51
+ default: false
52
+ },
53
+ attach: {
54
+ type: String,
55
+ default: 'vuestrap'
56
+ },
57
+ content: {}
58
+ },
59
+ ready () {
60
+ remove.$on('remove', (name) => {
61
+ console.log('tabset收$on 到的名字为:', name)
62
+ this.$removeTab(name)
63
+ })
64
+ },
65
+ data () {
66
+ return {
67
+ // 数据格式:{comp, header,disabled}
68
+ // - comp: 当前页签对应的tab组件
69
+ renderData: []
70
+ }
71
+ },
72
+ methods: {
73
+ handleTabListClick (index, el) {
74
+ // 没有打开过, 则添加显示
75
+ if (!this.$parent.show.includes(el.header)) {
76
+ this.$parent.show.push(el.header)
77
+ }
78
+ if (el.comp._scope && el.comp._scope.tab) {
79
+ this.$dispatch('tab-changed', el.comp._scope.tab.comp.name)
80
+ }
81
+ if (!el.disabled) this.active = index
82
+ },
83
+ // deletetab函数为自己添加
84
+ deletetTab (el) {
85
+ this.$removeTab(el.comp._scope.tab.comp.name)
86
+ remove.$emit('delete', el.comp._scope.tab.comp.name)
87
+ },
88
+ // 根据删除也下标,修改所有页签的下标
89
+ modifyAllIndex (index) {
90
+ let cur = this.active
91
+ this.$nextTick(() => {
92
+ // 关闭页签以后的多有页签的的下标向前挪动一位,之前的页签不动
93
+ for (var i = index; i < this.renderData.length; i++) {
94
+ this.renderData[i].comp.index -= 1
95
+ }
96
+ // 修改激活页
97
+ // 获取当前激活页签下标,关闭在当前激活页之后(包含当前激活页),当前激活页下标不变
98
+ // 当关闭当前激活页之前(激活页向前移动一位)
99
+ if (this.active > index || this.active === this.renderData.length) {
100
+ this.active = cur - 1
101
+ } else if (cur === 0) {
102
+ this.active = 0
103
+ } else {
104
+ this.active = cur
105
+ }
106
+ if (this.active === -1) {
107
+ this.$dispatch('tab-changed', null)
108
+ }else {
109
+ this.$dispatch('tab-changed', this.renderData[this.active].comp._scope.tab.comp.name)
110
+ }
111
+ })
112
+ }
113
+ },
114
+ events: {
115
+ 'delete' (index) {
116
+ this.modifyAllIndex(index)
117
+ }
118
+ }
119
+ }
120
+ </script>
121
+
122
+ <style scoped>
123
+ ul > li > a {
124
+ position: relative;
125
+ }
126
+ ul > li > a > span {
127
+ display: none;
128
+ }
129
+ /*ul > li > a:hover > span {*/
130
+ /*display: initial;*/
131
+ /*position: absolute;*/
132
+ /*right: 0;*/
133
+ /*top: 35%;*/
134
+ /*border: 1px solid #EAEAEA;*/
135
+ /*}*/
136
+ /*ul > li > a:hover > span:hover {*/
137
+ /*border: 1px solid #EAEAEA;*/
138
+ /*color: #5cb95c;*/
139
+ /*}*/
140
+ ul > li > button {
141
+ background-color: #FFFFFF;
142
+ border-radius: 4px;
143
+ color: #999;
144
+ border: 1px solid #5cb95c;
145
+ }
146
+ .btn-succ{
147
+ background-color: #6aa6e2;
148
+ border-radius: 4px;
149
+ color: #fff;
150
+ }
151
+ .foot_tabset1 > .nav {
152
+ overflow-x: scroll;
153
+ white-space: nowrap;
154
+ }
155
+ </style>
@@ -0,0 +1,67 @@
1
+ <template>
2
+ <div role="tabpanel" class="tab-pane"
3
+ v-bind:class="{hide:!show}"
4
+ v-show="show"
5
+ :transition="transition"
6
+ >
7
+ <slot></slot>
8
+ </div>
9
+ </template>
10
+
11
+ <script>
12
+ import coerceBoolean from 'vue-client/src/vue-strap/src/utils/coerceBoolean.js'
13
+
14
+ export default {
15
+ props: {
16
+ header: {
17
+ type: String
18
+ },
19
+ disabled: {
20
+ type: Boolean,
21
+ coerce: coerceBoolean,
22
+ default: false
23
+ }
24
+ },
25
+ data () {
26
+ return {
27
+ index: 0,
28
+ show: false
29
+ }
30
+ },
31
+ watch: {
32
+ 'header' (val) {
33
+ // header变化时,通知tabset
34
+ let data = this.$parent.renderData.find((v) => v.comp === this)
35
+ data.header = val
36
+ }
37
+ },
38
+ computed: {
39
+ show () {
40
+ return (this.$parent.active === this.index)
41
+ },
42
+ transition () {
43
+ return this.$parent.effect
44
+ }
45
+ },
46
+ created () {
47
+ this.$parent.renderData.push({
48
+ comp: this,
49
+ header: this.header,
50
+ disabled: this.disabled
51
+ })
52
+ },
53
+ ready () {
54
+ // 找到当前tab的索引
55
+ this.index = this.$parent.$children.findIndex((v) => v.$el === this.$el)
56
+ },
57
+ beforeDestroy () {
58
+ this.$parent.renderData.splice(this.index, 1)
59
+ }
60
+ }
61
+ </script>
62
+
63
+ <style scoped>
64
+ .tab-content > .tab-pane {
65
+ display: block;
66
+ }
67
+ </style>
@@ -1,7 +1,9 @@
1
1
  // 分公司特殊组件页面注册
2
2
  let specialComp = {
3
3
  // 收费查询
4
- 'charge-query': (resolve) => { require(['./ChargeQuery'], resolve) }
4
+ 'charge-query': (resolve) => { require(['./ChargeQuery'], resolve) },
5
+ // 业务查询
6
+ 'business-manage': (resolve) => { require(['./BusinessManage'], resolve)}
5
7
  }
6
8
  exports.specialComp = specialComp
7
9
 
package/src/main.js CHANGED
@@ -43,7 +43,7 @@ all()
43
43
  // sale()
44
44
  ldap()
45
45
  system(false)
46
- saleManage()
46
+ saleManage('rongchuang')
47
47
 
48
48
  webmeterManage()
49
49
  ManageHome()