vue2-client 1.2.90 → 1.2.93-test1

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.
@@ -1,64 +1,66 @@
1
- import Vue from 'vue'
2
-
3
- import CustomColumnsDrawer from '@vue2-client/base-client/components/common/CustomColumnsDrawer'
4
- import InstructDetailsView from '@vue2-client/base-client/components/iot/InstructDetailsView'
5
- import MeterDetailsView from '@vue2-client/base-client/components/iot/MeterDetailsView'
6
- import CustomerDetailsView from '@vue2-client/base-client/components/iot/CustomerDetailsView'
7
- import LogDetailsView from '@vue2-client/base-client/components/iot/LogDetailsView'
8
- import WebmeterAnalysisView from '@vue2-client/base-client/components/iot/WebmeterAnalysisView'
9
- import XCard from '@vue2-client/base-client/components/common/XCard/XCard'
10
- import XFormCol from '@vue2-client/base-client/components/common/XFormCol'
11
- import XBadge from '@vue2-client/base-client/components/common/XBadge'
12
- import DataAnalysisView from '@vue2-client/base-client/components/iot/DataAnalysisView'
13
- import DataAnalysisUser from '@vue2-client/base-client/components/iot/DataAnalysisUser'
14
- import SrcollList from '@vue2-client/base-client/components/common/ScrollList'
15
- import AmapPointRendering from '@vue2-client/base-client/components/common/AmapMarker'
16
- import DeviceTypeDetailsView from '@vue2-client/base-client/components/iot/DeviceTypeDetailsView'
17
- import DeviceBrandDetailsView from '@vue2-client/base-client/components/iot/DeviceBrandDetailsView'
18
- import DictionaryDetailsView from '@vue2-client/base-client/components/system/DictionaryDetailsView'
19
- import QueryParamsDetailsView from '@vue2-client/base-client/components/system/QueryParamsDetailsView'
20
- import DeviceDetailsView from '@vue2-client/base-client/components/iot/DeviceDetailsView'
21
- import TicketDetailsView from '@vue2-client/base-client/components/ticket/TicketDetailsView'
22
- import EmployeeDetailsView from '@vue2-client/base-client/components/ticket/EmployeeDetailsView'
23
- import submitTicketSuccess from '@vue2-client/base-client/components/ticket/TicketSubmitSuccessView'
24
- import CreateQuery from '@vue2-client/base-client/components/common/CreateQuery'
25
- import CreateSimpleFormQuery from '@vue2-client/base-client/components/common/CreateSimpleFormQuery'
26
- import FormGroupQuery from '@vue2-client/base-client/components/common/FormGroupQuery'
27
- import FormGroupEdit from '@vue2-client/base-client/components/common/FormGroupEdit'
28
- import JSONToTree from '@vue2-client/base-client/components/common/JSONToTree'
29
- import Upload from '@vue2-client/base-client/components/common/Upload'
30
- import AddressSearchCombobox from '@vue2-client/base-client/components/common/AddressSearchCombobox'
31
- import CitySelect from '@vue2-client/base-client/components/common/CitySelect'
32
- // 插件
33
- import Plugins from '@vue2-client/base-client/plugins'
34
- Vue.use(Plugins)
35
-
36
- Vue.component('custom-columns-drawer', CustomColumnsDrawer)
37
- Vue.component('InstructDetailsView', InstructDetailsView)
38
- Vue.component('MeterDetailsView', MeterDetailsView)
39
- Vue.component('CustomerDetailsView', CustomerDetailsView)
40
- Vue.component('LogDetailsView', LogDetailsView)
41
- Vue.component('WebmeterAnalysisView', WebmeterAnalysisView)
42
- Vue.component('XCard', XCard)
43
- Vue.component('XBadge', XBadge)
44
- Vue.component('XFormCol', XFormCol)
45
- Vue.component('DataAnalysisView', DataAnalysisView)
46
- Vue.component('DataAnalysisUser', DataAnalysisUser)
47
- Vue.component('SrcollList', SrcollList)
48
- Vue.component('DeviceTypeDetailsView', DeviceTypeDetailsView)
49
- Vue.component('DeviceBrandDetailsView', DeviceBrandDetailsView)
50
- Vue.component('DeviceDetailsView', DeviceDetailsView)
51
- Vue.component('DictionaryDetailsView', DictionaryDetailsView)
52
- Vue.component('QueryParamsDetailsView', QueryParamsDetailsView)
53
- Vue.component('TicketDetailsView', TicketDetailsView)
54
- Vue.component('EmployeeDetailsView', EmployeeDetailsView)
55
- Vue.component('submitTicketSuccess', submitTicketSuccess)
56
- Vue.component('CreateQuery', CreateQuery)
57
- Vue.component('CreateSimpleFormQuery', CreateSimpleFormQuery)
58
- Vue.component('FormGroupQuery', FormGroupQuery)
59
- Vue.component('FormGroupEdit', FormGroupEdit)
60
- Vue.component('JSONToTree', JSONToTree)
61
- Vue.component('Upload', Upload)
62
- Vue.component('AmapPointRendering', AmapPointRendering)
63
- Vue.component('AddressSearchCombobox', AddressSearchCombobox)
64
- Vue.component('CitySelect', CitySelect)
1
+ import Vue from 'vue'
2
+
3
+ import CustomColumnsDrawer from '@vue2-client/base-client/components/common/CustomColumnsDrawer'
4
+ import InstructDetailsView from '@vue2-client/base-client/components/iot/InstructDetailsView'
5
+ import MeterDetailsView from '@vue2-client/base-client/components/iot/MeterDetailsView'
6
+ import CustomerDetailsView from '@vue2-client/base-client/components/iot/CustomerDetailsView'
7
+ import LogDetailsView from '@vue2-client/base-client/components/iot/LogDetailsView'
8
+ import WebmeterAnalysisView from '@vue2-client/base-client/components/iot/WebmeterAnalysisView'
9
+ import XCard from '@vue2-client/base-client/components/common/XCard/XCard'
10
+ import XFormCol from '@vue2-client/base-client/components/common/XFormCol'
11
+ import XBadge from '@vue2-client/base-client/components/common/XBadge'
12
+ import DataAnalysisView from '@vue2-client/base-client/components/iot/DataAnalysisView'
13
+ import DataAnalysisUser from '@vue2-client/base-client/components/iot/DataAnalysisUser'
14
+ import SrcollList from '@vue2-client/base-client/components/common/ScrollList'
15
+ import AmapPointRendering from '@vue2-client/base-client/components/common/AmapMarker'
16
+ import DeviceTypeDetailsView from '@vue2-client/base-client/components/iot/DeviceTypeDetailsView'
17
+ import DeviceBrandDetailsView from '@vue2-client/base-client/components/iot/DeviceBrandDetailsView'
18
+ import DictionaryDetailsView from '@vue2-client/base-client/components/system/DictionaryDetailsView'
19
+ import QueryParamsDetailsView from '@vue2-client/base-client/components/system/QueryParamsDetailsView'
20
+ import DeviceDetailsView from '@vue2-client/base-client/components/iot/DeviceDetailsView'
21
+ import TicketDetailsView from '@vue2-client/base-client/components/ticket/TicketDetailsView'
22
+ import EmployeeDetailsView from '@vue2-client/base-client/components/ticket/EmployeeDetailsView'
23
+ import submitTicketSuccess from '@vue2-client/base-client/components/ticket/TicketSubmitSuccessView'
24
+ import CreateQuery from '@vue2-client/base-client/components/common/CreateQuery'
25
+ import CreateSimpleFormQuery from '@vue2-client/base-client/components/common/CreateSimpleFormQuery'
26
+ import FormGroupQuery from '@vue2-client/base-client/components/common/FormGroupQuery'
27
+ import FormGroupEdit from '@vue2-client/base-client/components/common/FormGroupEdit'
28
+ import JSONToTree from '@vue2-client/base-client/components/common/JSONToTree'
29
+ import Upload from '@vue2-client/base-client/components/common/Upload'
30
+ import AddressSearchCombobox from '@vue2-client/base-client/components/common/AddressSearchCombobox'
31
+ import CitySelect from '@vue2-client/base-client/components/common/CitySelect'
32
+ import PersonSetting from '@vue2-client/base-client/components/common/PersonSetting'
33
+ // 插件
34
+ import Plugins from '@vue2-client/base-client/plugins'
35
+ Vue.use(Plugins)
36
+
37
+ Vue.component('custom-columns-drawer', CustomColumnsDrawer)
38
+ Vue.component('InstructDetailsView', InstructDetailsView)
39
+ Vue.component('MeterDetailsView', MeterDetailsView)
40
+ Vue.component('CustomerDetailsView', CustomerDetailsView)
41
+ Vue.component('LogDetailsView', LogDetailsView)
42
+ Vue.component('WebmeterAnalysisView', WebmeterAnalysisView)
43
+ Vue.component('XCard', XCard)
44
+ Vue.component('XBadge', XBadge)
45
+ Vue.component('XFormCol', XFormCol)
46
+ Vue.component('DataAnalysisView', DataAnalysisView)
47
+ Vue.component('DataAnalysisUser', DataAnalysisUser)
48
+ Vue.component('SrcollList', SrcollList)
49
+ Vue.component('DeviceTypeDetailsView', DeviceTypeDetailsView)
50
+ Vue.component('DeviceBrandDetailsView', DeviceBrandDetailsView)
51
+ Vue.component('DeviceDetailsView', DeviceDetailsView)
52
+ Vue.component('DictionaryDetailsView', DictionaryDetailsView)
53
+ Vue.component('QueryParamsDetailsView', QueryParamsDetailsView)
54
+ Vue.component('TicketDetailsView', TicketDetailsView)
55
+ Vue.component('EmployeeDetailsView', EmployeeDetailsView)
56
+ Vue.component('submitTicketSuccess', submitTicketSuccess)
57
+ Vue.component('CreateQuery', CreateQuery)
58
+ Vue.component('CreateSimpleFormQuery', CreateSimpleFormQuery)
59
+ Vue.component('FormGroupQuery', FormGroupQuery)
60
+ Vue.component('FormGroupEdit', FormGroupEdit)
61
+ Vue.component('JSONToTree', JSONToTree)
62
+ Vue.component('Upload', Upload)
63
+ Vue.component('AmapPointRendering', AmapPointRendering)
64
+ Vue.component('AddressSearchCombobox', AddressSearchCombobox)
65
+ Vue.component('CitySelect', CitySelect)
66
+ Vue.component('PersonSetting', PersonSetting)
@@ -99,6 +99,12 @@
99
99
  <a-form-model-item label="操作按钮配置" prop="buttonState">
