3 次代码提交 6f0c7fb579 ... abbc979a21

作者 SHA1 备注 提交日期
  xiaohaizhao abbc979a21 未设置显示-,0正常显示 2 月之前
  xiaohaizhao 6a149139af 修改判断 2 月之前
  xiaohaizhao d8a0455e57 日志修改 2 月之前

+ 0 - 264
src/operation/moduleNormal/controlPanel/model/MT02/index copy.vue

@@ -1,264 +0,0 @@
-
-
-<template>
-  <div :class="['control',{'wrapper':wrapper}]" v-if="detail">
-    <div class="control-left">
-      <div class="top">
-        <infoPanel></infoPanel>
-      </div>
-      <div class="bottom">
-        <controlPanel @onSuccess="detailFun"></controlPanel>
-      </div>
-    </div>
-    <div class="control-content" v-if="refresh">
-      <div class="map" :style="{transform:`scale(${calcSize})`}">
-        <div style="display: inline-block;position: relative">
-          <dataBlock 
-            v-if="detail.params.UpP"
-            :title="detail.params.UpP.paramname" 
-            :top="0" 
-            :left="50" 
-            :data="[{value:detail.params.UpP.lastvalue,unit:detail.params.UpP.unit}]"
-          ></dataBlock>
-          <dataBlock 
-            v-if="detail.params.DownP"
-            :title="detail.params.DownP.paramname" 
-            :top="0" 
-            :left="400" 
-            :data="[{value:detail.params.DownP.lastvalue,unit:detail.params.DownP.unit}]"
-          ></dataBlock>
-          <img :src="imgUrl" alt="">
-          <div style="clear: both;"></div>
-        </div>
-      </div>
-      <div class="chart">
-        <MyChart :options="[{label:'压力历史曲线图',value:'UpP',sumShow:true},{label:'流量历史曲线图',value:'CumFlow'}]"></MyChart>
-      </div>
-      <div class="message-header">
-        <customBtn :btnOptions="[{label:wrapper ? '退出全屏' : '进入全屏'}]" :btn="true" style="width:70px" @clickBtn="clickBtn"></customBtn>
-        <!-- <Message></Message> -->
-      </div>
-    </div>
-    <div class="control-right">
-      <timeControl></timeControl>
-    </div>
-  </div>
-</template>
-
-<script setup>
-import infoPanel from '../../modules/infoPanel.vue'
-import MyChart from '../../modules/MyChart.vue'
-import timeControl from './modules/timeControl.vue'
-import controlPanel from './modules/controlPanel.vue'
-import customBtn from '../../modules/customBtn.vue'
-import Message from '../../modules/message.vue'
-import dataBlock from '../../modules/dataBlock.vue'
-import updataBtn from '../../modules/updataBtn.vue'
-import {ref, defineProps, defineEmits, onMounted, provide, onBeforeMount, onUnmounted, computed, watch} from 'vue'
-import {Modal} from 'ant-design-vue'
-import { onBeforeRouteUpdate, useRouter } from 'vue-router'
-import { useAuthStore } from '@/stores/modules/auth'
-import Api from '@/api/api'
-import Http from '@/api/http'
-import utils from '@/utils/utils'
-import { calcSizeFun } from '../../modules/util.js'
-
-
-let AuthStore = useAuthStore()
-
-let router = useRouter()
-let emit = defineEmits(['onSuccess'])
-let props = defineProps({})
-
-let refresh = ref(true)
-let wrapper = ref(false)
-
-let detail = ref('')
-
-let modelList = ref([
-  {label:'就地模式',value:'LocalMode'},
-  {label:'远程开关阀模式',value:'SwitchMode'},
-  {label:'远程不利点模式',value:'DisadvantageMode'},
-  {label:'恒压控制',value:'ConstantConON'},
-])
-
-provide('detail',detail)
-provide('modelList',modelList)
-
-let calcSize = ref(1)
-calcSizeFun((size) => {
-  calcSize.value = size
-})
-
-let imgUrl = computed(() => {
-  let arr = detail.value.attinfos.filter(item => item.usetype == 'previewImage')
-  return arr[arr.length - 1] ? arr[arr.length - 1].url : ''
-})
-
-let clickBtn = (tag) => {
-  tag.label == '进入全屏' ? wrapper.value = true : wrapper.value = false
-  refresh.value = false
-  setTimeout(() => {
-    refresh.value = true
-  })
-}
-
-let detailFun = async () => {
-  let res = await Api.requested({
-    "id": "20230628084901",
-    "content": {
-      "w_deviceid": router.currentRoute.value.query.id
-    }
-  })
-  detail.value = res.data
-
-
-  for (let i=1;i<9;i++) {
-    if (detail.value.paramvalues[`T${i}H`]) {
-      detail.value.paramvalues[`start${i}`] = detail.value.paramvalues[`T${i}H`] ? detail.value.paramvalues[`T${i}H`] + ':' + detail.value.paramvalues[`T${i}M`] : ''
-      detail.value.paramvalues[`end${i}`] = detail.value.paramvalues[`T${i}H1`] ? detail.value.paramvalues[`T${i}H1`] + ':' + detail.value.paramvalues[`T${i}M1`] : ''
-      detail.value.paramcmdvalues[`start${i}`] = detail.value.paramcmdvalues[`T${i}H`] ? detail.value.paramcmdvalues[`T${i}H`] + ':' + detail.value.paramcmdvalues[`T${i}M`] : ''
-      detail.value.paramcmdvalues[`end${i}`] = detail.value.paramcmdvalues[`T${i}H1`] ? detail.value.paramcmdvalues[`T${i}H1`] + ':' + detail.value.paramcmdvalues[`T${i}M1`] : ''
-    } else {
-      detail.value.paramvalues[`start${i}`] = ''
-      detail.value.paramvalues[`end${i}`] = ''
-      detail.value.paramcmdvalues[`start${i}`] = ''
-      detail.value.paramcmdvalues[`end${i}`] = ''
-    }
-  }
-
-  modelList.value.forEach(item => {
-    console.log(detail.value.paramvalues[item.value]);
-    if (detail.value.paramvalues[item.value] == '1') {
-      detail.value.paramvalues.控制模式 = item.label
-    }
-    if (detail.value.paramcmdvalues[item.value] == '1') {
-      detail.value.paramcmdvalues.控制模式 = item.label
-    }
-  })
-
-  console.log(res.data);
-}
-
-let timer = setInterval(async () => {
-  let res = await Api.isRefreshDevice({
-    "w_deviceid":router.currentRoute.value.query.id,
-  },'get')
-  if (res) detailFun()
-},5000)
-
-onMounted( () => {
-  detailFun()
-  timer
-})
-onUnmounted(() => {
-  clearInterval(timer)
-})
-</script>
-
-<style scoped>
-*{
-  box-sizing: border-box;
-}
-.control {
-  display: flex;
-  height: calc(100vh - 60px);
-  width: 100%;
-  padding: 10px 0;
-  background: linear-gradient(90deg, #001D6A 0%, #0060B2 82%, #007BD5 100%) !important;
-}
-.wrapper {
-  position: absolute;
-  top: 0;
-  left: 0;
-  z-index: 999;
-  height: 100vh !important;
-  padding: 20px;
-}
-.control .control-left {
-  width: 290px;
-  height: 100%;
-  display: flex;
-  flex-direction: column;
-  justify-content: space-between;
-} 
-.control .control-left .top {
-  width: 100%;
-  height: 49.5%;
-  background:  rgb(0, 0, 0,.05);
-  padding: 10px;
-}
-.control .control-left .bottom {
-  width: 100%;
-  min-width: 290px;
-  height: 49.5%;
-  background:  rgb(0, 0, 0,.05);
-  padding: 10px;
-}
-
-.control .control-content {
-  flex:1 ;
-  height: 100%;
-  padding: 0 10px;
-  display: flex;
-  flex-direction: column;
-  justify-content: space-between;
-  position: relative;
-  overflow: hidden;
-}
-.control .control-content .message-header {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  position: absolute;
-  top: 0;
-  left: 0;
-  width: 100%;
-  padding-left: 10px;
-}
-.control .control-content .map {
-  width: 100%;
-  height: calc(100vh - 255px);
-  position: relative;
-  display: flex;
-  align-items: center;
-  width: 684px;
-  padding: 0 70px;
-  margin: auto;
-}
-.control .control-content .map img {
-  width: 100%;
-  object-fit: scale-down;
-  z-index: 1;
-}
-
-.control .control-content .chart {
-  width: 100%;
-  height: 255px;
-  background:  rgb(0, 0, 0,.05);
-  padding: 0 10px 10px 0;
-}
-
-.control .control-right {
-  width: 272px;
-  height: 100%;
-  background:  rgb(0, 0, 0,.05);
-  padding: 10px;
-}
-.stop {
-  /* border-radius: 50%;
-  background: #ffffff; */
-  position: absolute;
-  top: -30px;
-  right: -60px;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-}
-/deep/ .stop .ant-btn {
-  border-radius: 50%;
-  width: 60px;
-  height: 60px;
-  font-size: 12px;
-}
-</style>

+ 4 - 11
src/operation/moduleNormal/controlPanel/model/MT02/index.vue

@@ -113,17 +113,10 @@ let detailFun = async () => {
 
 
   for (let i=1;i<9;i++) {
-    if (detail.value.paramvalues[`T${i}H`]) {
-      detail.value.paramvalues[`start${i}`] = detail.value.paramvalues[`T${i}H`] ? detail.value.paramvalues[`T${i}H`] + ':' + detail.value.paramvalues[`T${i}M`] : ''
-      detail.value.paramvalues[`end${i}`] = detail.value.paramvalues[`T${i}H1`] ? detail.value.paramvalues[`T${i}H1`] + ':' + detail.value.paramvalues[`T${i}M1`] : ''
-      detail.value.paramcmdvalues[`start${i}`] = detail.value.paramcmdvalues[`T${i}H`] ? detail.value.paramcmdvalues[`T${i}H`] + ':' + detail.value.paramcmdvalues[`T${i}M`] : ''
-      detail.value.paramcmdvalues[`end${i}`] = detail.value.paramcmdvalues[`T${i}H1`] ? detail.value.paramcmdvalues[`T${i}H1`] + ':' + detail.value.paramcmdvalues[`T${i}M1`] : ''
-    } else {
-      detail.value.paramvalues[`start${i}`] = ''
-      detail.value.paramvalues[`end${i}`] = ''
-      detail.value.paramcmdvalues[`start${i}`] = ''
-      detail.value.paramcmdvalues[`end${i}`] = ''
-    }
+      detail.value.paramvalues[`start${i}`] =  (detail.value.paramvalues[`T${i}H`] !== '' ? detail.value.paramvalues[`T${i}H`] || 0 : '-') + ':' + (detail.value.paramvalues[`T${i}M`] !== '' ? detail.value.paramvalues[`T${i}M`] || 0 : '-')
+      detail.value.paramvalues[`end${i}`] =  (detail.value.paramvalues[`T${i}H1`] !== '' ? detail.value.paramvalues[`T${i}H1`] || 0 : '-') + ':' + (detail.value.paramvalues[`T${i}M1`] !== '' ? detail.value.paramvalues[`T${i}M1`] || 0 : '-')
+      detail.value.paramcmdvalues[`start${i}`] =  (detail.value.paramcmdvalues[`T${i}H`] !== '' ? detail.value.paramcmdvalues[`T${i}H`] || 0 : '-') + ':' + (detail.value.paramcmdvalues[`T${i}M`] !== '' ? detail.value.paramcmdvalues[`T${i}M`] || 0 : '-')
+      detail.value.paramcmdvalues[`end${i}`] =  (detail.value.paramcmdvalues[`T${i}H1`] !== '' ? detail.value.paramcmdvalues[`T${i}H1`] || 0 : '-') + ':' + (detail.value.paramcmdvalues[`T${i}M1`] !== '' ? detail.value.paramcmdvalues[`T${i}M1`] || 0 : '-')
   }
 
   modelList.value.forEach(item => {

+ 0 - 301
src/operation/moduleNormal/controlPanel/model/MT02/modules/timeControl copy.vue

@@ -1,301 +0,0 @@
-<template>
-  <div class="header">
-    <span style="color:#ffffff">分时控制设置</span>
-    <!-- <customBtn :btnOptions="[{label:'保存',value:'timeshared'}]" @clickBtn="updateData" v-if="detailData.function['timeshared']"></customBtn> -->
-  </div>
-  <MyInput 
-      v-if="detailData.function['TimeCon'] && params.TimeConON"
-      :form="detailData.paramvalues"
-      name="TimeConON" 
-      :unit="params.TimeConON && params.TimeConON.unit" 
-      :title="detailData.function.TimeCon && detailData.function.TimeCon.funcname"
-      btnName="更新"
-      :text="detailData.params.TimeConON.options.filter(item => item.value == detailData.paramvalues.TimeConON).length && detailData.params.TimeConON.options.filter(item => item.value == detailData.paramvalues.TimeConON)[0].label"
-    >
-    <updataBtn :icon1="detailData.paramcmdvalues.TimeConON && detailData.isfeedback ? true : false">
-      <MyRadio
-        :data="cmdForm.TimeConON"
-        textColor="#000000" 
-        @Change="modelChange" 
-        v-model:value="cmdForm.TimeConON" 
-        :options="params.TimeConON.options" 
-      />
-    </updataBtn>
-  </MyInput>
-  
-  <div class="info">
-    <div class="info-item" v-for="(i,index) in 8">
-      <div class="title" v-if="params[`T${i}H`]">
-        <span>时间段{{ i }}</span>
-
-        <updataBtn v-if="detailData.function[`T${i}`]" :icon1="detailData.paramcmdvalues[`T${i}H`] && detailData.isfeedback ? true : false">
-          <customBtn 
-            style="text-align: right;padding-right: 10px;margin-bottom: 10px;" btnColor="rgb(22,255,246)" 
-            textColor="#000000" 
-            :btnOptions="[{label:'更新',value:'timeshared'}]" 
-            @clickBtn="updateData(i,$refs[`Input${i}`])" 
-          ></customBtn>
-          <div class="info-item_item">
-              <MyInput 
-                :ref="`Input${i}`"
-                :scale="params[`T${i}H`] && params[`T${i}H`].num_scale" 
-                v-model:value="detailData.paramvalues[`start${i}`]" 
-                :name="`start${i}`" 
-                title="开始时间"
-                type="h:m"
-                :form="detailData.paramvalues"
-                :isCheck="true"
-                time-split=":"
-                inputBorder="1px solid #ccc"
-              >
-            </MyInput>
-          </div>
-          <div class="info-item_item">
-              <MyInput 
-                :scale="params[`T${i}H1`] && params[`T${i}H1`].num_scale" 
-                v-model:value="detailData.paramvalues[`end${i}`]" 
-                :name="`end${i}`" 
-                title="结束时间"
-                :form="detailData.paramvalues"
-                :ref="`Input${i}`"
-                :isCheck="true"
-                type="h:m"
-                time-split=":"
-                inputBorder="1px solid #ccc"
-              >
-            </MyInput>
-          </div>
-          <div class="info-item_item" v-if="params[`T${i}_P`]">
-              <MyInput 
-                :scale="params[`T${i}_P`] && params[`T${i}_P`].num_scale" 
-                v-model:value="detailData.paramvalues[`T${i}_P`]" 
-                :name="`T${i}_P`" 
-                title="压力设置"
-                :form="detailData.paramvalues"
-                :ref="`Input${i}`"
-                :isCheck="true"
-                inputBorder="1px solid #ccc"
-                :max="params[`T${i}_P`] && params[`T${i}_P`].num_maxvalue"
-                :min="params[`T${i}_P`] && params[`T${i}_P`].num_minvalue"
-                :step="params[`T${i}_P`] && params[`T${i}_P`].num_step"
-              >
-            </MyInput>
-          </div>
-        </updataBtn>
-        
-      </div>
-      <div class="info-item_item">
-          <MyInput 
-            :scale="params[`T${i}_T`] && params[`T${i}H`].num_scale" 
-            v-model:value="detailData.paramvalues[`start${i}`]" 
-            :name="`T${i}H`" 
-            title="开始时间"
-            type="h:m"
-            :form="detailData.paramvalues"
-            :isCheck="true"
-            :disabled="true"
-          >
-        </MyInput>
-      </div>
-      <div class="info-item_item" v-if="params[`T${i}H1`]">
-          <MyInput 
-            :scale="params[`T${i}H1`] && params[`T${i}H1`].num_scale" 
-            v-model:value="detailData.paramvalues[`end${i}`]" 
-            :name="`T${i}H1`" 
-            title="结束时间"
-            :form="detailData.paramvalues"
-            :isCheck="true"
-            :disabled="true"
-          >
-        </MyInput>
-      </div>
-      <div class="info-item_item" v-if="params[`T${i}_P`]">
-          <MyInput 
-            :scale="params[`T${i}_P`] && params[`T${i}_P`].num_scale" 
-            v-model:value="detailData.paramvalues[`T${i}_P`]" 
-            :name="`T${i}_P`" 
-            title="压力设置"
-            :form="detailData.paramvalues"
-            :isCheck="true"
-            :disabled="true"
-          >
-        </MyInput>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script setup>
-import MyInput from '../../../modules/myInput.vue'
-import MyRadio from '../../../modules/myRadio.vue'
-import customBtn from '../../../modules/customBtn.vue'
-import updataBtn from '../../../modules/updataBtn.vue'
-import {ref, defineProps, defineEmits, inject, computed, onMounted} from 'vue'
-import {Modal} from 'ant-design-vue'
-import Api from '@/api/api'
-import utils from '@/utils/utils'
-import {useRouter} from 'vue-router'
-let emit = defineEmits([])
-let props = defineProps({})
-
-let router = useRouter()
-
-let detailData = inject('detail')
-let params = ref(detailData.value.params)
-let form = ref(detailData.value.paramvalues)
-let cmdForm = ref(detailData.value.paramcmdvalues)
-
-const radioStyle = ref({
-  color:'#ffffff',
-  marginBottom:'10px',
-  fontSize:'12px'
-});
-
-let timeArr = [
-  {label:1,value:'一'},
-  {label:2,value:'二'},
-  {label:3,value:'三'},
-  {label:4,value:'四'},
-  {label:5,value:'五'},
-  {label:6,value:'六'},
-  {label:7,value:'七'},
-  {label:8,value:'八'},
-]
-
-let Input = ref()
-
-let modelChange = (e) => {
-  let value = e.target.value
-  Modal.confirm({
-    title:'确定改变模式吗?',
-    async onOk () {
-      let model = value ? {
-        'TimeConON':1,
-        'TimeConOFF':0,
-        'LocalMode':1,
-        'SwitchMode':0,
-        'DisadvantageMode':0,
-        'ConstantConOFF':1,
-        'ConstantConON':0
-      }
-      : 
-      {
-        'TimeConON':0,
-        'TimeConOFF':1,
-        'LocalMode':0,
-        'SwitchMode':0,
-        'DisadvantageMode':0,
-        'ConstantConOFF':1,
-        'ConstantConON':0
-      }
-      let res = await Api.requested({
-        "id": "20230627163701",
-        "content": {
-          "w_deviceid": router.currentRoute.value.query.id,
-          "w_functionid": detailData.value.function.TimeCon.w_functionid,
-          "params": model
-        }
-      })
-      utils.message(res,'操作成功',() => {
-      })
-    },
-    onCancel () {
-      cmdForm.value.TimeConON = cmdForm.value.TimeConON == 1 ? 0 : 1 
-    }
-  })
-}
-
-let updateData = async (i,vm) => {
-  let check
-  for (var el of vm) {
-    check = await el.Form.validateFields()
-  }
-  if (!check) return
-  Modal.confirm({
-    title:'确定更新数据吗?',
-    async onOk () {
-      let keys = Object.keys(detailData.value.function[`T${i}`].params)
-      let obj = {}
-      let start = detailData.value.paramvalues[`start${i}`].split(':')
-      let end = detailData.value.paramvalues[`end${i}`].split(':')
-      obj[`T${i}H`] = start[0]
-      obj[`T${i}M`] = start[1]
-      obj[`T${i}H1`] = end[0]
-      obj[`T${i}M1`] = end[1]
-      obj[`T${i}_P`] = detailData.value.paramvalues[`T${i}_P`]
-      let res = await Api.requested({
-        "id": "20230627163701",
-        "content": {
-          "w_deviceid": router.currentRoute.value.query.id,
-          "w_functionid": detailData.value.function[`T${i}`].w_functionid,
-          "params": obj
-        }
-      })
-      utils.message(res,'操作成功',() => {
-      })
-    }
-  })
-}
-</script>
-
-<style scoped>
-*{
-  box-sizing: border-box;
-}
-.header {
-  display: flex;
-  justify-content: space-between;
-  margin-bottom: 10px;
-}
-.header:first-child {
-  font-size: 14px;
-}
-.header:last-child {
-  font-size: 12px;
-}
-.info {
-  display: flex;
-  flex-direction: column;
-  overflow-y: scroll;
-  height: calc(100% - 60px);
-  scrollbar-width: none;
-}
-.info .info-item {
-  display: flex;
-  flex-direction: column;
-  margin-bottom: 10px;
-}
-.info .info-item .title {
-  font-size: 14px;
-  color: #ffffff;
-  margin-bottom: 10px;
-  display: flex;
-  justify-content: space-between;
-}
-.info .info-item .info-item_item {
-  display: flex;
-  margin-bottom: 10px;
-}
-.info .info-item .info-item_item .name {
-  font-size: 12px;
-  color: #ffffff;
-  background: rgb(255, 225, 255,.25);
-  padding: 0 10px;
-  flex: 1;
-}
-.info .info-item .info-item_item .value {
-  font-size: 12px;
-  color:#16FFF6;
-  background: rgb(255, 225, 255,.10);
-  padding: 0 10px;
-  flex: 2.5;
-  text-align: right;
-}
-
-::-webkit-scrollbar {
-  display: none;
-}
-/deep/ .ant-form-item {
-  margin-bottom: 0 !important;
-}
-</style>

+ 19 - 17
src/operation/moduleNormal/controlPanel/modules/handleHistory.vue

@@ -2,21 +2,20 @@
   <a-modal
     v-model:visible="modeVisible"
     class="custom-class"
-    :title="typeData.title"
     placement="right"
     width="1800px"
     :closable="false"
     @ok="submit"
   >
-    <div class="switch" v-if="typeData.title == '上传日志'">
-      <div class="item">
-        <a-radio-group
-          v-model:value="analysis"
-          :style="{ marginBottom: '8px' }"
-        >
-          <a-radio-button :value="true">译文</a-radio-button>
-          <a-radio-button :value="false">原文</a-radio-button>
-        </a-radio-group>
+    <div class="custom-header">
+      {{ typeData.title }}
+      <div class="switch" v-if="typeData.title == '上传日志'">
+        <div class="item">
+          <a-radio-group v-model:value="analysis">
+            <a-radio-button :value="true">译文</a-radio-button>
+            <a-radio-button :value="false">原文</a-radio-button>
+          </a-radio-group>
+        </div>
       </div>
     </div>
     <normalTable
@@ -156,14 +155,17 @@ defineExpose({
 </script>
 
 <style scoped>
-.switch {
-  position: relative;
+.custom-header {
+  display: flex;
+  align-items: center;
+  width: 100%;
+  padding-bottom: 20px;
+  border-bottom: 1px solid #f0f0f0;
+  font-size: 16px;
+  margin-bottom: 20px;
 }
 
-.item {
-  position: absolute;
-  top: -76rem;
-  left: 90rem;
-  z-index: 1;
+.switch{
+  margin-left: 20px;
 }
 </style>

+ 234 - 121
src/operation/moduleNormal/equipmentMag/detail/index.vue

@@ -1,16 +1,32 @@
 <template>
   <div>
-    
-    <detail-template 
-      :headData="mainAreaData" 
-      :title="`${userData.devicename}(${userData.serialnumber})`" 
-      :tabs="['详情信息','物模型','日志','关联阀门','关联网关','设备固件','物联卡','告警配置','告警记录']" 
-      ownertable="w_device" 
-      :delParam="{id:'20230616134502',content:{w_deviceid:router.currentRoute.value.query.id}}" 
+    <detail-template
+      :headData="mainAreaData"
+      :title="`${userData.devicename}(${userData.serialnumber})`"
+      :tabs="[
+        '详情信息',
+        '物模型',
+        '日志',
+        '关联阀门',
+        '关联网关',
+        '设备固件',
+        '物联卡',
+        '告警配置',
+        '告警记录',
+      ]"
+      ownertable="w_device"
+      :delParam="{
+        id: '20230616134502',
+        content: { w_deviceid: router.currentRoute.value.query.id },
+      }"
       :disable="!utils.hasPermission('delete') || isDisabled"
-      >
+    >
       <template #operation>
-        <Edit :disabled="!utils.hasPermission('update')" :data="userData" @onSuccess="mianData"></Edit>
+        <Edit
+          :disabled="!utils.hasPermission('update')"
+          :data="userData"
+          @onSuccess="mianData"
+        ></Edit>
         <customBtn
           :btnName="userData.isused ? '禁用' : '启用'"
           idName="20230615110102"
@@ -18,8 +34,10 @@
           :id="userData.w_deviceid"
           type="primary"
           size="middle"
-          :paramData="[{key:'isused',value:userData.isused ? 0 : 1}]"
-          :message="userData.isused ? '确定禁用当前设备吗?' : '确定启用当起设备吗?'"
+          :paramData="[{ key: 'isused', value: userData.isused ? 0 : 1 }]"
+          :message="
+            userData.isused ? '确定禁用当前设备吗?' : '确定启用当起设备吗?'
+          "
           @onSuccess="mianData"
           :disabled="isDisabled || !utils.hasPermission('use')"
         />
@@ -27,25 +45,61 @@
       </template>
       <template #tab0>
         <p class="normal-title">基本信息</p>
-        <defaultInfo :data="defaultInfoData" style="margin-bottom: 16px;"></defaultInfo>
+        <defaultInfo
+          :data="defaultInfoData"
+          style="margin-bottom: 16px"
+        ></defaultInfo>
         <p class="normal-title">系统信息</p>
         <defaultInfo :data="systemInfoData" :column="2"></defaultInfo>
       </template>
       <template #tab1>
-        <a-radio-group v-model:value="currentInfoModel" :style="{ marginBottom: '8px' }" style="margin-bottom:10px">
-          <a-radio-button value="attribute">属性定义</a-radio-button>
-          <a-radio-button value="server">功能定义</a-radio-button>
-          <!-- <a-radio-button value="event">事件定义</a-radio-button> -->
-        </a-radio-group>
-        <AttributeTab :disabled="isDisabled" :data="userData" ref="attributeTab" v-if="currentInfoModel == 'attribute'">
-        </AttributeTab>
-
-        <serveTable :disabled="isDisabled" :data="userData" ref="serveTab" v-else-if="currentInfoModel == 'server'">
-          <template #add>
-          </template>
-        </serveTable>
-
-        <eventTab :disabled="isDisabled" :data="userData" v-else></eventTab>
+        <div class="line-wrapper">
+          <div class="line-box">
+            <div
+              :class="['line-item', modelMode == 0 ? 'active' : '']"
+              @click="changeMode(0)"
+              style="border-right: 1px solid #cccccc"
+            >
+              网络模式
+            </div>
+            <div
+              :class="['line-item', modelMode == 1 ? 'active' : '']"
+              @click="changeMode(1)"
+              v-if="userData.issupportbluetooth"
+            >
+              蓝牙模式
+            </div>
+          </div>
+          <div class="line-content">
+            <a-radio-group
+              v-model:value="currentInfoModel"
+              :style="{ marginBottom: '8px' }"
+              style="margin-bottom: 10px"
+            >
+              <a-radio-button value="attribute">属性定义</a-radio-button>
+              <a-radio-button value="server">功能定义</a-radio-button>
+              <!-- <a-radio-button value="event">事件定义</a-radio-button> -->
+            </a-radio-group>
+            <AttributeTab
+              :mode="modelMode"
+              :disabled="isDisabled"
+              :data="userData"
+              ref="attributeTab"
+              v-if="currentInfoModel == 'attribute'"
+            >
+            </AttributeTab>
+            <serveTable
+              :disabled="isDisabled"
+              :data="userData"
+              :mode="modelMode"
+              ref="serveTab"
+              v-else-if="currentInfoModel == 'server'"
+            >
+              <template #add> </template>
+            </serveTable>
+            <eventTab :disabled="isDisabled" :data="userData" v-else></eventTab>
+          </div>
+        </div>
       </template>
       <template #tab2>
         <HistoryHandle></HistoryHandle>
@@ -73,136 +127,195 @@
 </template>
 
 <script setup>
-import Api from '@/api/api'
-import utils  from '@/utils/utils'
+import Api from "@/api/api";
+import utils from "@/utils/utils";
 
-import normalTable from '@/template/normalTable/index.vue'
-import detailTemplate from '@/components/detailTemplate/index.vue'
-import defaultInfo from '@/template/defaultInfo/index.vue'
-import customBtn from '@/components/customHandleBtn/index.vue'
-import Edit from '../modules/Edit.vue'
-import AddAttrite from './modules/attributeTab/modules/Add.vue'
-import AddServe from './modules/serveTable/modules/Add.vue'
-import AttributeTab from './modules/attributeTab/index.vue'
-import serveTable from './modules/serveTable/index.vue'
-import eventTab from './modules/eventTab/index.vue'
-import HistoryHandle from './modules/historyHandle/index.vue'
-import AndAssets from './modules/andAssets/index.vue'
-import AndGateway from './modules/andGateway/index.vue'
-import warningSet from './modules/warningSet/index.vue'
-import warningHistory from './modules/warningHistory/index.vue'
-import firmwareMag from './modules/firmwareMag/index.vue'
-import iotcard from './modules/iotcard/index.vue'
+import normalTable from "@/template/normalTable/index.vue";
+import detailTemplate from "@/components/detailTemplate/index.vue";
+import defaultInfo from "@/template/defaultInfo/index.vue";
+import customBtn from "@/components/customHandleBtn/index.vue";
+import Edit from "../modules/Edit.vue";
+import AddAttrite from "./modules/attributeTab/modules/Add.vue";
+import AddServe from "./modules/serveTable/modules/Add.vue";
+import AttributeTab from "./modules/attributeTab/index.vue";
+import serveTable from "./modules/serveTable/index.vue";
+import eventTab from "./modules/eventTab/index.vue";
+import HistoryHandle from "./modules/historyHandle/index.vue";
+import AndAssets from "./modules/andAssets/index.vue";
+import AndGateway from "./modules/andGateway/index.vue";
+import warningSet from "./modules/warningSet/index.vue";
+import warningHistory from "./modules/warningHistory/index.vue";
+import firmwareMag from "./modules/firmwareMag/index.vue";
+import iotcard from "./modules/iotcard/index.vue";
 
-import { message, Modal } from 'ant-design-vue'
-import { ExclamationCircleOutlined } from '@ant-design/icons-vue'
+import { message, Modal } from "ant-design-vue";
+import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
 import { useRouter } from "vue-router";
-import { onMounted,ref,createVNode,computed,provide  } from "vue"
-const router = useRouter()
-const mainAreaData = ref([])
+import { onMounted, ref, createVNode, computed, provide, watch } from "vue";
+const router = useRouter();
+const mainAreaData = ref([]);
 
-let currentInfoModel = ref('attribute')
-const userData = ref({})
-let defaultInfoData = ref([])
-let systemInfoData = ref([])
-let serveTab = ref()
-provide('detailData',() => {return userData.value})
+let currentInfoModel = ref("attribute");
+const userData = ref({});
+let defaultInfoData = ref([]);
+let systemInfoData = ref([]);
+provide("detailData", () => {
+  return userData.value;
+});
 
-const mianData = async ()=>{
+const mianData = async () => {
   const res = await Api.requested({
-    "id":20230615103902,
-    "content": {
-      "w_deviceid": router.currentRoute.value.query.id
-    }
-  })
-  userData.value = res.data
+    id: 20230615103902,
+    content: {
+      w_deviceid: router.currentRoute.value.query.id,
+    },
+  });
+  userData.value = res.data;
   console.log(userData.value);
-  changeDataStructure(res.data)
-}
+  changeDataStructure(res.data);
+};
 
 let isDisabled = computed(() => {
-  return userData.value.isOffical == 1
-})
+  return userData.value.isOffical == 1;
+});
 
-provide('isDisabled',isDisabled)
+provide("isDisabled", isDisabled);
 
 const changeDataStructure = (data) => {
   mainAreaData.value = [
     {
-      label:'设备编码',
-      value:data.serialnumber
+      label: "设备编码",
+      value: data.serialnumber,
     },
     {
-      label:'设备名称',
-      value:data.devicename
+      label: "设备名称",
+      value: data.devicename,
     },
     // {
     //   label:'区域',
     //   value:data.areaname
     // },
     {
-      label:'启用状态',
-      value:data.isused ? '启用':'停用',
-      style:() => {
-        let style = {}
-        style.color = utils.statusAndColor(userData.value.isused ? '启用' : '停用')
-        return style
-      }
+      label: "启用状态",
+      value: data.isused ? "启用" : "停用",
+      style: () => {
+        let style = {};
+        style.color = utils.statusAndColor(
+          userData.value.isused ? "启用" : "停用"
+        );
+        return style;
+      },
     },
     {
-      label:'运行状态',
-      value:data.status,
-      style:() => {
-        let style = {}
-        style.color = utils.statusAndColor(data.status)
-        return style
-      }
+      label: "运行状态",
+      value: data.status,
+      style: () => {
+        let style = {};
+        style.color = utils.statusAndColor(data.status);
+        return style;
+      },
     },
     {
-      label:'描述',
-      value:data.remarks
+      label: "描述",
+      value: data.remarks,
     },
-  ]
+  ];
   defaultInfoData.value = [
-    {label:'产品编码',value:userData.value.prodnum},
-    {label:'产品名称',value:userData.value.prodname},
-    {label:'设备类型',value:userData.value.prodtype},
-    {label:'厂商',value:userData.value.enterprisename},
-    {label:'状态',value:userData.value.isused ? '启用' : '停用',style:() => {
-      let style = {}
-      style.color = utils.statusAndColor(userData.value.isused ? '启用' : '停用')
-      return style
-    }},
-    {label:'地址',value:userData.value.address},
-    {label:'消息协议',value:userData.value.protocolname},
-    {label:'在线升级',value:userData.value.isupdate?'支持':'不支持'},
+    { label: "产品编码", value: userData.value.prodnum },
+    { label: "产品名称", value: userData.value.prodname },
+    { label: "设备类型", value: userData.value.prodtype },
+    { label: "厂商", value: userData.value.enterprisename },
+    {
+      label: "状态",
+      value: userData.value.isused ? "启用" : "停用",
+      style: () => {
+        let style = {};
+        style.color = utils.statusAndColor(
+          userData.value.isused ? "启用" : "停用"
+        );
+        return style;
+      },
+    },
+    { label: "地址", value: userData.value.address },
+    { label: "消息协议", value: userData.value.protocolname },
+    { label: "在线升级", value: userData.value.isupdate ? "支持" : "不支持" },
     // {label:'设备数量',value:userData.value.device_count},
-    {label:'描述',value:userData.value.remarks},
-  ]
+    { label: "描述", value: userData.value.remarks },
+  ];
   systemInfoData.value = [
-    {label:'创建时间',value:userData.value.createdate},
-    {label:'创建人',value:userData.value.createby},
-    {label:'最近编辑时间',value:userData.value.changedate},
-    {label:'最近编辑人',value:userData.value.changeby},
-  ]
-}
+    { label: "创建时间", value: userData.value.createdate },
+    { label: "创建人", value: userData.value.createby },
+    { label: "最近编辑时间", value: userData.value.changedate },
+    { label: "最近编辑人", value: userData.value.changeby },
+  ];
+};
 
 let goControl = () => {
   router.push({
-    path:`/${userData.value.dashboardpath || 'baseDevice'}`,
+    path: `/${userData.value.dashboardpath || "baseDevice"}`,
     query: {
-      id:userData.value.w_deviceid
-    }
-  })
-}
+      id: userData.value.w_deviceid,
+    },
+  });
+};
+let serveTab = ref(),
+  attributeTab = ref();
 
