|
@@ -63,16 +63,30 @@
|
|
|
<a-space>
|
|
<a-space>
|
|
|
<a @click="goDetailPage(record.id)">查看</a>
|
|
<a @click="goDetailPage(record.id)">查看</a>
|
|
|
<a @click="goDebugPage(record.id)" >调试</a>
|
|
<a @click="goDebugPage(record.id)" >调试</a>
|
|
|
- <a-popconfirm
|
|
|
|
|
|
|
+ <a-popconfirm
|
|
|
title="确实要删除吗?"
|
|
title="确实要删除吗?"
|
|
|
ok-text="确定"
|
|
ok-text="确定"
|
|
|
cancel-text="取消"
|
|
cancel-text="取消"
|
|
|
@confirm="delDevice(record.id)"
|
|
@confirm="delDevice(record.id)"
|
|
|
>
|
|
>
|
|
|
<a href="#">删除</a>
|
|
<a href="#">删除</a>
|
|
|
- </a-popconfirm>
|
|
|
|
|
|
|
+ </a-popconfirm>
|
|
|
|
|
+ <a-dropdown>
|
|
|
|
|
+ <a class="ant-dropdown-link" @click.prevent>分析 <DownOutlined /> </a>
|
|
|
|
|
+ <template #overlay>
|
|
|
|
|
+ <a-menu>
|
|
|
|
|
+ <a-menu-item
|
|
|
|
|
+ v-for="item in analysisList"
|
|
|
|
|
+ :key="item.key"
|
|
|
|
|
+ @click="openAnalysisModal(item.key)"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a href="javascript:;">{{item.label}}</a>
|
|
|
|
|
+ </a-menu-item>
|
|
|
|
|
+ </a-menu>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-dropdown>
|
|
|
</a-space>
|
|
</a-space>
|
|
|
- </template>
|
|
|
|
|
|
|
+ </template>
|
|
|
</template>
|
|
</template>
|
|
|
</a-table>
|
|
</a-table>
|
|
|
</a-card>
|
|
</a-card>
|
|
@@ -115,11 +129,20 @@
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-form>
|
|
</a-form>
|
|
|
</a-modal>
|
|
</a-modal>
|
|
|
|
|
+
|
|
|
|
|
+ <modal-pro
|
|
|
|
|
+ :label="analysisTitle"
|
|
|
|
|
+ :open="state.analysisVisible"
|
|
|
|
|
+ @cancel="state.analysisVisible = false"
|
|
|
|
|
+ @ok="state.analysisVisible = false"
|
|
|
|
|
+ >
|
|
|
|
|
+
|
|
|
|
|
+ </modal-pro>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup >
|
|
<script lang="ts" setup >
|
|
|
import { DeviceContriller, ModelController } from '@/controller/index'
|
|
import { DeviceContriller, ModelController } from '@/controller/index'
|
|
|
-import { onMounted, reactive, ref, toRefs, nextTick } from 'vue'
|
|
|
|
|
|
|
+import { onMounted, reactive, ref, toRefs, nextTick, computed } from 'vue'
|
|
|
import { Form, message } from 'ant-design-vue'
|
|
import { Form, message } from 'ant-design-vue'
|
|
|
import { DeviceAuthTypeEnum } from '@/enum/common'
|
|
import { DeviceAuthTypeEnum } from '@/enum/common'
|
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
@@ -172,6 +195,13 @@ const searchList = [
|
|
|
{ name: '设备标识码', key: 'deviceCode' }
|
|
{ name: '设备标识码', key: 'deviceCode' }
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
|
|
+const analysisList = [
|
|
|
|
|
+ { label: '上下线分析', key: 'session' },
|
|
|
|
|
+ { label: '属性分析', key: 'attr' }
|
|
|
|
|
+]
|
|
|
|
|
+
|
|
|
|
|
+const analysisTitle = computed(() => state.analysisType === 'session' ? '上下线分析' : '属性分析')
|
|
|
|
|
+
|
|
|
const state = reactive<{
|
|
const state = reactive<{
|
|
|
modelId: string,
|
|
modelId: string,
|
|
|
deviceCount: any,
|
|
deviceCount: any,
|
|
@@ -180,6 +210,8 @@ const state = reactive<{
|
|
|
visible: boolean,
|
|
visible: boolean,
|
|
|
opraState: 'add' | 'update',
|
|
opraState: 'add' | 'update',
|
|
|
modelList: IOT.API.MODEL.ModelDot[]
|
|
modelList: IOT.API.MODEL.ModelDot[]
|
|
|
|
|
+ analysisVisible: boolean
|
|
|
|
|
+ analysisType: 'session' | 'attr' | ''
|
|
|
}>({
|
|
}>({
|
|
|
modelId: '',
|
|
modelId: '',
|
|
|
deviceCount: [],
|
|
deviceCount: [],
|
|
@@ -187,6 +219,8 @@ const state = reactive<{
|
|
|
modelList: [],
|
|
modelList: [],
|
|
|
loading: false,
|
|
loading: false,
|
|
|
visible: false,
|
|
visible: false,
|
|
|
|
|
+ analysisVisible: false,
|
|
|
|
|
+ analysisType: '',
|
|
|
opraState: 'add'
|
|
opraState: 'add'
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -219,6 +253,11 @@ const { resetFields: resetFieldsDevice, validate: validateDevice, validateInfos:
|
|
|
deviceCode: [{ required: true, message: '请填写设备码' }]
|
|
deviceCode: [{ required: true, message: '请填写设备码' }]
|
|
|
}))
|
|
}))
|
|
|
|
|
|
|
|
|
|
+const openAnalysisModal = (key: 'session' | 'attr') => {
|
|
|
|
|
+ state.analysisVisible = true
|
|
|
|
|
+ state.analysisType = key
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const changePage = ({ current }) => {
|
|
const changePage = ({ current }) => {
|
|
|
searchState.page = current
|
|
searchState.page = current
|
|
|
getDevicePage()
|
|
getDevicePage()
|