Bläddra i källkod

fix: 时间修正

lvkun996 2 år sedan
förälder
incheckning
7683e4f8b4

+ 0 - 1
src/pages/Iot/devOps/msgTracking.vue

@@ -157,7 +157,6 @@ const state = reactive({
 watch(
   () => time.value,
   () => {
-    console.log(dayjs(time.value).format('YYYY/MM/DD') === 'Invalid Date')
     if (dayjs(time.value).format('YYYY/MM/DD') === 'Invalid Date') {
       queryParamsState.startTime = ''
       queryParamsState.endTime = ''

+ 2 - 2
src/pages/Iot/device/components/overview.vue

@@ -44,7 +44,7 @@
             </span>
           </a-space>
         </a-descriptions-item>
-        <a-descriptions-item label="注册时间">{{ dayjs(state.deviceDetail?.createAt).format('YYYY-MM-DD hh:mm:ss') }}</a-descriptions-item>
+        <a-descriptions-item label="注册时间">{{ dayjs(state.deviceDetail?.createAt).format('YYYY-MM-DD HH:mm:ss') }}</a-descriptions-item>
         <a-descriptions-item label="节点类型">{{ state.deviceDetail?.deviceNodeType === 'GATEWAY' ? '直连' : '非直连'}}</a-descriptions-item>
     </a-descriptions>
 
@@ -76,7 +76,7 @@
             <template #title><span> {{item[CommonController.dataTypeByKeyMap.get(item.dataType)]}}</span> <span v-if='item.dataUnit'>{{item.dataUnit}}</span></template>
             <span class="data-type" >{{'<'}}  <div class='elip' >{{item[CommonController.dataTypeByKeyMap.get(item.dataType)]}}</div> <span v-if='item.dataUnit'>{{item.dataUnit}}</span> {{'>'}}</span>
           </a-tooltip>
-            <div>{{dayjs(item.ts).format('YYYY/MM/DD HH:MM:ss')}}</div>
+            <div>{{dayjs(item.ts).format('YYYY/MM/DD HH:mm:ss')}}</div>
           </div>
         </a-col>
       </template>

+ 2 - 2
src/pages/Iot/model/models.vue

@@ -18,10 +18,10 @@
           <a @click="goDetailPage(record.id)" >{{record.id}}</a>
         </template>
         <template v-if="column.key === 'createAt'" >
-          {{dayjs(record.createAt).format('YYYY/MM/DD HH:MM:ss')}}
+          {{dayjs(record.createAt).format('YYYY/MM/DD HH:mm:ss')}}
         </template>
         <template v-if="column.key === 'updateAt'" >
-          {{dayjs(record.updateAt).format('YYYY/MM/DD HH:MM:ss')}}
+          {{dayjs(record.updateAt).format('YYYY/MM/DD HH:mm:ss')}}
         </template>
         <template v-if="column.key === 'transportType'" >
           <a-tag  >{{record.transportType}}</a-tag>

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

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

+ 32 - 60
src/pages/cvs/video/device.vue

@@ -63,15 +63,22 @@
     </template>
 
   </table-pro>
+</a-card>
 
-  <modal-pro
-    style="width: 1000px;"
-    label="接入设备"
-    :open="state.visible"
-    @cancel="state.visible = false"
-    @ok="ok"
-  >
-  <a-form  style="width: 100%;" :labelCol="{span: 3}" :wrapperCol="{span: 14}" >
+<RealView
+  :open="state.activeVisible"
+  @cancel="closeRealView"
+  :tab-key="activeTabKey"
+  :tabs-list="deviceTabs"
+  @tab-chang="key => onTabChange(key)"
+>
+    <!--  个人基础信息 -->
+    <div v-if="activeTabKey === 'base'" >
+      <a-card title="基本信息" >
+        <template #extra >
+          <a-button type="primary" @click="ok" >提交修改</a-button>
+        </template>
+        <a-form  style="width: 100%;" :labelCol="{span: 3}" :wrapperCol="{span: 14}" >
       <a-form-item label="设备名称" v-bind="validateInfos.deviceName"  >
         <InputTsx allowClear placeholder="请输入设备名称" v-model:value="deviceState.deviceName" />
       </a-form-item>
@@ -134,54 +141,14 @@
       <a-form-item  label="设备描述"  >
         <a-textarea v-model:value="deviceState.description" placeholder="请输入设备描述" :rows="4" />
       </a-form-item>
-    </a-form>
-  </modal-pro>
-</a-card>
-
-<RealView
-  :open="state.activeVisible"
-  @cancel="state.activeVisible = false"
-  :tab-key="activeTabKey"
-  :tabs-list="deviceTabs"
-  @tab-chang="key => onTabChange(key)"
->
-    <!--  个人基础信息 -->
-    <div v-if="activeTabKey === 'base'" >
-      <a-card title="基本信息" >
-          <a-row :gutter="[8, 28]" >
-            <a-col :span="12">
-              <a-row>
-                <a-col>设备名称:</a-col>
-                <a-col><InputTsx mode="edit" :model-value="deviceState.deviceName"></InputTsx>  </a-col>
-              </a-row>
-            </a-col>
-
-            <a-col :span="12">
-              <a-row>
-                <a-col>设备地址:</a-col>
-                <a-col><InputTsx mode="edit" :model-value="deviceState.gisName"></InputTsx>  </a-col>
-              </a-row>
-            </a-col>
-            <a-col :span="12">
-              <a-row>
-                <a-col>设备类型:</a-col>
-                <a-col>{{deviceState.type}}</a-col>
-              </a-row>
-            </a-col>
-            <a-col :span="12">
-              <a-row>
-                <a-col>设备描述:</a-col>
-                <a-col><InputTsx mode="edit" :model-value="deviceState.description"></InputTsx>  </a-col>
-              </a-row>
-            </a-col>
-          </a-row>
+        </a-form>
       </a-card>
-      <a-card title="推播流地址" style="margin-top: 20px;" >
+      <a-card v-if="operator === 'preview'" title="推播流地址" style="margin-top: 20px;" >
         <!-- 非国标设备 -->
         <a-row :gutter="[8, 18]" >
           <a-col :span="24">
             <a-row>
-              <a-col :span="2">
+              <a-col :span="4">
                 请选择转码模版:
               </a-col>
               <a-col>
@@ -207,11 +174,8 @@
           <a-col :span="24">
             <a-row>
               <a-col :span="2" >播放地址</a-col>
-              <a-col>
-                <div>地址</div>
-                <div>地址</div>
-                <div>地址</div>
-                <div>地址</div>
+              <a-col >
+                <div v-for="item in gbState.pullList" :key="item" >{{item}}</div>
               </a-col>
             </a-row>
           </a-col>
@@ -235,7 +199,7 @@
         </a-space>
       </a-card>
 
-        <!-- 视频 图片区域 -->
+      <!-- 视频 图片区域 -->
       <a-spin :spinning="state.loading" v-if="activeTabKey !== 'base'">
           <a-row :gutter="[8, 8]" style="margin-top: 20px;background-color: #fff;padding: 18px;padding-bottom: 38px;" >
             <a-col :span="4" v-for="item in state.deviceMediaList" :key="item" >
@@ -267,7 +231,7 @@
 </template>
 <script lang='ts' setup >
 import { InputTsx } from '@/components/MicroComponents/index'
-import { reactive, onMounted, nextTick, ref, getCurrentInstance, watch } from 'vue'
+import { reactive, onMounted, nextTick, ref, watch } from 'vue'
 import { Form } from 'ant-design-vue'
 import { OperatorController, SpaceController } from '@/controller'
 import { useRoute } from 'vue-router'
@@ -319,6 +283,8 @@ const tableProDom = ref()
 
 const activeTabKey = ref<'base' | 'record' | 'thumb' | 'ai'>('base')
 
+const operator = ref<'add' | 'preview'>('add')
+
 const deviceTabs = [
   { key: 'base', tab: '基础信息' },
   { key: 'record', tab: '录像回放' },
@@ -517,8 +483,8 @@ const baseInfo = (record: CVS.device) => {
   activeTabKey.value = 'base'
   nextTick(() => {
     state.activeVisible = true
+    console.log(record)
     resetFields({ ...record })
-    console.log(deviceState.deviceName)
   })
 }
 
@@ -558,7 +524,13 @@ const closeModal = () => state.visible = false
 
 const openModal = () => {
   resetFields({})
-  state.visible = true
+  operator.value = 'add'
+  state.activeVisible = true
+}
+
+const closeRealView = () => {
+  state.activeVisible = false
+  operator.value = 'preview'
 }
 
 const getSpaceList = async () => {