-let serveSuccess = () => {
-  serveTab.value.param.content.ownerid = router.currentRoute.value.query.id
-  serveTab.value.$refs.list.listData()
-}
-onMounted (()=>{
-  mianData()
-})
+let modelMode = ref(0);
+
+let changeMode = (mode = 0) => {
+  if (modelMode.value == mode) return;
+  modelMode.value = mode;
+  if (currentInfoModel.value === "server") {
+    serveTab.value.param.content.mode = mode;
+    serveTab.value.getList();
+  } else {
+    attributeTab.value.param.content.mode = mode;
+    attributeTab.value.getList();
+  }
+};
+onMounted(() => {
+  mianData();
+});
 </script>
 <style>
+.line-wrapper {
+  border: 1px solid #cccccc;
+  border-top: none;
+}
+.line-content {
+  padding: 0 20px 0 20px;
+}
+.line-box {
+  width: 100%;
+  padding: 1px;
+  background: #f5f5f5;
+  border: 1px solid #cccccc;
+  border-left: none;
+  border-right: none;
+  display: flex;
+  margin-bottom: 10px;
+}
+.line-box .line-item {
+  padding: 5px 20px;
+  background: #f5f5f5;
+  font-size: 14px;
+  color: #000000;
+  cursor: pointer;
+}
+.line-box .line-item.active {
+  color: #1677ff;
+  background: #ffffff;
+  position: relative;
+}
+.line-box .line-item.active::before {
+  content: "";
+  display: block;
+  height: 5px;
+  width: 100%;
+  background: #ffffff;
+  position: absolute;
+  left: 0;
+  bottom: -2px;
+}
 </style>

