vue2-client 1.2.49 → 1.2.52
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/.env +15 -14
- package/.eslintrc.js +82 -82
- package/CHANGELOG.md +8 -0
- package/package.json +2 -1
- package/src/base-client/all.js +64 -61
- package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +225 -0
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +36 -29
- package/src/base-client/components/common/CitySelect/CitySelect.vue +244 -0
- package/src/base-client/components/common/CitySelect/index.js +3 -0
- package/src/base-client/components/common/CitySelect/index.md +109 -0
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +483 -1342
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +770 -555
- package/src/base-client/components/common/Upload/Upload.vue +124 -124
- package/src/base-client/components/common/Upload/index.js +3 -3
- package/src/base-client/components/common/XAddForm/XAddForm.vue +38 -46
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +316 -316
- package/src/base-client/components/common/XForm/XForm.vue +268 -275
- package/src/base-client/components/common/XForm/XFormItem.vue +348 -280
- package/src/base-client/components/common/XFormTable/XFormTable.vue +0 -2
- package/src/base-client/components/iot/CustomerDetailsView/index.md +1 -2
- package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +1 -1
- package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +2 -7
- package/src/base-client/components/iot/DeviceDetailsView/index.md +0 -2
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +57 -57
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsMain.vue +240 -196
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +131 -131
- package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +1 -5
- package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +6 -14
- package/src/base-client/components/iot/InstructDetailsView/index.md +0 -2
- package/src/base-client/components/iot/LogDetailsView/LogDetailsView.vue +6 -13
- package/src/base-client/components/iot/LogDetailsView/index.md +0 -2
- package/src/base-client/components/iot/MeterDetailsView/MeterDetailsView.vue +17 -24
- package/src/base-client/components/iot/MeterDetailsView/index.md +0 -2
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsCount.vue +0 -5
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsException.vue +0 -5
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsHandPlan.vue +0 -6
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsInstruct.vue +0 -6
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsMain.vue +1 -6
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsSellGas.vue +1 -6
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +213 -288
- package/src/base-client/components/iot/WebmeterAnalysisView/index.md +0 -6
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +853 -853
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
- package/src/base-client/plugins/AppData.js +16 -1
- package/src/base-client/plugins/compatible/LoginServiceOA.js +19 -0
- package/src/config/CreateQueryConfig.js +298 -80
- package/src/config/default/setting.config.js +2 -2
- package/src/layouts/header/HeaderNotice.vue +96 -96
- package/src/layouts/tabs/TabsView.vue +0 -3
- package/src/pages/login/Login.vue +53 -22
- package/src/pages/resourceManage/orgListManage.vue +40 -40
- package/src/pages/system/ticket/submitTicketSuccess.vue +268 -268
- package/src/router/async/config.async.js +26 -26
- package/src/router/index.js +27 -27
- package/src/services/api/manage.js +16 -14
- package/src/services/api/restTools.js +24 -24
- package/src/theme/default/style.less +47 -47
- package/src/utils/map-utils.js +22 -11
- package/src/utils/request.js +198 -198
- package/src/utils/routerUtil.js +1 -10
- package/src/utils/util.js +222 -176
- package/vue.config.js +2 -2
|
@@ -60,9 +60,9 @@ import { loadRoutes, funcToRouter } from '@vue2-client/utils/routerUtil'
|
|
|
60
60
|
import { mapMutations, mapState } from 'vuex'
|
|
61
61
|
import JSEncrypt from 'jsencrypt'
|
|
62
62
|
import { ACCESS_TOKEN } from '@vue2-client/store/mutation-types'
|
|
63
|
-
import Vue from 'vue'
|
|
64
63
|
import { positions } from '@vue2-client/mock/common'
|
|
65
64
|
import { timeFix } from '@vue2-client/utils/util'
|
|
65
|
+
import { loginStart } from '@vue2-client/base-client/plugins/compatible/LoginServiceOA'
|
|
66
66
|
|
|
67
67
|
export default {
|
|
68
68
|
name: 'Login',
|
|
@@ -75,7 +75,7 @@ export default {
|
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
computed: {
|
|
78
|
-
...mapState('setting', ['systemName', 'systemDesc', 'homePage', 'ticketPage'])
|
|
78
|
+
...mapState('setting', ['systemName', 'systemDesc', 'homePage', 'ticketPage', 'compatible'])
|
|
79
79
|
},
|
|
80
80
|
methods: {
|
|
81
81
|
...mapMutations('account', ['setUser', 'setPermissions', 'setRoles']),
|
|
@@ -86,10 +86,27 @@ export default {
|
|
|
86
86
|
this.logging = true
|
|
87
87
|
const name = this.form.getFieldValue('name')
|
|
88
88
|
const password = this.form.getFieldValue('password')
|
|
89
|
-
|
|
89
|
+
switch (this.compatible) {
|
|
90
|
+
case 'V3': {
|
|
91
|
+
login(name, password).then(this.afterLogin)
|
|
92
|
+
break
|
|
93
|
+
}
|
|
94
|
+
case 'OA' : {
|
|
95
|
+
loginStart(name, password).then(this.afterLoginOA).finally(() => { this.logging = false })
|
|
96
|
+
break
|
|
97
|
+
}
|
|
98
|
+
}
|
|
90
99
|
}
|
|
91
100
|
})
|
|
92
101
|
},
|
|
102
|
+
afterLoginOA (result) {
|
|
103
|
+
// 默认第一个是旧OA地址
|
|
104
|
+
result.functions[0].navigate = result.functions[0].link
|
|
105
|
+
result.functions[0].link = null
|
|
106
|
+
this.afterGeneral(result)
|
|
107
|
+
this.setACCESSTOKEN(result.password)
|
|
108
|
+
this.$router.push(this.homePage).catch(() => {})
|
|
109
|
+
},
|
|
93
110
|
afterLogin (res) {
|
|
94
111
|
const name = this.form.getFieldValue('name')
|
|
95
112
|
const password = this.form.getFieldValue('password')
|
|
@@ -99,37 +116,51 @@ export default {
|
|
|
99
116
|
const encrypt = new JSEncrypt()
|
|
100
117
|
encrypt.setPublicKey('MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqPvovSfXcwBbW8cKMCgwqNpsYuzF8RPAPFb7LGsnVo44JhM/xxzDyzoYtdfNmtbIuKVi9PzIsyp6rg+09gbuI6UGwBZ5DWBDBMqv5MPdOF5dCQkB2Bbr5yPfURPENypUz+pBFBg41d+BC+rwRiXELwKy7Y9caD/MtJyHydj8OUwIDAQAB')
|
|
101
118
|
const data = encrypt.encrypt(JSON.stringify({ username: name, password: password }))
|
|
102
|
-
localStorage.setItem(ACCESS_TOKEN, data)
|
|
103
119
|
// 获取路由配置
|
|
104
120
|
getRoutesConfig(data).then(result => {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
name:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
this.
|
|
115
|
-
this.
|
|
116
|
-
let timestamp = new Date().getTime()// 当前的时间戳
|
|
117
|
-
timestamp = timestamp + 60 * 60 * 1000
|
|
118
|
-
// 格式化时间获取年月日, 登陆过期时间
|
|
119
|
-
const dateAfter = new Date(timestamp)
|
|
120
|
-
setAuthorization({ token: data, expireAt: dateAfter })
|
|
121
|
-
loadRoutes(funcToRouter(user.functions))
|
|
121
|
+
this.$login.login(result).then(() => {
|
|
122
|
+
// V3任何情况首位加入资源管理
|
|
123
|
+
const resourceManageMain = {
|
|
124
|
+
name: '资源管理',
|
|
125
|
+
icon: 'api',
|
|
126
|
+
position: 1,
|
|
127
|
+
link: 'resourceManageMain'
|
|
128
|
+
}
|
|
129
|
+
result.functions.unshift(resourceManageMain)
|
|
130
|
+
this.afterGeneral(result)
|
|
131
|
+
this.setACCESSTOKEN(data)
|
|
122
132
|
if (result.deps === '用户工单登记') {
|
|
123
133
|
this.$router.push(this.ticketPage).catch(() => {})
|
|
124
134
|
} else {
|
|
125
135
|
this.$router.push(this.homePage).catch(() => {})
|
|
126
136
|
}
|
|
127
|
-
this.$message.success(timeFix().CN + ',欢迎回来', 3)
|
|
128
137
|
})
|
|
129
138
|
})
|
|
130
139
|
} else {
|
|
131
140
|
this.error = loginRes
|
|
132
141
|
}
|
|
142
|
+
},
|
|
143
|
+
afterGeneral (result) {
|
|
144
|
+
const user = Object.assign({
|
|
145
|
+
username: result.ename,
|
|
146
|
+
name: result.name,
|
|
147
|
+
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/jZUIxmJycoymBprLOUbT.png',
|
|
148
|
+
address: '西安市',
|
|
149
|
+
position: positions[0]
|
|
150
|
+
}, result)
|
|
151
|
+
this.setUser(user)
|
|
152
|
+
this.setPermissions([{ id: 'queryForm', operation: ['add', 'edit'] }])
|
|
153
|
+
this.setRoles([{ id: 'admin', operation: ['add', 'edit', 'delete'] }])
|
|
154
|
+
loadRoutes(funcToRouter(user.functions))
|
|
155
|
+
this.$message.success(timeFix().CN + `,${result.name} 欢迎回来`, 3)
|
|
156
|
+
},
|
|
157
|
+
setACCESSTOKEN (data) {
|
|
158
|
+
localStorage.setItem(ACCESS_TOKEN, data)
|
|
159
|
+
let timestamp = new Date().getTime()// 当前的时间戳
|
|
160
|
+
timestamp = timestamp + 60 * 60 * 1000
|
|
161
|
+
// 格式化时间获取年月日, 登陆过期时间
|
|
162
|
+
const dateAfter = new Date(timestamp)
|
|
163
|
+
setAuthorization({ token: data, expireAt: dateAfter })
|
|
133
164
|
}
|
|
134
165
|
}
|
|
135
166
|
}
|
|
@@ -2,49 +2,49 @@
|
|
|
2
2
|
<div id="orgListManage">
|
|
3
3
|
<a-card :bordered="false">
|
|
4
4
|
<!--<a-row :gutter="48">-->
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
5
|
+
<!--<a-col>-->
|
|
6
|
+
<!--<a-space>-->
|
|
7
|
+
<!--<a-button type="primary" @click="addItem" v-if="!buttonState || buttonState.add">-->
|
|
8
|
+
<!--<a-icon :style="iconStyle" type="plus"/>新增-->
|
|
9
|
+
<!--</a-button>-->
|
|
10
|
+
<!--<a-button-->
|
|
11
|
+
<!--v-if="!buttonState || buttonState.edit"-->
|
|
12
|
+
<!--:loading="editDataLoading"-->
|
|
13
|
+
<!--:disabled="!isModify"-->
|
|
14
|
+
<!--class="btn-success"-->
|
|
15
|
+
<!--type="dashed"-->
|
|
16
|
+
<!--@click="editItem">-->
|
|
17
|
+
<!--<a-icon :style="iconStyle" type="edit"/>修改-->
|
|
18
|
+
<!--</a-button>-->
|
|
19
|
+
<!--<a-button :disabled="!isDelete" type="danger" @click="deleteItem" v-if="!buttonState || buttonState.delete">-->
|
|
20
|
+
<!--<a-icon :style="iconStyle" type="delete"/>删除-->
|
|
21
|
+
<!--</a-button>-->
|
|
22
|
+
<!--</a-space>-->
|
|
23
|
+
<!--<span :style="{ float: 'right', overflow: 'hidden', marginBottom: '8px' }">-->
|
|
24
|
+
<!--<a-button-group>-->
|
|
25
|
+
<!--<a-button @click="toggleIsFormShow">-->
|
|
26
|
+
<!--<a-icon :style="iconStyle" type="vertical-align-top"/>-->
|
|
27
|
+
<!--</a-button>-->
|
|
28
|
+
<!--<a-button @click="refresh(true)">-->
|
|
29
|
+
<!--<a-icon :style="iconStyle" type="reload" />-->
|
|
30
|
+
<!--</a-button>-->
|
|
31
|
+
<!--<a-button @click="showDrawer">-->
|
|
32
|
+
<!--<a-icon :style="iconStyle" type="table" />-->
|
|
33
|
+
<!--</a-button>-->
|
|
34
|
+
<!--<a-button @click="exports">-->
|
|
35
|
+
<!--<a-icon :style="iconStyle" type="cloud-download"/>-->
|
|
36
|
+
<!--</a-button>-->
|
|
37
|
+
<!--</a-button-group>-->
|
|
38
|
+
<!--</span>-->
|
|
39
|
+
<!--</a-col>-->
|
|
40
40
|
<!--</a-row>-->
|
|
41
41
|
<a-table
|
|
42
|
-
rowKey="id"
|
|
43
|
-
size="middle"
|
|
44
|
-
bordered
|
|
45
|
-
:pagination="false"
|
|
46
42
|
:columns="columns"
|
|
47
|
-
:data-source="funTree"
|
|
43
|
+
:data-source="funTree"
|
|
44
|
+
:pagination="false"
|
|
45
|
+
bordered
|
|
46
|
+
rowKey="id"
|
|
47
|
+
size="middle">
|
|
48
48
|
</a-table>
|
|
49
49
|
</a-card>
|
|
50
50
|
</div>
|