Parcourir la source

update router and task track

wangxiao il y a 2 ans
Parent
commit
9d8eb0d208

+ 10 - 3
src/pages/Iot/sys/notice.vue

@@ -40,6 +40,12 @@
       @change="changePage"
     >
       <template #bodyCell="{column, record}">
+        <template v-if="column.key === 'id'" >
+          <a @click="openModal('update', record.id)" >{{record.id}}</a>
+        </template>
+        <template v-if="column.key === 'source'" >
+          {{record.source == '0'?'消息通知':'告警'}}
+        </template>
             <template v-if="column.key === 'status'" >
               <a-switch
                 @click="changeStatus(record)"
@@ -78,8 +84,8 @@
       </a-form-item>
       <a-form-item label="数据来源" >
         <a-radio-group v-model:value="modalRef.source">
-          <a-radio :value="0">通知</a-radio>
-          <a-radio :value="1">告</a-radio>
+          <a-radio :value="0">消息通知</a-radio>
+          <a-radio :value="1">告</a-radio>
         </a-radio-group>
       </a-form-item>
       <a-form-item label="状态" >
@@ -173,7 +179,8 @@ const useForm = Form.useForm
 const columns = [
   {
     title: 'id',
-    dataIndex: 'id'
+    dataIndex: 'id',
+    key: 'id'
   },
   {
     title: '通知名称',

+ 2 - 17
src/pages/Iot/sys/email.vue → src/pages/Iot/sys/noticeway.vue

@@ -2,23 +2,8 @@
 <a-spin :spinning="state.loading" >
   <a-row :gutter="[16, 16]">
       <a-col span="6" >
-        <a-card>
+        <a-card title="邮箱配置">
           <a-row>
-            <!-- <a-col span="24" class="logo-box" >
-              <img class="logo" :src="logoPng" />
-              <div class="label center" >{{ state.sys.sysLabel}}</div>
-            </a-col>
-            <a-col span="24" style="margin-top: 20px;" >
-              <a-row justify="center" >
-                <a-space>
-                  <a-tag color="pink" >蛟龙</a-tag>
-                  <a-tag color="red" >云联</a-tag>
-                  <a-tag color="orange" >快速</a-tag>
-                  <a-tag color="green" >简洁</a-tag>
-                  <a-tag color="cyan" >智慧</a-tag>
-                </a-space>
-              </a-row>
-            </a-col> -->
             <a-col  span="24" class="email" >
             <a-form>
               <a-form-item label="邮件地址📧" >
@@ -37,7 +22,7 @@
 
             </a-col>
             <a-col span="24" class="center" >
-              <a-button type="primary" @click="openModal" >修改</a-button>
+              <a-button type="primary" @click="openModal" >修改邮箱</a-button>
             </a-col>
           </a-row>
         </a-card>

+ 1 - 1
src/pages/Iot/task/track.vue

@@ -22,7 +22,7 @@
     <template #bodyCell="{column, record}">
       <template v-if="column.key === 'ts'" >
           {{dayjs(record.ts).format('YYYY/MM/DD HH:MM:ss')}}
-        </template>
+      </template>
           <template v-if="column.key === 'action'" >
             <a-space>
               <a @click="openModal('preview', record.id)" >详情</a>

+ 4 - 4
src/router/index.ts

@@ -160,13 +160,13 @@ export const routes: Array<ROUTER.RoutesProps> = [
       {
         path: '/sys',
         name: '系统设置',
-        redirect: '/sys/email',
+        redirect: '/sys/noticeway',
         icon: 'DatabaseOutlined',
         children: [
           {
-            path: '/sys/email',
-            name: '邮箱配置',
-            component: () => import('@/pages/iot/sys/email.vue')
+            path: '/sys/noticeway',
+            name: '通知方式',
+            component: () => import('@/pages/iot/sys/noticeway.vue')
           },
           {
             path: '/sys/notice',