+ 102 - 53
src/operation/moduleNormal/equipmentMag/detail/modules/attributeTab/index.vue

@@ -1,36 +1,61 @@
 <template>
-  <normalTable :is-select="false" :sequence="true" rowKey="w_dataparamid" ref="list" size="small" :param="param" :columns="utils.TBLayout('dataparamTable')">
-    <template #tb_cell="{data}">
+  <normalTable
+    :is-select="false"
+    :sequence="true"
+    rowKey="w_dataparamid"
+    ref="list"
+    size="small"
+    :param="param"
+    :columns="utils.TBLayout('dataparamTable')"
+  >
+    <template #tb_cell="{ data }">
       <div v-if="data.column.dataIndex == 'rwtype'">
-        {{ data.record.rwtype == 0 ? '读' : data.record.rwtype == 1 ? '写' : '上报' }}
+        {{
+          data.record.rwtype == 0
+            ? "读"
+            : data.record.rwtype == 1
+            ? "写"
+            : "上报"
+        }}
       </div>
       <div v-else>
         {{ data.record[data.column.dataIndex] }}
       </div>
     </template>
     <template #operation>
-      <div style="display:flex;margin-bottom:16px">
-        <div style="margin-right:16px">
+      <div style="display: flex; margin-bottom: 16px">
+        <div style="margin-right: 16px">
           <span>数据类型:</span>
           <a-select
             ref="select"
             v-model:value="param.content.where.datatype"
             placeholder="选择数据类型"
             style="width: 200px"
