liyongli 1 an în urmă
părinte
comite
11f27b5b56

+ 14 - 3
src/view/allMedia/imageProcessing/index.vue

@@ -51,7 +51,11 @@
         </el-table-column>
         <el-table-column align="center" prop="statusCode" label="审核结果">
           <template #default="scope">
-            {{ scope.row.reviewResult ? scope.row.reviewResult.labelDesc : '-' }}
+            <el-tag :type="scope.row.reviewResult ? status[scope.row.reviewResult.label] : 'info'">
+              {{
+                scope.row.reviewResult ? scope.row.reviewResult.labelDesc : '-'
+              }}
+            </el-tag>
           </template>
         </el-table-column>
         <el-table-column align="center" prop="address" label="操作">
@@ -68,7 +72,7 @@
               @confirm="deleteRow(scope.row)"
             >
               <template #reference>
-                <el-button size="small" type="danger"> 删除 </el-button>
+                <el-button size="small"> 删除 </el-button>
               </template>
             </el-popconfirm>
           </template>
@@ -137,10 +141,17 @@ const fileList = ref([]);
 const input = ref('');
 const page_data = ref({
   page: 1,
-  pageSize: 10,
+  pageSize: 20,
   title: '',
   total: 0
 });
+
+const status = {
+  REJECT: 'danger',
+  REVIEW: 'warning',
+  NORMAL: 'success'
+};
+
 const tableData = ref([]);
 getList();
 

+ 37 - 2
src/view/allMedia/main.vue

@@ -12,7 +12,7 @@
         :key="index"
         :class="{
           'menu-item': true,
-          active: selectMenu == item.path,
+          active: selectMenu == item.path
         }"
       >
         <span
@@ -30,6 +30,7 @@
 <script setup>
 // import header_local from './components/header.vue';
 import { ref } from 'vue';
+import { ElMessage } from 'element-plus';
 import { useRoute, useRouter } from 'vue-router';
 
 const Router = useRouter();
@@ -52,9 +53,43 @@ const selectMenuFunc = item => {
   document.title = item.title;
   Router.push({
     path: item.path,
-    query: {},
+    query: {}
   });
 };
+
+/**
+ * @description: 通知权限
+ * 1 如果用户已经同意授权,返回值为granted;
+ * 2 如果用户已经拒绝授权,返回值为denied;
+ * 3 如果用户还没有作出选择,返回值为default;
+ */
+function notificationFunc() {
+  if (!Notification) return;
+  if (Notification.permission == 'denied') return;
+  if (Notification.permission === 'default') Notification.requestPermission();
+
+  const permission = {
+    denied: '拒绝授权',
+    granted: '同意授权',
+    default: '不明授权'
+  };
+
+  console.log(permission[Notification.permission]);
+
+  //   if (Notification.permission === 'granted') {
+  //     // 如果用户允许系统提醒,则创建一个通知
+  //     var notification = new Notification('这是一个系统提醒', {
+  //       body: '这是提醒的正文内容',
+  //       icon: 'path/to/icon.png' // 可选的图标路径
+  //     });
+
+  //     // 可以在通知被点击时执行一些操作
+  //     notification.onclick = function () {
+  //       console.log('用户点击了系统提醒');
+  //     };
+  //   }
+}
+notificationFunc();
 </script>
 
 <style scoped>

+ 13 - 3
src/view/allMedia/videoProcessing/index.vue

@@ -51,7 +51,11 @@
         </el-table-column>
         <el-table-column align="center" prop="statusCode" label="审核结果">
           <template #default="scope">
-            {{ scope.row.reviewResult ? scope.row.reviewResult.labelDesc : '-' }}
+            <el-tag :type="scope.row.reviewResult ? status[scope.row.reviewResult.label] : 'info'">
+              {{
+                scope.row.reviewResult ? scope.row.reviewResult.labelDesc : '-'
+              }}
+            </el-tag>
           </template>
         </el-table-column>
         <el-table-column align="center" prop="address" label="操作">
@@ -68,7 +72,7 @@
               @confirm="deleteRow(scope.row)"
             >
               <template #reference>
-                <el-button size="small" type="danger"> 删除 </el-button>
+                <el-button size="small"> 删除 </el-button>
               </template>
             </el-popconfirm>
           </template>
@@ -132,11 +136,17 @@ const fileList = ref([]);
 const input = ref('');
 const page_data = ref({
   page: 1,
-  pageSize: 10,
+  pageSize: 20,
   title: '',
   total: 0
 });
 const tableData = ref([]);
+
+const status = {
+  REJECT: 'danger',
+  REVIEW: 'warning',
+  NORMAL: 'success'
+};
 getList();
 
 function upProgress(par) {