100
100
  <a-checkbox-group v-model="buttonStateData" :options="buttonStateArray"/>
101
101
  </a-form-model-item>
102
+ <a-form-model-item label="自定义查询" prop="customQuery">
103
+ <a-input v-model="form.customQuery" placeholder="示例 / 默认值:webmeterapi/commonQueryWithResource"/>
104
+ </a-form-model-item>
105
+ <a-form-model-item label="自定义保存" prop="customAOM">
106
+ <a-input v-model="form.customAoM" placeholder="示例 / 默认值:webmeterapi/commonAddOrModify"/>
107
+ </a-form-model-item>
102
108
  </a-form-model>
103
109
  <create-query-item ref="queryItem" @itemHandle="itemHandle" @getColumn="getColumn"/>
104
110
  <a-button type="primary" @click="view">操作</a-button>
@@ -175,7 +181,9 @@ export default {
175
181
  joinArray: {},
176
182
  condition: {},
177
183
  orderBy: '',
178
- column: []
184
+ column: [],
185
+ customQuery: undefined,
186
+ customAOM: undefined
179
187
  },
180
188
  result: {},
181
189
  itemMap: {},
@@ -0,0 +1,221 @@
1
+ <template>
2
+ <div>
3
+ <a-input
4
+ @click="inputClick"
5
+ :value="valueView"
6
+ style="cursor:pointer"
7
+ readOnly/>
8
+ <a-modal
9
+ v-if="visible"
10
+ v-model="visible"
11
+ title="流程步骤负责人设置"
12
+ :z-index="1031"
13
+ :bodyStyle="{ maxHeight: '65vh', overflowY: 'auto' }"
14
+ @ok="handleOk"
15
+ @close="visible=false"
16
+ >
17
+ <!-- 搜索框 -->
18
+ <a-input-search :value="searchValue" style="margin-bottom: 8px" placeholder="搜索" @change="handleSearch"/>
19
+ <!-- 树形图 -->
20
+ <a-tree
21
+ v-model="checkedKeys"
22
+ :expanded-keys="expandedKeys"
23
+ :selectable="false"
24
+ checkable
25
+ @expand="onExpand"
26
+ >
27
+ <!-- department -->
28
+ <a-tree-node
29
+ v-for="department in treeData"
30
+ v-show="!department.hidden"
31
+ :key="department.key"
32
+ :title="department.title">
33
+ <!-- person -->
34
+ <a-tree-node v-for="person in department.children" v-show="!person.hidden" :key="person.key">
35
+ <!-- 搜索关键词红色 -->
36
+ <template slot="title">
37
+ <span v-if="person.title.indexOf(searchValue) > -1">
38
+ {{ person.title.substr(0, person.title.indexOf(searchValue)) }}
39
+ <span style="color: #f50">{{ searchValue }}</span>
40
+ {{ person.title.substr(person.title.indexOf(searchValue) + searchValue.length) }}
41
+ </span>
42
+ <span v-else>{{ person.title }}</span>
43
+ </template>
44
+ </a-tree-node>
45
+ </a-tree-node>
46
+ </a-tree>
47
+ </a-modal>
48
+ </div>
49
+ </template>
50
+
51
+ <script>
52
+ import { commonApi, post } from '@vue2-client/services/api'
53
+
54
+ const departments = ['运维部', '项目部', '项目一部', '项目二部', '开发部', '售后部', '办公室', '管理员', '软件工程部', 'IC卡部', '销售部']
55
+
56
+ export default {
57
+ name: 'PersonSetting',
58
+ data () {
59
+ return {
60
+ searchValue: '',
61
+ treeData: [],
62
+ checkedKeys: [],
63
+ expandedKeys: [],
64
+ sourceTreeData: [],
65
+ visible: false,
66
+ valueView: this.placeholder
67
+ }
68
+ },
69
+ props: {
70
+ buttonText: {
71
+ type: String,
72
+ default: '选择人员'
73
+ },
74
+ placeholder: {
75
+ type: String,
76
+ default: '请选择人员'
77
+ },
78
+ value: {
79
+ type: Array,
80
+ default: () => []
81
+ },
82
+ // 默认选中key
83
+ defaultCheckedNames: {
84
+ type: Array,
85
+ default: () => []
86
+ },
87
+ defaultCheckedIds: {
88
+ type: Array,
89
+ default: () => []
90
+ },
91
+ // // 返回数据类型 String,Array 发现返回类型只能有一个
92
+ // type: {
93
+ // type: String,
94
+ // default: 'Array'
95
+ // },
96
+ // 返回数据字段 name , id
97
+ field: {
98
+ type: String,
99
+ default: 'name'
100
+ },
101
+ },
102
+ model: {
103
+ prop: 'value',
104
+ event: 'onOk'
105
+ },
106
+ watch: {},
107
+ components: {},
108
+ created () {
109
+ post(commonApi.getEmpTree, {}).then(res => {
110
+ this.sourceTreeData = res
111
+ })
112
+ },
113
+ methods: {
114
+ inputClick () {
115
+ this.visible = true
116
+ this.searchValue = ''
117
+ this.treeData = this.sourceTreeData
118
+ if (this.defaultCheckedIds.length > 0) {
119
+ this.checkedKeys = this.getCheckedKeys(this.defaultCheckedIds)
120
+ } else if (this.defaultCheckedNames.length > 0) {
121
+ this.checkedKeys = this.getCheckedKeys(this.defaultCheckedNames)
122
+ }
123
+ this.expandedKeys = []
124
+ },
125
+ // 获取选择得key
126
+ getCheckedKeys (arr) {
127
+ const brr = []
128
+ this.treeData.forEach(item => {
129
+ adaptToChildrenList(item)
130
+ })
131
+ function adaptToChildrenList (o) {
132
+ if (arr.some(item => o.key.indexOf(item) > -1)) {
133
+ brr.push(o.key)
134
+ }
135
+ if (o.children) {
136
+ for (const c of o.children) {
137
+ adaptToChildrenList(c)
138
+ }
139
+ }
140
+ }
141
+ return brr
142
+ },
143
+ handleOk () {
144
+ this.$emit('onOk', this.allPerson())
145
+ this.visible = false
146
+ },
147
+ onExpand (expandedKeys) {
148
+ this.expandedKeys = expandedKeys
149
+ },
150
+ // 搜索处理
151
+ handleSearch (e) {
152
+ const value = e.target.value.trim()
153
+ if (!value) {
154
+ this.treeData = this.sourceTreeData
155
+ this.expandedKeys = []
156
+ this.searchValue = ''
157
+ return
158
+ }
159
+ const expandedKeys = []
160
+ const treeData = JSON.parse(JSON.stringify(this.sourceTreeData))
161
+ // 过滤结果
162
+ for (const department of treeData) {
163
+ if (department.key.includes(value)) {
164
+ continue
165
+ }
166
+ let hasChildren = false
167
+ if (department.children) {
168
+ for (const person of department.children) {
169
+ if (!person.key.includes(value)) {
170
+ person.hidden = true
171
+ } else {
172
+ hasChildren = true
173
+ }
174
+ }
175
+ }
176
+ if (!hasChildren) {
177
+ department.hidden = true
178
+ } else {
179
+ expandedKeys.push(department.key)
180
+ }
181
+ }
182
+ this.treeData = treeData
183
+ this.expandedKeys = expandedKeys
184
+ this.searchValue = value
185
+ },
186
+ allPerson () {
187
+ const index = this.type === 'id' ? 1 : 0
188
+ const _allPerson = this.checkedKeys.filter(value => !departments.includes(value)).map(item => item.split('_')[index])
189
+ this.valueView = this.checkedKeys.filter(value => !departments.includes(value)).map(item => item.split('_')[0]).join(',')
190
+ return _allPerson
191
+ }
192
+ },
193
+ }
194
+ </script>
195
+ <style lang="less" scoped>
196
+ .ant-tree-title {
197
+ width: 100%;
198
+ }
199
+
200
+ .title {
201
+ float: left;
202
+ }
203
+
204
+ .ant-card-body {
205
+ :global {
206
+ .ant-tree {
207
+ line-height: 3;
208
+
209
+ li {
210
+ position: relative;
211
+ }
212
+ }
213
+ }
214
+ }
215
+
216
+ .ant-card-body .but_type {
217
+ float: right;
218
+ position: absolute;
219
+ right: 40px;
220
+ }
221
+ </style>
@@ -0,0 +1,3 @@
1
+ import PersonSetting from './PersonSetting'
2
+
3
+ export default PersonSetting
@@ -1,16 +1,21 @@
1
1
  <template>