-            @change="param.content.pageNumber=1;$refs.list.listData()"
+            @change="
+              param.content.pageNumber = 1;
+              $refs.list.listData();
+            "
             allowClear
           >
-            <a-select-option :value="item.value" v-for="(item,index) in typeList" :key="index">{{ item.value }}</a-select-option>
+            <a-select-option
+              :value="item.value"
+              v-for="(item, index) in typeList"
+              :key="index"
+              >{{ item.value }}</a-select-option
+            >
           </a-select>
         </div>
-        <div style="margin-right:16px;">
+        <div style="margin-right: 16px">
           <span>读写类型:</span>
           <a-select
             ref="select"
             v-model:value="param.content.where.rwtype"
             placeholder="选择读写类型"
             style="width: 200px"
-            @change="param.content.pageNumber=1;$refs.list.listData()"
+            @change="
+              param.content.pageNumber = 1;
+              $refs.list.listData();
+            "
             allowClear
           >
             <a-select-option value="0">读</a-select-option>
@@ -40,7 +65,15 @@
         </div>
 
         <div>
-          <a-input v-model:value="param.content.where.condition" @keyup.enter="param.content.pageNumber=1;$refs.list.listData()"  placeholder="名称/标识" autocomplete="off"></a-input>
+          <a-input
+            v-model:value="param.content.where.condition"
+            @keyup.enter="
+              param.content.pageNumber = 1;
+              $refs.list.listData();
+            "
+            placeholder="名称/标识"
+            autocomplete="off"
+          ></a-input>
         </div>
       </div>
     </template>
