vue2-client 1.3.2 → 1.3.5
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/CHANGELOG.md +4 -0
- package/index.js +30 -28
- package/package.json +1 -1
- package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +225 -225
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +777 -777
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +553 -553
- package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +165 -163
- package/src/base-client/components/common/ScrollList/ScrollList.vue +113 -0
- package/src/base-client/components/common/ScrollList/index.js +3 -0
- package/src/base-client/components/common/Upload/Upload.vue +161 -158
- package/src/base-client/components/common/XAddForm/XAddForm.vue +349 -349
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +321 -322
- package/src/base-client/components/common/XForm/XForm.vue +273 -268
- package/src/base-client/components/common/XForm/XFormItem.vue +387 -371
- package/src/base-client/components/common/XFormTable/XFormTable.vue +6 -5
- package/src/base-client/components/common/XTable/XTable.vue +278 -274
- package/src/base-client/components/{iot → system}/LogDetailsView/LogDetailsView.vue +0 -0
- package/src/base-client/components/{iot → system}/LogDetailsView/index.js +0 -0
- package/src/base-client/components/{iot → system}/LogDetailsView/index.md +0 -0
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -280
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +806 -804
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +24 -24
- package/src/base-client/plugins/PagedList.js +177 -176
- package/src/components/STable/index.js +318 -316
- package/src/components/index.js +36 -36
- package/src/components/table/StandardTable.vue +141 -142
- package/src/components/tool/TagSelect.vue +83 -83
- package/src/layouts/header/AdminHeader.vue +104 -109
- package/src/layouts/header/HeaderNotice.vue +167 -199
- package/src/layouts/header/InstitutionDetail.vue +181 -182
- package/src/pages/CreateQueryPage.vue +65 -59
- package/src/pages/system/dictionary/index.vue +43 -41
- package/src/pages/system/file/Info.vue +56 -0
- package/src/pages/system/file/index.vue +317 -0
- package/src/pages/system/queryParams/index.vue +43 -41
- package/src/pages/system/ticket/index.vue +458 -452
- package/src/pages/system/ticket/submitTicketSuccess.vue +206 -203
- package/src/router/async/router.map.js +56 -60
- package/src/services/api/DictionaryDetailsViewApi.js +6 -6
- package/src/services/api/LogDetailsViewApi.js +10 -10
- package/src/services/api/QueryParamsDetailsViewApi.js +6 -6
- package/src/services/api/TicketDetailsViewApi.js +42 -40
- package/src/services/api/commonTempTable.js +10 -0
- package/src/services/api/index.js +2 -24
- package/src/services/api/manage.js +8 -16
- package/src/utils/excel/Blob.js +181 -181
- package/src/utils/excel/Export2Excel.js +141 -142
- package/src/utils/i18n.js +80 -80
- package/src/utils/request.js +4 -4
- package/src/utils/theme-color-replacer-extend.js +91 -92
- package/vue.config.js +109 -163
- package/src/base-client/all.js +0 -62
- package/src/base-client/components/iot/CustomerDetailsView/CustomerDetailsView.vue +0 -225
- package/src/base-client/components/iot/CustomerDetailsView/index.js +0 -3
- package/src/base-client/components/iot/CustomerDetailsView/index.md +0 -40
- package/src/base-client/components/iot/DataAnalysisUser/DataAnalysisUser.vue +0 -127
- package/src/base-client/components/iot/DataAnalysisUser/index.js +0 -3
- package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +0 -452
- package/src/base-client/components/iot/DeviceBrandDetailsView/index.js +0 -3
- package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +0 -232
- package/src/base-client/components/iot/DeviceDetailsView/index.js +0 -3
- package/src/base-client/components/iot/DeviceDetailsView/index.md +0 -41
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +0 -678
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +0 -57
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstruct.vue +0 -122
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstructOperate.vue +0 -121
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsMain.vue +0 -269
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +0 -131
- package/src/base-client/components/iot/DeviceDetailsView/part/index.js +0 -8
- package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +0 -300
- package/src/base-client/components/iot/DeviceTypeDetailsView/index.js +0 -3
- package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +0 -464
- package/src/base-client/components/iot/InstructDetailsView/index.js +0 -3
- package/src/base-client/components/iot/InstructDetailsView/index.md +0 -43
- package/src/base-client/components/iot/MeterDetailsView/MeterDetailsView.vue +0 -352
- package/src/base-client/components/iot/MeterDetailsView/index.js +0 -3
- package/src/base-client/components/iot/MeterDetailsView/index.md +0 -41
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsCount.vue +0 -330
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsException.vue +0 -179
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsHandPlan.vue +0 -285
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsInstruct.vue +0 -230
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsMain.vue +0 -251
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsSellGas.vue +0 -184
- package/src/base-client/components/iot/MeterDetailsView/part/index.js +0 -9
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +0 -960
- package/src/base-client/components/iot/WebmeterAnalysisView/index.js +0 -3
- package/src/base-client/components/iot/WebmeterAnalysisView/index.md +0 -42
- package/src/base-client/components/ticket/EmployeeDetailsView/EmployeeDetailsView.vue +0 -370
- package/src/base-client/components/ticket/EmployeeDetailsView/index.js +0 -3
- package/src/base-client/components/ticket/EmployeeDetailsView/index.md +0 -28
- package/src/components/Charts/DataUserOrderSituation.vue +0 -77
- package/src/components/Charts/DataUserReporting.vue +0 -74
- package/src/components/Charts/DataUserSituation.vue +0 -107
- package/src/services/api/CustomerDetailsViewApi.js +0 -6
- package/src/services/api/DeviceBrandDetailsViewApi.js +0 -14
- package/src/services/api/DeviceDetailsViewApi.js +0 -10
- package/src/services/api/DeviceTypeDetailsViewApi.js +0 -6
- package/src/services/api/EmployeeDetailsViewApi.js +0 -12
- package/src/services/api/FormGroupEditApi.js +0 -6
- package/src/services/api/InstructDetailsViewApi.js +0 -12
- package/src/services/api/MeterDetailsViewApi.js +0 -24
- package/src/services/api/WebmeterAnalysisViewApi.js +0 -24
- package/src/services/api/applyInstallApi.js +0 -14
- package/src/services/api/iot/DeviceDetailsView/DeviceDetailsCountApi.js +0 -18
- package/src/services/api/iot.js +0 -7
- package/src/services/api/service.js +0 -12
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-card
|
|
3
|
-
:closable="false"
|
|
4
|
-
:width="isMobile ? screenWidth : screenWidth * 0.85"
|
|
5
|
-
@close="onClose"
|
|
6
|
-
>
|
|
7
|
-
<!--<x-form-table
|
|
8
|
-
:queryParamsName="queryParamsName"
|
|
9
|
-
:isFormShow="false"
|
|
10
|
-
ref="xtablefrom"
|
|
11
|
-
>
|
|
12
|
-
</x-form-table>-->
|
|
13
|
-
<div
|
|
14
|
-
:style="{
|
|
15
|
-
position: 'absolute',
|
|
16
|
-
bottom: 0,
|
|
17
|
-
width: '100%',
|
|
18
|
-
borderTop: '1px solid #e8e8e8',
|
|
19
|
-
padding: '10px 16px',
|
|
20
|
-
textAlign: 'right',
|
|
21
|
-
left: 0,
|
|
22
|
-
background: '#fff',
|
|
23
|
-
borderRadius: '0 0 4px 4px',
|
|
24
|
-
}"
|
|
25
|
-
>
|
|
26
|
-
</div>
|
|
27
|
-
</a-card>
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<script>
|
|
31
|
-
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
|
|
32
|
-
import { mapState } from 'vuex'
|
|
33
|
-
export default {
|
|
34
|
-
components: {
|
|
35
|
-
XFormTable
|
|
36
|
-
},
|
|
37
|
-
data () {
|
|
38
|
-
return {
|
|
39
|
-
// 页面宽度
|
|
40
|
-
screenWidth: document.documentElement.clientWidth,
|
|
41
|
-
childrenDrawer: false,
|
|
42
|
-
queryParamsName: 'dataAnalysityQuery'
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
computed: {
|
|
46
|
-
...mapState('setting', ['isMobile'])
|
|
47
|
-
},
|
|
48
|
-
props: {
|
|
49
|
-
address: {
|
|
50
|
-
type: Object,
|
|
51
|
-
default: () => {
|
|
52
|
-
return null
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
methods: {
|
|
57
|
-
onClose () {
|
|
58
|
-
this.$emit('onClose')
|
|
59
|
-
},
|
|
60
|
-
searchComm () {
|
|
61
|
-
console.log('看看走动没')
|
|
62
|
-
this.$refs.xtablefrom.getColumnsJson()
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
watch: {
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
</script>
|
|
69
|
-
|
|
70
|
-
<style lang="less" scoped>
|
|
71
|
-
.detail-layout {
|
|
72
|
-
margin-left: 44px;
|
|
73
|
-
}
|
|
74
|
-
.text {
|
|
75
|
-
color: rgba(0, 0, 0, .45);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.heading {
|
|
79
|
-
color: rgba(0, 0, 0, .85);
|
|
80
|
-
font-size: 20px;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.no-data {
|
|
84
|
-
color: rgba(0, 0, 0, .25);
|
|
85
|
-
text-align: center;
|
|
86
|
-
line-height: 64px;
|
|
87
|
-
font-size: 16px;
|
|
88
|
-
|
|
89
|
-
i {
|
|
90
|
-
font-size: 24px;
|
|
91
|
-
margin-right: 16px;
|
|
92
|
-
position: relative;
|
|
93
|
-
top: 3px;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.mobile {
|
|
98
|
-
.detail-layout {
|
|
99
|
-
margin-left: unset;
|
|
100
|
-
}
|
|
101
|
-
.text {
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
.status-list {
|
|
105
|
-
text-align: left;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.row {
|
|
110
|
-
display: flex;
|
|
111
|
-
|
|
112
|
-
.content {
|
|
113
|
-
-webkit-box-flex: 1;
|
|
114
|
-
flex: auto;
|
|
115
|
-
-ms-flex: auto;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.extra {
|
|
119
|
-
flex: 0 1 auto;
|
|
120
|
-
-webkit-box-flex: 0;
|
|
121
|
-
-ms-flex: 0 1 auto;
|
|
122
|
-
min-width: 242px;
|
|
123
|
-
margin-left: 88px;
|
|
124
|
-
text-align: right;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
</style>
|
|
@@ -1,452 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-drawer
|
|
3
|
-
title="设备品牌详情"
|
|
4
|
-
placement="right"
|
|
5
|
-
:width="isMobile ? screenWidth : screenWidth * 0.85"
|
|
6
|
-
:visible="visible"
|
|
7
|
-
@close="onClose"
|
|
8
|
-
>
|
|
9
|
-
<form-group-query
|
|
10
|
-
@getColumnJson="getColumnJson"
|
|
11
|
-
:visible.sync="createQueryVisible"
|
|
12
|
-
@saveQueryParams="saveQueryParams"
|
|
13
|
-
/>
|
|
14
|
-
<form-group-edit
|
|
15
|
-
@getColumnJson="getColumnJson"
|
|
16
|
-
:visible.sync="editQueryVisible"
|
|
17
|
-
:modifyModelData="this.details.f_params_json ? JSON.parse(this.details.f_params_json) : {}"
|
|
18
|
-
@onSubmit="saveDeviceParams"
|
|
19
|
-
/>
|
|
20
|
-
<a-spin :spinning="loadDeviceBrandDetails">
|
|
21
|
-
<a-page-header :title="details.f_brand">
|
|
22
|
-
<div class="row">
|
|
23
|
-
<div class="content">
|
|
24
|
-
<a-descriptions size="small" :column="isMobile ? 1 : 2">
|
|
25
|
-
<a-descriptions-item label="设备厂家">{{ details.f_manufactor }}</a-descriptions-item>
|
|
26
|
-
<a-descriptions-item label="设备别名">{{ details.f_alias }}</a-descriptions-item>
|
|
27
|
-
<a-descriptions-item label="设备兼容方式">{{ details.f_compatible_mode }}</a-descriptions-item>
|
|
28
|
-
<a-descriptions-item label="创建人">{{ details.f_inputtor }}</a-descriptions-item>
|
|
29
|
-
<a-descriptions-item label="创建时间">{{ details.f_input_date }}</a-descriptions-item>
|
|
30
|
-
</a-descriptions>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
<!-- actions -->
|
|
34
|
-
<template v-slot:extra>
|
|
35
|
-
<a-button-group style="margin-right: 4px;">
|
|
36
|
-
<a-button type="dashed" @click="initView" :loading="loadDeviceBrandDetails">刷新</a-button>
|
|
37
|
-
</a-button-group>
|
|
38
|
-
<a-button-group style="margin-right: 4px;">
|
|
39
|
-
</a-button-group>
|
|
40
|
-
</template>
|
|
41
|
-
<template slot="footer">
|
|
42
|
-
<a-tabs :default-active-key="tabActiveKey" :activeKey="tabActiveKey" @change="handleTabChange" style="margin-bottom: 23px;">
|
|
43
|
-
<template v-for="value in tabList">
|
|
44
|
-
<a-tab-pane :key="value.key" :tab="value.tab"/>
|
|
45
|
-
</template>
|
|
46
|
-
</a-tabs>
|
|
47
|
-
<div v-if="!loadDeviceBrandDetails">
|
|
48
|
-
<x-form-table
|
|
49
|
-
v-if="tabActiveKey === '1'"
|
|
50
|
-
title="设备型号"
|
|
51
|
-
:fixed-add-form="fixedAddForm"
|
|
52
|
-
:fixed-query-form="fixedQueryForm"
|
|
53
|
-
queryParamsName="deviceModelQueryParams">
|
|
54
|
-
</x-form-table>
|
|
55
|
-
<div v-if="tabActiveKey === '2'">
|
|
56
|
-
<a-transfer
|
|
57
|
-
:data-source="mockData"
|
|
58
|
-
:target-keys="targetKeys"
|
|
59
|
-
:show-search="true"
|
|
60
|
-
:titles="['已配置的指令', '可加入的指令']"
|
|
61
|
-
:operations="['移除', '加入']"
|
|
62
|
-
:filter-option="(inputValue, item) => item.title.indexOf(inputValue) !== -1"
|
|
63
|
-
:show-select-all="false"
|
|
64
|
-
@change="onChange"
|
|
65
|
-
>
|
|
66
|
-
<template
|
|
67
|
-
slot="children"
|
|
68
|
-
slot-scope="{
|
|
69
|
-
props: { direction, filteredItems, selectedKeys, disabled: listDisabled },
|
|
70
|
-
on: { itemSelectAll, itemSelect },
|
|
71
|
-
}"
|
|
72
|
-
>
|
|
73
|
-
<a-table
|
|
74
|
-
:row-selection="getRowSelection({ disabled: listDisabled, selectedKeys, itemSelectAll, itemSelect })"
|
|
75
|
-
:columns="direction === 'left' ? leftColumns : rightColumns"
|
|
76
|
-
:data-source="filteredItems"
|
|
77
|
-
size="small"
|
|
78
|
-
:style="{ pointerEvents: listDisabled ? 'none' : null }"
|
|
79
|
-
:custom-row="({ key, disabled: itemDisabled }) => ({
|
|
80
|
-
on: {
|
|
81
|
-
click: () => {
|
|
82
|
-
if (itemDisabled || listDisabled) return;
|
|
83
|
-
itemSelect(key, !selectedKeys.includes(key));
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
})"
|
|
87
|
-
/>
|
|
88
|
-
</template>
|
|
89
|
-
</a-transfer>
|
|
90
|
-
<span :style="{ float: 'right', overflow: 'hidden', marginTop: '8px' }">
|
|
91
|
-
<a-button-group>
|
|
92
|
-
<a-button type="primary" @click="saveInstructType" :loading="saveInstructTypeLoading">保存配置</a-button>
|
|
93
|
-
</a-button-group>
|
|
94
|
-
</span>
|
|
95
|
-
</div>
|
|
96
|
-
<div v-if="tabActiveKey === '3'">
|
|
97
|
-
<a-space>
|
|
98
|
-
<a-button type="primary" @click="toCreateQuery">
|
|
99
|
-
<a-icon :style="iconStyle" type="api"/>编辑设备品牌参数项
|
|
100
|
-
</a-button>
|
|
101
|
-
<a-button type="primary" @click="toEditQuery">
|
|
102
|
-
<a-icon :style="iconStyle" type="interaction"/>设置参数项默认值
|
|
103
|
-
</a-button>
|
|
104
|
-
</a-space>
|
|
105
|
-
<a-card title="设备品牌参数预览" :bordered="true" size="small" style="margin-top: 20px;">
|
|
106
|
-
<json-viewer :copyable="{copyText: '复制', copiedText: '已复制'}" :value="getColumnJson()" :expand-depth="parseInt('100')" style="overflow: auto;max-height: 440px"></json-viewer>
|
|
107
|
-
</a-card>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
</template>
|
|
111
|
-
</a-page-header>
|
|
112
|
-
</a-spin>
|
|
113
|
-
</a-drawer>
|
|
114
|
-
</template>
|
|
115
|
-
|
|
116
|
-
<script>
|
|
117
|
-
import JsonViewer from 'vue-json-viewer'
|
|
118
|
-
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
|
|
119
|
-
import { DeviceBrandDetailsViewApi, post } from '@vue2-client/services/api'
|
|
120
|
-
import { mapGetters, mapState } from 'vuex'
|
|
121
|
-
|
|
122
|
-
const leftTableColumns = [
|
|
123
|
-
{
|
|
124
|
-
dataIndex: 'title',
|
|
125
|
-
title: '指令类型'
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
dataIndex: 'description',
|
|
129
|
-
title: '指令说明'
|
|
130
|
-
}
|
|
131
|
-
]
|
|
132
|
-
|
|
133
|
-
export default {
|
|
134
|
-
name: 'DeviceBrandDetailsView',
|
|
135
|
-
components: {
|
|
136
|
-
JsonViewer,
|
|
137
|
-
XFormTable
|
|
138
|
-
},
|
|
139
|
-
data () {
|
|
140
|
-
return {
|
|
141
|
-
// 页面宽度
|
|
142
|
-
screenWidth: document.documentElement.clientWidth,
|
|
143
|
-
// Tab页签
|
|
144
|
-
tabActiveKey: '1',
|
|
145
|
-
// 设备品牌详情
|
|
146
|
-
details: {
|
|
147
|
-
f_brand: '',
|
|
148
|
-
f_alias: '',
|
|
149
|
-
f_manufactor: '',
|
|
150
|
-
f_compatible_mode: '',
|
|
151
|
-
f_input_date: '',
|
|
152
|
-
f_inputtor: '',
|
|
153
|
-
f_brand_set_params_json: '',
|
|
154
|
-
f_params_json: ''
|
|
155
|
-
},
|
|
156
|
-
// 图标样式
|
|
157
|
-
iconStyle: {
|
|
158
|
-
position: 'relative',
|
|
159
|
-
top: '1px'
|
|
160
|
-
},
|
|
161
|
-
tabList: [
|
|
162
|
-
{ key: '1', tab: '设备型号' },
|
|
163
|
-
{ key: '2', tab: '指令配置' },
|
|
164
|
-
{ key: '3', tab: '参数项配置' }
|
|
165
|
-
],
|
|
166
|
-
fixedAddForm: {},
|
|
167
|
-
fixedQueryForm: {},
|
|
168
|
-
// 是否显示生成查询配置抽屉
|
|
169
|
-
createQueryVisible: false,
|
|
170
|
-
// 是否显示修改设备品牌默认参数抽屉
|
|
171
|
-
editQueryVisible: false,
|
|
172
|
-
// 设备品牌详情加载
|
|
173
|
-
loadDeviceBrandDetails: true,
|
|
174
|
-
// 支持的指令保存加载
|
|
175
|
-
saveInstructTypeLoading: false,
|
|
176
|
-
// 穿梭框
|
|
177
|
-
mockData: [],
|
|
178
|
-
targetKeys: [],
|
|
179
|
-
leftColumns: leftTableColumns,
|
|
180
|
-
rightColumns: leftTableColumns
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
mounted () {
|
|
184
|
-
this.initView()
|
|
185
|
-
},
|
|
186
|
-
computed: {
|
|
187
|
-
...mapGetters(['account/user']),
|
|
188
|
-
...mapState('account', { currUser: 'user' }),
|
|
189
|
-
...mapState('setting', ['isMobile'])
|
|
190
|
-
},
|
|
191
|
-
props: {
|
|
192
|
-
brandId: {
|
|
193
|
-
type: Number,
|
|
194
|
-
required: true
|
|
195
|
-
},
|
|
196
|
-
visible: {
|
|
197
|
-
type: Boolean,
|
|
198
|
-
default: false
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
methods: {
|
|
202
|
-
// 初始化组件
|
|
203
|
-
initView () {
|
|
204
|
-
this.tabActiveKey = '1'
|
|
205
|
-
this.fixedQueryForm['m_f_brand_id'] = this.brandId
|
|
206
|
-
this.fixedAddForm['m_f_brand_id'] = this.brandId
|
|
207
|
-
this.getDeviceBrand(this.brandId)
|
|
208
|
-
},
|
|
209
|
-
onClose () {
|
|
210
|
-
this.$emit('update:visible', false)
|
|
211
|
-
},
|
|
212
|
-
// 通用徽标过滤器
|
|
213
|
-
badgeFilter (key, value) {
|
|
214
|
-
const object = this.$appdata.getParam(key)
|
|
215
|
-
if (object.hasOwnProperty(value)) {
|
|
216
|
-
return object[value]
|
|
217
|
-
} else {
|
|
218
|
-
return {
|
|
219
|
-
'status': 'default',
|
|
220
|
-
'text': '未知类型:' + value
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
},
|
|
224
|
-
// 获取设备品牌详情信息
|
|
225
|
-
getDeviceBrand (brandId) {
|
|
226
|
-
this.loadDeviceBrandDetails = true
|
|
227
|
-
return post(DeviceBrandDetailsViewApi.getDeviceBrandDetails, {
|
|
228
|
-
id: brandId
|
|
229
|
-
}).then(res => {
|
|
230
|
-
this.details = res
|
|
231
|
-
this.loadDeviceBrandDetails = false
|
|
232
|
-
}, err => {
|
|
233
|
-
this.loadDeviceBrandDetails = false
|
|
234
|
-
console.error(err)
|
|
235
|
-
})
|
|
236
|
-
},
|
|
237
|
-
// Tab切换
|
|
238
|
-
handleTabChange (key) {
|
|
239
|
-
this.tabActiveKey = key
|
|
240
|
-
if (key === '2') {
|
|
241
|
-
this.getDeviceBrandInstruct(this.details.f_type_id)
|
|
242
|
-
}
|
|
243
|
-
},
|
|
244
|
-
// 获取指令
|
|
245
|
-
getDeviceBrandInstruct (typeId) {
|
|
246
|
-
return post(DeviceBrandDetailsViewApi.getDeviceBrandInstructs, {
|
|
247
|
-
typeId: typeId
|
|
248
|
-
}).then(res => {
|
|
249
|
-
for (const i of res.keys()) {
|
|
250
|
-
res[i].key = res[i].key + ''
|
|
251
|
-
res[i].disabled = false
|
|
252
|
-
}
|
|
253
|
-
const instructKeys = this.details.f_instruct_array ? this.details.f_instruct_array : []
|
|
254
|
-
const resKeys = this.getRealTargetKeys(instructKeys, res)
|
|
255
|
-
this.mockData = res
|
|
256
|
-
this.targetKeys = resKeys
|
|
257
|
-
}, err => {
|
|
258
|
-
console.error(err)
|
|
259
|
-
})
|
|
260
|
-
},
|
|
261
|
-
// 穿梭框
|
|
262
|
-
onChange (nextTargetKeys) {
|
|
263
|
-
this.targetKeys = nextTargetKeys
|
|
264
|
-
},
|
|
265
|
-
getRowSelection ({ disabled, selectedKeys, itemSelectAll, itemSelect }) {
|
|
266
|
-
const _this = this
|
|
267
|
-
return {
|
|
268
|
-
getCheckboxProps: item => ({ props: { disabled: disabled || item.disabled } }),
|
|
269
|
-
onSelectAll (selected, selectedRows) {
|
|
270
|
-
const treeSelectedKeys = selectedRows
|
|
271
|
-
.filter(item => !item.disabled)
|
|
272
|
-
.map(({ key }) => key)
|
|
273
|
-
const diffKeys = selected
|
|
274
|
-
? _this.difference(treeSelectedKeys, selectedKeys)
|
|
275
|
-
: _this.difference(selectedKeys, treeSelectedKeys)
|
|
276
|
-
itemSelectAll(diffKeys, selected)
|
|
277
|
-
},
|
|
278
|
-
onSelect ({ key }, selected) {
|
|
279
|
-
itemSelect(key, selected)
|
|
280
|
-
},
|
|
281
|
-
selectedRowKeys: selectedKeys
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
|
-
difference (keysA, keysB) {
|
|
285
|
-
const result = []
|
|
286
|
-
let isSame = false
|
|
287
|
-
for (const itemA in keysA) {
|
|
288
|
-
for (const itemB in keysB) {
|
|
289
|
-
if (itemA === itemB) {
|
|
290
|
-
isSame = true
|
|
291
|
-
break
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
if (!isSame) {
|
|
295
|
-
result.push(itemA)
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
return Object.assign(result, keysA)
|
|
299
|
-
},
|
|
300
|
-
saveInstructType () {
|
|
301
|
-
this.saveInstructTypeLoading = true
|
|
302
|
-
const resKeys = this.getRealTargetKeys(this.targetKeys, this.mockData)
|
|
303
|
-
return post(DeviceBrandDetailsViewApi.updateBrandInstructKeys, {
|
|
304
|
-
brandId: this.brandId,
|
|
305
|
-
resKeys: resKeys
|
|
306
|
-
}).then(res => {
|
|
307
|
-
this.$message.success('保存成功')
|
|
308
|
-
this.getDeviceBrand(this.brandId)
|
|
309
|
-
this.saveInstructTypeLoading = false
|
|
310
|
-
}, err => {
|
|
311
|
-
console.error(err)
|
|
312
|
-
this.saveInstructTypeLoading = false
|
|
313
|
-
})
|
|
314
|
-
},
|
|
315
|
-
getRealTargetKeys (targetKeys, mockData) {
|
|
316
|
-
const resKeys = mockData.map(({ key }) => key)
|
|
317
|
-
for (const instructKey of targetKeys) {
|
|
318
|
-
for (const i in resKeys) {
|
|
319
|
-
if (instructKey === resKeys[i]) {
|
|
320
|
-
resKeys.splice(i, 1)
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
return resKeys
|
|
325
|
-
},
|
|
326
|
-
toCreateQuery () {
|
|
327
|
-
this.createQueryVisible = true
|
|
328
|
-
},
|
|
329
|
-
toEditQuery () {
|
|
330
|
-
this.editQueryVisible = true
|
|
331
|
-
},
|
|
332
|
-
// 获取参数项配置
|
|
333
|
-
getColumnJson (callback) {
|
|
334
|
-
let data
|
|
335
|
-
if (this.details.f_brand_set_params_json) {
|
|
336
|
-
data = JSON.parse(this.details.f_brand_set_params_json)
|
|
337
|
-
} else {
|
|
338
|
-
data = {}
|
|
339
|
-
}
|
|
340
|
-
if (callback) {
|
|
341
|
-
callback(data)
|
|
342
|
-
}
|
|
343
|
-
return data
|
|
344
|
-
},
|
|
345
|
-
// 存储查询配置信息
|
|
346
|
-
saveQueryParams (source) {
|
|
347
|
-
return post(DeviceBrandDetailsViewApi.updateDeviceBrandJsonParams, {
|
|
348
|
-
id: this.brandId,
|
|
349
|
-
source: source
|
|
350
|
-
}).then(res => {
|
|
351
|
-
this.$message.success('保存查询配置成功')
|
|
352
|
-
this.getDeviceBrand(this.brandId)
|
|
353
|
-
}, err => {
|
|
354
|
-
console.error(err)
|
|
355
|
-
})
|
|
356
|
-
},
|
|
357
|
-
// 存储设备品牌默认参数值
|
|
358
|
-
saveDeviceParams (source, callback) {
|
|
359
|
-
source['id'] = this.brandId
|
|
360
|
-
return post(DeviceBrandDetailsViewApi.updateDeviceDefaultParams, source).then(res => {
|
|
361
|
-
const result = true
|
|
362
|
-
callback(result)
|
|
363
|
-
this.initView()
|
|
364
|
-
this.tabActiveKey = '3'
|
|
365
|
-
}).catch(e => {
|
|
366
|
-
const result = false
|
|
367
|
-
callback(result)
|
|
368
|
-
})
|
|
369
|
-
}
|
|
370
|
-
},
|
|
371
|
-
watch: {
|
|
372
|
-
'visible' (val) {
|
|
373
|
-
if (val) {
|
|
374
|
-
this.initView()
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
</script>
|
|
380
|
-
|
|
381
|
-
<style lang="less" scoped>
|
|
382
|
-
.business {
|
|
383
|
-
color: #ffffff;
|
|
384
|
-
}
|
|
385
|
-
.business:enabled:hover {
|
|
386
|
-
background-color: #85CE61 !important;
|
|
387
|
-
border-color: #85CE61 !important;
|
|
388
|
-
}
|
|
389
|
-
.business:enabled {
|
|
390
|
-
background-color: #67c23a;
|
|
391
|
-
border-color: #67c23a;
|
|
392
|
-
}
|
|
393
|
-
.business:disabled {
|
|
394
|
-
color: rgba(0, 0, 0, 0.25);
|
|
395
|
-
}
|
|
396
|
-
.detail-layout {
|
|
397
|
-
margin-left: 44px;
|
|
398
|
-
}
|
|
399
|
-
.text {
|
|
400
|
-
color: rgba(0, 0, 0, .45);
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.heading {
|
|
404
|
-
color: rgba(0, 0, 0, .85);
|
|
405
|
-
font-size: 20px;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
.no-data {
|
|
409
|
-
color: rgba(0, 0, 0, .25);
|
|
410
|
-
text-align: center;
|
|
411
|
-
line-height: 64px;
|
|
412
|
-
font-size: 16px;
|
|
413
|
-
|
|
414
|
-
i {
|
|
415
|
-
font-size: 24px;
|
|
416
|
-
margin-right: 16px;
|
|
417
|
-
position: relative;
|
|
418
|
-
top: 3px;
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
.mobile {
|
|
423
|
-
.detail-layout {
|
|
424
|
-
margin-left: unset;
|
|
425
|
-
}
|
|
426
|
-
.text {
|
|
427
|
-
|
|
428
|
-
}
|
|
429
|
-
.status-list {
|
|
430
|
-
text-align: left;
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
.row {
|
|
435
|
-
display: flex;
|
|
436
|
-
|
|
437
|
-
.content {
|
|
438
|
-
-webkit-box-flex: 1;
|
|
439
|
-
flex: auto;
|
|
440
|
-
-ms-flex: auto;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
.extra {
|
|
444
|
-
flex: 0 1 auto;
|
|
445
|
-
-webkit-box-flex: 0;
|
|
446
|
-
-ms-flex: 0 1 auto;
|
|
447
|
-
min-width: 242px;
|
|
448
|
-
margin-left: 88px;
|
|
449
|
-
text-align: right;
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
</style>
|