2
2
  <div>
3
- <a-card :bordered="false" :body-style="{ margin: 0, padding: 0 }">
4
- <a-skeleton active v-show="loadState === 'loading'" style="padding: 16px"/>
3
+ <a-card :body-style="{ margin: 0, padding: 0 }" :bordered="false">
4
+ <a-skeleton v-show="loadState === 'loading'" active style="padding: 16px"/>
5
+ <a-empty v-show="loadState === 'empty'">
6
+ <a-button type="dashed" @click="retry">
7
+ 重新加载
8
+ </a-button>
9
+ </a-empty>
5
10
  <a-card
6
11
  v-show="loadState === 'error'"
7
12
  :body-style="{ margin: '0 auto' }"
8
13
  :bordered="false"
9
- class="retryCard"
10
14
  :hoverable="true"
15
+ class="retryCard"
11
16
  @click="retry" >
12
- <a-icon type="global" :style="{ fontSize: '28px' }"/>
13
- <p style="margin-top: 20px" class="noSelect">网络好像开小差了,点击重新加载...</p>
17
+ <a-icon :style="{ fontSize: '28px' }" type="global"/>
18
+ <p class="noSelect" style="margin-top: 20px">网络好像开小差了,点击重新加载...</p>
14
19
  </a-card>
15
20
  <div v-show="loadState === 'success'">
16
21
  <slot></slot>