@@ -48,56 +81,72 @@
 </template>
 
 <script setup>
-import AddAttrite from './modules/Add.vue'
-import listTemp from '@/components/listTemplate/index.vue'
-import normalTable from '@/template/normalTable/index.vue'
-import customBtn from '@/components/customHandleBtn/index.vue'
-import customBtn2 from '@/components/customHandleBtn/index.vue'
-import Edit from './modules/Edit.vue'
-import { useBaseStore } from '@/stores/modules/base'
-import {ref, defineProps, defineEmits, onMounted, provide, inject} from 'vue'
-import { useRouter } from 'vue-router'
-import Api from '@/api/api'
-import utils from '@/utils/utils'
-
-let base = useBaseStore()
-let router = useRouter()
-let emit = defineEmits([])
-let props = defineProps(['data','disabled'])
+import AddAttrite from "./modules/Add.vue";
+import listTemp from "@/components/listTemplate/index.vue";
+import normalTable from "@/template/normalTable/index.vue";
+import customBtn from "@/components/customHandleBtn/index.vue";
+import customBtn2 from "@/components/customHandleBtn/index.vue";
+import Edit from "./modules/Edit.vue";
+import { useBaseStore } from "@/stores/modules/base";
+import {
+  ref,
+  defineProps,
+  defineEmits,
+  onMounted,
+  provide,
+  inject,
+  defineExpose,
+} from "vue";
+import { useRouter } from "vue-router";
+import Api from "@/api/api";
+import utils from "@/utils/utils";
+let list = ref();
+let base = useBaseStore();
+let router = useRouter();
+let emit = defineEmits([]);
+let props = defineProps(["data", "disabled", "mode"]);
 let param = ref({
-  "id": 20230613091602,
-  "content": {
-    "ownertable": "w_device",
-    "ownerid": router.currentRoute.value.query.id,
-    "pageNumber": 1,
-    "pageSize": 20,
-    "where": {
-        "condition": "",
-        "datatype": undefined,
-        "rwtype": undefined
-    }
+  id: 20230613091602,
+  content: {
+    ownertable: "w_device",
+    ownerid: router.currentRoute.value.query.id,
+    pageNumber: 1,
+    pageSize: 20,
+    mode: props.mode,
+    where: {
+      condition: "",
+      datatype: undefined,
+      rwtype: undefined,
+    },
   },
-})
-let searchType = ref([{label:'搜索',key:'condition',type:'input'}])
-let typeList = ref([])
-let optionList = ref([])
-let unitList = ref([])
+});
+let searchType = ref([{ label: "搜索", key: "condition", type: "input" }]);
+let typeList = ref([]);
+let optionList = ref([]);
+let unitList = ref([]);
 
