Browse Source

应用列表增加公共私有状态

gzb
guozhongbo 8 months ago
parent
commit
a3f1444de6

+ 36
- 3
src/views/regionSection/applicationManage/applicationManage.vue View File

@@ -37,7 +37,11 @@
37 37
               <img :src="$api.showImageUrl + row.appIcon" />
38 38
             </div>
39 39
             <div class="app_comm">
40
-              <div>{{ row.appName }}</div>
40
+              <div>
41
+                {{ row.appName }}
42
+                <div v-if="row.belong === 1" class="app_tag">公共</div>
43
+                <div v-else-if="row.belong === 2" class="web_tag">私有</div>
44
+              </div>
41 45
               <span>版本: {{ row.versionName }}</span>
42 46
               <div @click="see_device(row)" style="cursor: pointer">
43 47
                 授权型号: {{ row.devicenum }}个
@@ -49,7 +53,11 @@
49 53
           <div>{{ row.appType === 1 ? "推荐应用" : "必装应用" }}</div>
50 54
         </template>
51 55
         <template slot-scope="{ row }" slot="enabled">
56
+          <div v-if="row.belong === 1">
57
+            {{ row.enabled === 1 ? "启用" : "禁用" }}
58
+          </div>
52 59
           <i-switch
60
+            v-if="row.belong === 2"
53 61
             size="large"
54 62
             v-model="row.enabled"
55 63
             :true-value="1"
@@ -388,6 +396,7 @@
388 396
           >
389 397
             <Input
390 398
               v-model="wallpaperInfo.versionName"
399
+              disabled
391 400
               placeholder="请输入版本名称"
392 401
             ></Input>
393 402
           </FormItem>
@@ -398,6 +407,7 @@
398 407
           >
399 408
             <Input
400 409
               v-model="wallpaperInfo.versionNum"
410
+              disabled
401 411
               placeholder="请输入版本号码"
402 412
             ></Input>
403 413
           </FormItem>
@@ -408,6 +418,7 @@
408 418
           >
409 419
             <Input
410 420
               v-model="wallpaperInfo.appSize"
421
+              disabled
411 422
               placeholder="请输入应用大小"
412 423
             ></Input>
413 424
           </FormItem>
@@ -482,7 +493,7 @@
482 493
                 <div class="school_list">
483 494
                   <span
484 495
                     class="school_item"
485
-                    v-for="(item, index) in this.select_schools"
496
+                    v-for="item in this.select_schools"
486 497
                     :key="item.schoolid"
487 498
                   >
488 499
                     <span class="title" :title="item.title">{{
@@ -990,7 +1001,7 @@ export default {
990 1001
       this.viewInfo.appAbbr = obj.appAbbr;
991 1002
       this.viewInfo.appDeveloper = obj.appDeveloper;
992 1003
       this.viewInfo.appIcon = obj.appIcon;
993
-      this.viewInfo.appImg = obj.appImg?obj.appImg.split(";"):[];
1004
+      this.viewInfo.appImg = obj.appImg ? obj.appImg.split(";") : [];
994 1005
       this.viewInfo.appPackage = obj.appPackage;
995 1006
       this.viewInfo.appRenew = obj.appRenew;
996 1007
       this.viewInfo.appSize = obj.appSize;
@@ -1738,6 +1749,28 @@ export default {
1738 1749
       div {
1739 1750
         color: #339dff;
1740 1751
       }
1752
+      .app_tag {
1753
+        display: inline-block;
1754
+        margin-left: 4px;
1755
+        width: 32px;
1756
+        text-align: center;
1757
+        color: #fff;
1758
+        line-height: 1.6;
1759
+        font-size: 12px;
1760
+        border-radius: 5px;
1761
+        background-color: #7854f6;
1762
+      }
1763
+      .web_tag {
1764
+        display: inline-block;
1765
+        margin-left: 4px;
1766
+        width: 32px;
1767
+        text-align: center;
1768
+        color: #fff;
1769
+        line-height: 1.6;
1770
+        font-size: 12px;
1771
+        border-radius: 5px;
1772
+        background-color: #52c41a;
1773
+      }
1741 1774
     }
1742 1775
   }
1743 1776
 }

+ 32
- 2
src/views/regionSection/search/allApps.vue View File

@@ -23,7 +23,11 @@
23 23
               <img :src="$api.showImageUrl + row.appIcon" />
24 24
             </div>
25 25
             <div class="app_comm">
26
-              <div>{{ row.appName }}</div>
26
+              <div>
27
+                {{ row.appName }}
28
+                <div v-if="row.belong === 1" class="app_tag">公共</div>
29
+                <div v-else-if="row.belong === 2" class="web_tag">私有</div>
30
+              </div>
27 31
               <span>版本: {{ row.versionName }}</span>
28 32
               <div @click="see_device(row)" style="cursor: pointer">
29 33
                 授权型号: {{ row.devicenum }}个
@@ -35,8 +39,12 @@
35 39
           <div>{{ row.appType === 1 ? "推荐应用" : "必装应用" }}</div>
36 40
         </template>
37 41
         <template slot-scope="{ row }" slot="enabled">
42
+          <div v-if="row.belong === 1">
43
+            {{ row.enabled === 1 ? "启用" : "禁用" }}
44
+          </div>
38 45
           <i-switch
39 46
             size="large"
47
+            v-if="row.belong === 1"
40 48
             v-model="row.enabled"
41 49
             :true-value="1"
42 50
             :false-value="2"
@@ -813,7 +821,7 @@ export default {
813 821
       this.viewInfo.appAbbr = obj.appAbbr;
814 822
       this.viewInfo.appDeveloper = obj.appDeveloper;
815 823
       this.viewInfo.appIcon = obj.appIcon;
816
-      this.viewInfo.appImg = obj.appImg?obj.appImg.split(";"):[];
824
+      this.viewInfo.appImg = obj.appImg ? obj.appImg.split(";") : [];
817 825
       this.viewInfo.appPackage = obj.appPackage;
818 826
       this.viewInfo.appRenew = obj.appRenew;
819 827
       this.viewInfo.appSize = obj.appSize;
@@ -964,6 +972,28 @@ export default {
964 972
       div {
965 973
         color: #339dff;
966 974
       }
975
+      .app_tag {
976
+        display: inline-block;
977
+        margin-left: 4px;
978
+        width: 32px;
979
+        text-align: center;
980
+        color: #fff;
981
+        line-height: 1.6;
982
+        font-size: 12px;
983
+        border-radius: 5px;
984
+        background-color: #7854f6;
985
+      }
986
+      .web_tag {
987
+        display: inline-block;
988
+        margin-left: 4px;
989
+        width: 32px;
990
+        text-align: center;
991
+        color: #fff;
992
+        line-height: 1.6;
993
+        font-size: 12px;
994
+        border-radius: 5px;
995
+        background-color: #52c41a;
996
+      }
967 997
     }
968 998
   }
969 999
 }

