Browse Source

区域白名单

gzb
guozhongbo 10 months ago
parent
commit
fdd25c4ed7

+ 37
- 7
src/views/regionSection/networkManage/whitelist.vue View File

@@ -22,6 +22,11 @@
22 22
             <div v-if="row.whiteType === 2" class="app_tag">公用</div>
23 23
           </div>
24 24
         </template>
25
+        <template slot-scope="{ row }" slot="website">
26
+          <div class="website" :title="row.website">
27
+            {{ row.website }}
28
+          </div>
29
+        </template>
25 30
         <template slot-scope="{ row }" slot="actionSlot">
26 31
           <div class="action_list">
27 32
             <div @click="toView(row)">查看</div>
@@ -154,12 +159,28 @@
154 159
         <div v-if="viewInfo.whiteType === 2" class="wltype_1">公共</div>
155 160
       </div>
156 161
       <Form :label-width="80" inline>
157
-        <FormItem label="简介" style="margin-bottom: 0; width: 100%">{{
158
-          viewInfo.comm
159
-        }}</FormItem>
160
-        <FormItem label="网址" style="margin-bottom: 0; width: 100%">{{
161
-          viewInfo.website
162
-        }}</FormItem>
162
+        <FormItem label="简介" style="margin-bottom: 0; width: 100%">
163
+          <div
164
+            style="
165
+              line-height: 36px;
166
+              word-wrap: break-word;
167
+              word-break: break-all;
168
+            "
169
+          >
170
+            {{ viewInfo.comm }}
171
+          </div></FormItem
172
+        >
173
+        <FormItem label="网址" style="margin-bottom: 0; width: 100%">
174
+          <div
175
+            style="
176
+              line-height: 36px;
177
+              word-wrap: break-word;
178
+              word-break: break-all;
179
+            "
180
+          >
181
+            {{ viewInfo.website }}
182
+          </div>
183
+        </FormItem>
163 184
         <FormItem label="授权" style="margin-bottom: 0; width: 100%">
164 185
           <Table border :columns="columns1" :data="viewInfo.schools"> </Table>
165 186
         </FormItem>
@@ -262,7 +283,7 @@ export default {
262 283
         },
263 284
         {
264 285
           title: "网址",
265
-          key: "website",
286
+          slot: "website",
266 287
           align: "center"
267 288
         },
268 289
         {
@@ -483,6 +504,7 @@ export default {
483 504
             targetSchool: res.obj.targetSchool,
484 505
             website: res.obj.website,
485 506
             regionid: res.obj.regionid,
507
+            whiteType: res.obj.whiteType,
486 508
             comm: res.obj.comm,
487 509
             schools: res.obj.schools
488 510
           };
@@ -704,4 +726,12 @@ export default {
704 726
   text-overflow: ellipsis;
705 727
   white-space: nowrap;
706 728
 }
729
+.table_wrap {
730
+  .website {
731
+    width: 100%;
732
+    overflow: hidden;
733
+    text-overflow: ellipsis;
734
+    white-space: nowrap;
735
+  }
736
+}
707 737
 </style>

+ 1
- 164
src/views/regionSection/networkManage/whitelistLibrary.vue View File

@@ -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);

Loading…
Cancel
Save