-provide('optionList',optionList)
-provide('typeList',typeList)
-provide('unitList',unitList)
+provide("optionList", optionList);
+provide("typeList", typeList);
+provide("unitList", unitList);
 
 onMounted(async () => {
-  let res = await base.optiontypeselect('datatype')
-  typeList.value = res.data
-  let res2 = await base.optiontypeselect('optiontype')
-  optionList.value = res2.data
-  let res3 = await base.optiontypeselect('dataunit')
-  unitList.value = res3.data
+  let res = await base.optiontypeselect("datatype");
+  typeList.value = res.data;
+  let res2 = await base.optiontypeselect("optiontype");
+  optionList.value = res2.data;
+  let res3 = await base.optiontypeselect("dataunit");
+  unitList.value = res3.data;
   console.log(typeList.value);
-})
+});
+let getList = () => {
+  list.value.listData();
+};
+
+defineExpose({
+  param,
+  getList,
+});
 </script>
 
 <style scoped>
-
 </style>

+ 83 - 47
src/operation/moduleNormal/equipmentMag/detail/modules/serveTable/index.vue

@@ -1,30 +1,55 @@
 <template>
-  <normalTable :is-select="false" :sequence="true" rowKey="w_functionid" ref="list" size="small" :param="param" :columns="utils.TBLayout('serveTable')">
-    <template #tb_cell="{data}">
+  <normalTable
+    :is-select="false"
+    :sequence="true"
+    rowKey="w_functionid"
+    ref="list"
+    size="small"
+    :param="param"
+    :columns="utils.TBLayout('serveTable')"
+  >
+    <template #tb_cell="{ data }">
       <div v-if="data.column.dataIndex == 'isasyn'">