+ 38
- 3
src/views/schoolSection/applicationManage/applicationList.vue View File

@@ -53,7 +53,11 @@
53 53
               <img :src="$api.showImageUrl + row.appIcon" />
54 54
             </div>
55 55
             <div class="app_comm">
56
-              <div>{{ row.appName }}</div>
56
+              <div>
57
+                {{ row.appName }}
58
+                <div v-if="row.belong === 1" class="app_tag">公共</div>
59
+                <div v-else-if="row.belong === 2" class="web_tag">私有</div>
60
+              </div>
57 61
               <span>版本: {{ row.versionName }}</span>
58 62
               <div @click="see_device(row)" style="cursor: pointer">
59 63
                 授权型号: {{ row.devicenum }}个
@@ -65,7 +69,11 @@
65 69
           <div>{{ row.appType === 1 ? "推荐应用" : "必装应用" }}</div>
66 70
         </template>
67 71
         <template slot-scope="{ row }" slot="enabled">
72
+          <div v-if="row.belong === 1">
73
+            {{ row.enabled === 1 ? "启用" : "禁用" }}
74
+          </div>
68 75
           <i-switch
76
+            v-if="row.belong === 2"
69 77
             size="large"
70 78
             v-model="row.enabled"
71 79
             :true-value="1"
@@ -251,7 +259,9 @@
251 259
                 <Radio :label="1">是</Radio>
252 260
                 <Radio :label="0">否</Radio>
253 261
               </RadioGroup>
254
-              <span>选择添加到已有策略,则当前应用会被添加到其授权的且不存在相同包名应用的学校策略。</span>
262
+              <span
263
+                >选择添加到已有策略,则当前应用会被添加到其授权的且不存在相同包名应用的学校策略。</span
264
+              >
255 265
             </div>
256 266
           </FormItem>
257 267
           <FormItem label="适配设备" style="width: 100%" class="require">
@@ -366,6 +376,7 @@
366 376
             <Input
367 377
               v-model="wallpaperInfo.versionName"
368 378
               placeholder="请输入版本名称"
379
+              disabled
369 380
             ></Input>
370 381
           </FormItem>
371 382
           <FormItem
@@ -376,6 +387,7 @@
376 387
             <Input
377 388
               v-model="wallpaperInfo.versionNum"
378 389
               placeholder="请输入版本号码"
390
+              disabled
379 391
             ></Input>
380 392
           </FormItem>
381 393
           <FormItem
@@ -386,6 +398,7 @@
386 398
             <Input
387 399
               v-model="wallpaperInfo.appSize"
388 400
               placeholder="请输入应用大小"
401
+              disabled
389 402
             ></Input>
390 403
           </FormItem>
391 404
           <FormItem label="开发者" style="width: calc(50% - 10px)">
@@ -955,7 +968,7 @@ export default {
955 968
       this.viewInfo.appAbbr = obj.appAbbr;
956 969
       this.viewInfo.appDeveloper = obj.appDeveloper;
957 970
       this.viewInfo.appIcon = obj.appIcon;
958
-      this.viewInfo.appImg = obj.appImg?obj.appImg.split(";"):[];
971
+      this.viewInfo.appImg = obj.appImg ? obj.appImg.split(";") : [];
959 972
       this.viewInfo.appPackage = obj.appPackage;
960 973
       this.viewInfo.appRenew = obj.appRenew;
961 974
       this.viewInfo.appSize = obj.appSize;
@@ -1598,6 +1611,28 @@ export default {
1598 1611
       div {
1599 1612
         color: #339dff;
1600 1613
       }
1614
+      .app_tag {
1615
+        display: inline-block;
1616
+        margin-left: 4px;
1617
+        width: 32px;
1618
+        text-align: center;
1619
+        color: #fff;
1620
+        line-height: 1.6;
1621
+        font-size: 12px;
1622
+        border-radius: 5px;
1623
+        background-color: #7854f6;
1624
+      }
1625
+      .web_tag {
1626
+        display: inline-block;
1627
+        margin-left: 4px;
1628
+        width: 32px;
1629
+        text-align: center;
1630
+        color: #fff;
1631
+        line-height: 1.6;
1632
+        font-size: 12px;
1633
+        border-radius: 5px;
1634
+        background-color: #52c41a;
1635
+      }
1601 1636
     }
1602 1637
   }
1603 1638
 }

Loading…
Cancel
Save