|
@@ -10,7 +10,6 @@
|
10
|
10
|
style="width: 150px"
|
11
|
11
|
/>
|
12
|
12
|
</div>
|
13
|
|
- <Button type="primary" class="primary_btn" @click="toAdd()">新建</Button>
|
14
|
13
|
</div>
|
15
|
14
|
<div class="table_wrap">
|
16
|
15
|
<Table :columns="columns" :data="searchForm.list">
|
|
@@ -46,119 +45,11 @@
|
46
|
45
|
show-sizer
|
47
|
46
|
></Page>
|
48
|
47
|
</div>
|
49
|
|
- <!-- 新建/编辑 -->
|
50
|
|
- <Modal
|
51
|
|
- class="modal1"
|
52
|
|
- :mask-closable="false"
|
53
|
|
- v-model="whiteLibraryInfo.show"
|
54
|
|
- :title="whiteLibraryInfo.whiteid ? '编辑' : '新建'"
|
55
|
|
- >
|
56
|
|
- <Form
|
57
|
|
- v-if="whiteLibraryInfo.show"
|
58
|
|
- ref="addForm"
|
59
|
|
- :model="whiteLibraryInfo"
|
60
|
|
- :rules="rules"
|
61
|
|
- :label-width="90"
|
62
|
|
- inline
|
63
|
|
- >
|
64
|
|
- <FormItem label="名称" prop="name" style="width: 100%">
|
65
|
|
- <Input
|
66
|
|
- v-model="whiteLibraryInfo.name"
|
67
|
|
- placeholder="请输入名称"
|
68
|
|
- ></Input>
|
69
|
|
- </FormItem>
|
70
|
|
- <FormItem label="类型" prop="wltype" style="width: 100%">
|
71
|
|
- <RadioGroup v-model="whiteLibraryInfo.wltype">
|
72
|
|
- <Radio :label="1">APP</Radio>
|
73
|
|
- <Radio :label="2">网址</Radio>
|
74
|
|
- </RadioGroup>
|
75
|
|
- </FormItem>
|
76
|
|
- <template v-if="whiteLibraryInfo.wltype === 1">
|
77
|
|
- <FormItem
|
78
|
|
- label="版本名称"
|
79
|
|
- prop="versionname"
|
80
|
|
- style="width: calc(50% - 10px)"
|
81
|
|
- >
|
82
|
|
- <Input
|
83
|
|
- v-model="whiteLibraryInfo.versionname"
|
84
|
|
- placeholder="请输入版本名称"
|
85
|
|
- ></Input>
|
86
|
|
- </FormItem>
|
87
|
|
- <FormItem label="包名" prop="website" style="width: calc(50% - 10px)">
|
88
|
|
- <Input
|
89
|
|
- v-model="whiteLibraryInfo.website"
|
90
|
|
- placeholder="请输入包名"
|
91
|
|
- ></Input>
|
92
|
|
- </FormItem>
|
93
|
|
- </template>
|
94
|
|
- <FormItem label="简介" prop="comm" style="width: 100%">
|
95
|
|
- <Input
|
96
|
|
- v-model="whiteLibraryInfo.comm"
|
97
|
|
- placeholder="请输入简介"
|
98
|
|
- ></Input>
|
99
|
|
- </FormItem>
|
100
|
|
- <FormItem label="网址" prop="whiteAddress" style="width: 100%">
|
101
|
|
- <Input
|
102
|
|
- type="textarea"
|
103
|
|
- v-model="whiteLibraryInfo.whiteAddress"
|
104
|
|
- placeholder="请填写正确的IP地址或者域名,多个IP或域名之间用英文分号隔开"
|
105
|
|
- ></Input>
|
106
|
|
- <div style="color: #7c8db5">
|
107
|
|
- 说明:IP例如:192.168.1.200或者192.168.1.200/24,域名例如:new.iflytek.com
|
108
|
|
- </div>
|
109
|
|
- </FormItem>
|
110
|
|
- </Form>
|
111
|
|
- <div slot="footer">
|
112
|
|
- <Button @click="whiteLibraryInfo.show = false">取消</Button>
|
113
|
|
- <Button @click="saveAddInfo()" type="primary">保存</Button>
|
114
|
|
- </div>
|
115
|
|
- </Modal>
|
116
|
|
- <!-- 查看 -->
|
117
|
|
- <Modal
|
118
|
|
- class="modal1"
|
119
|
|
- :mask-closable="false"
|
120
|
|
- v-model="viewInfo.show"
|
121
|
|
- title="查看"
|
122
|
|
- >
|
123
|
|
- <div class="view_title">
|
124
|
|
- <div>{{ viewInfo.name }}</div>
|
125
|
|
- <div v-if="viewInfo.wltype === 1" class="wltype_1">APP</div>
|
126
|
|
- <div v-if="viewInfo.wltype === 2" class="wltype_2">网址</div>
|
127
|
|
- </div>
|
128
|
|
- <Form :label-width="80" inline>
|
129
|
|
- <template v-if="viewInfo.wltype === 1">
|
130
|
|
- <FormItem
|
131
|
|
- label="版本名称"
|
132
|
|
- style="margin-bottom: 0; width: calc(50% - 10px)"
|
133
|
|
- >{{ viewInfo.versionname }}</FormItem
|
134
|
|
- >
|
135
|
|
- <FormItem
|
136
|
|
- label="包名"
|
137
|
|
- style="margin-bottom: 0; width: calc(50% - 10px)"
|
138
|
|
- >{{ viewInfo.website }}</FormItem
|
139
|
|
- >
|
140
|
|
- </template>
|
141
|
|
- <FormItem label="简介" style="margin-bottom: 0; width: 100%">{{
|
142
|
|
- viewInfo.comm
|
143
|
|
- }}</FormItem>
|
144
|
|
- <FormItem label="网址" style="margin-bottom: 0; width: 100%">{{
|
145
|
|
- viewInfo.whiteAddress
|
146
|
|
- }}</FormItem>
|
147
|
|
- </Form>
|
148
|
|
- <div slot="footer" style="text-align: center">
|
149
|
|
- <Button @click="viewInfo.show = false">关闭</Button>
|
150
|
|
- </div>
|
151
|
|
- </Modal>
|
152
|
48
|
</div>
|
153
|
49
|
</template>
|
154
|
50
|
|
155
|
51
|
<script>
|
156
|
|
-import {
|
157
|
|
- whiteLibrary_list,
|
158
|
|
- whiteLibrary_add,
|
159
|
|
- whiteLibrary_edit,
|
160
|
|
- whiteLibrary_delete, whiteLibrary_add_white
|
161
|
|
-} from "@/api/whiteLibrary";
|
|
52
|
+import { whiteLibrary_list, whiteLibrary_add_white } from "@/api/whiteLibrary";
|
162
|
53
|
export default {
|
163
|
54
|
data() {
|
164
|
55
|
return {
|
|
@@ -169,54 +60,6 @@ export default {
|
169
|
60
|
list: [],
|
170
|
61
|
total: 0
|
171
|
62
|
},
|
172
|
|
- rules: {
|
173
|
|
- name: [
|
174
|
|
- {
|
175
|
|
- required: true,
|
176
|
|
- message: "请输入名称",
|
177
|
|
- trigger: "change"
|
178
|
|
- }
|
179
|
|
- ],
|
180
|
|
- wltype: [
|
181
|
|
- {
|
182
|
|
- required: true,
|
183
|
|
- type: "number",
|
184
|
|
- message: "请选择状态",
|
185
|
|
- trigger: "change"
|
186
|
|
- }
|
187
|
|
- ],
|
188
|
|
- versionname: [
|
189
|
|
- {
|
190
|
|
- required: true,
|
191
|
|
- message: "请输入版本名称",
|
192
|
|
- trigger: "change"
|
193
|
|
- }
|
194
|
|
- ]
|
195
|
|
- },
|
196
|
|
- // 新建/编辑
|
197
|
|
- whiteLibraryInfo: {
|
198
|
|
- show: false,
|
199
|
|
- whiteid: null,
|
200
|
|
- rversion: null,
|
201
|
|
- name: "",
|
202
|
|
- // 1app 2网页
|
203
|
|
- wltype: 1,
|
204
|
|
- website: "",
|
205
|
|
- versionname: "",
|
206
|
|
- comm: "",
|
207
|
|
- whiteAddress: ""
|
208
|
|
- },
|
209
|
|
- // 查看
|
210
|
|
- viewInfo: {
|
211
|
|
- show: false,
|
212
|
|
- name: "",
|
213
|
|
- // 1app 2网页
|
214
|
|
- wltype: 1,
|
215
|
|
- website: "",
|
216
|
|
- versionname: "",
|
217
|
|
- comm: "",
|
218
|
|
- whiteAddress: ""
|
219
|
|
- },
|
220
|
63
|
userInfo: {},
|
221
|
64
|
columns: [
|
222
|
65
|
{
|
|
@@ -242,11 +85,6 @@ export default {
|
242
|
85
|
key: "versionName",
|
243
|
86
|
align: "center"
|
244
|
87
|
},
|
245
|
|
- {
|
246
|
|
- title: "版本号",
|
247
|
|
- key: "rversion",
|
248
|
|
- align: "center"
|
249
|
|
- },
|
250
|
88
|
{
|
251
|
89
|
title: "包名",
|
252
|
90
|
key: "website",
|
|
@@ -305,7 +143,6 @@ export default {
|
305
|
143
|
}).then((data) => {
|
306
|
144
|
if (data.code === 0) {
|
307
|
145
|
this.searchForm.list = data.obj.data;
|
308
|
|
- console.log(this.searchForm.list);
|
309
|
146
|
this.searchForm.total = data.obj.total;
|
310
|
147
|
} else {
|
311
|
148
|
this.$Message.error(data.msg);
|