-        {{ data.record.isasyn ? '异步' : '同步' }}
+        {{ data.record.isasyn ? "异步" : "同步" }}
       </div>
-      <div v-else-if="data.column.dataIndex == 'func'" style="display: flex;align-items: center;">
-        <span>{{data.record.func}}</span>
-        <a-tag color="blue" size="small" v-if="data.record.issystem" style="margin-left: 10px;">系统</a-tag>
+      <div
+        v-else-if="data.column.dataIndex == 'func'"
+        style="display: flex; align-items: center"
+      >
+        <span>{{ data.record.func }}</span>
+        <a-tag
+          color="blue"
+          size="small"
+          v-if="data.record.issystem"
+          style="margin-left: 10px"
+          >系统</a-tag
+        >
       </div>
       <div v-else-if="data.column.dataIndex == 'w_dataparamids'">
-        <a-tag color="blue" v-for="item in data.record.dataparam" :key="item.w_functionid">{{ item.paramname }}</a-tag>
+        <a-tag
+          color="blue"
+          v-for="item in data.record.dataparam"
+          :key="item.w_functionid"
+          >{{ item.paramname }}</a-tag
+        >
       </div>
       <div v-else>
         {{ data.record[data.column.dataIndex] }}
       </div>
     </template>
     <template #operation>
-      <div style="display:flex;margin-bottom:16px">
-        <div style="margin-right:16px">
+      <div style="display: flex; margin-bottom: 16px">
+        <div style="margin-right: 16px">
           <span>调用方式:</span>
           <a-select
             ref="select"
             v-model:value="param.content.where.isasyn"
             placeholder="选择调用方式"
             style="width: 200px"
-            @change="param.content.pageNumber=1;$refs.list.listData()"
+            @change="
+              param.content.pageNumber = 1;
+              $refs.list.listData();
+            "
             allowClear
           >
             <a-select-option value="0">同步</a-select-option>
@@ -37,53 +62,64 @@
 </template>
 
 <script setup>
-import listTemp from '@/components/listTemplate/index.vue'
-import normalTable from '@/template/normalTable/index.vue'
-import customBtn from '@/components/customHandleBtn/index.vue'
-import Edit from './modules/Edit.vue'
-import { useBaseStore } from '@/stores/modules/base'
-import {ref, defineProps, defineEmits, onMounted} from 'vue'
-import { useRouter } from 'vue-router'
-import Api from '@/api/api'
-import utils from '@/utils/utils'
+import listTemp from "@/components/listTemplate/index.vue";
+import normalTable from "@/template/normalTable/index.vue";
+import customBtn from "@/components/customHandleBtn/index.vue";
+import Edit from "./modules/Edit.vue";
+import { useBaseStore } from "@/stores/modules/base";
+import { ref, defineProps, defineEmits, onMounted } from "vue";
+import { useRouter } from "vue-router";
+import Api from "@/api/api";
+import utils from "@/utils/utils";
 
-let base = useBaseStore()
-let router = useRouter()
-let emit = defineEmits([])
-let props = defineProps(['data','disabled'])
+let list = ref();
+let base = useBaseStore();
+let router = useRouter();
+let emit = defineEmits([]);
+let props = defineProps(["data", "disabled", "mode"]);
 let param = ref({
-  "id": 20230613162702,
-  "content": {
-    "ownertable": "w_device",
-    "ownerid": router.currentRoute.value.query.id,
-    "pageNumber": 1,
-    "pageSize": 20,
-    "where": {
-        "condition": "",
-        "isasyn": undefined
-    }
+  id: 20230613162702,
+  content: {
+    ownertable: "w_device",
+    ownerid: router.currentRoute.value.query.id,
+    pageNumber: 1,
+    pageSize: 20,
+    mode: props.mode,
+    where: {
+      condition: "",
+      isasyn: undefined,
+    },
   },
-})
+});
 let searchType = ref([
-  {label:'搜索',key:'condition',type:'input'},
-  {label:'调用方式',key:'isasyn',type:'select',dataSource:[
-    {remarks:'同步',value:'同步'},
-    {remarks:'异步',value:'异步'},
-  ]},
-])
-let typeList = ref([])
+  { label: "搜索", key: "condition", type: "input" },
+  {
+    label: "调用方式",
+    key: "isasyn",
+    type: "select",
+    dataSource: [
+      { remarks: "同步", value: "同步" },
+      { remarks: "异步", value: "异步" },
+    ],
+  },
+]);
+let typeList = ref([]);
 
 onMounted(async () => {
-  let res = await base.optiontypeselect('datatype')
-  typeList.value = res.data
+  let res = await base.optiontypeselect("datatype");
+  typeList.value = res.data;
   console.log(typeList.value);
-})
+});
+
+let getList = () => {
+  list.value.listData();
+};
 
 defineExpose({
-  param
-})
+  param,
+  getList,
+});
 </script>
 
 <style scoped>
-
 </style>