deviceGuide_frm.html 4.15 KB
<!DOCTYPE html>
<html>
  <head>
      <meta charset="utf-8">
      <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
      <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
      <title>设备列表窗口</title>
      <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
      <link rel="stylesheet" type="text/css" href="../../css/aui.css"/>
      <link rel="stylesheet" type="text/css" href="../../css/home.css"/>
      <link rel="stylesheet" type="text/css" href="../../css/element.css"/>
      <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
      <link rel="stylesheet" type="text/css" href="../../css/mine/mine.css"/>

      <style>
          html,
          body{
            background: #F4F6F9;
          }
      </style>
  </head>
  <body>
    <div id="app">
      <template>
        <div v-for="(list_d, list_i) in productList">
          <div class="device-guide-list-panel" @click="openGuideByModel(list_d.data[0].table)">
            <div class="device-guide-inside-list-panel">
              <div class="aui-row aui-row-flex" tapmode>
                <div class="aui-col aui-col-span-13 aui-row-flex-start">
                  <span class="device-guide-name"> {{ list_d.name }}</span>
                </div>
                <div class="aui-col aui-col-span-11 aui-row-flex-end">
                  <img src="../../image/to-go.png" style="width:18px;height:18px;margin-top: 0.9rem;" />
                </div>
              </div>
            </div>
          </div>  
          <div class="panel-line"></div>
       </div>
      </template>
    </div>
  </body>
  <script type="text/javascript" src="../../script/api.js"></script>
  <script type="text/javascript" src="../../script/jquery-3.3.1.min.js"></script>
  <script type="text/javascript" src="../../script/vue.min.js"></script>
  <script type="text/javascript" src="../../script/common.js"></script>
  <script type="text/javascript" src="../../script/element.js"></script>
  <script type="text/javascript" src="../../script/ctrl.js"></script>
  <script type="text/javascript">
      var vm;
      apiready = function(){
      api.parseTapmode();
        //---------初始化vue
        vm = new Vue({
          el: '#app',
          data: {
            productList: []
          },
          mounted() {
          },
          created() {
            this.initProducts()
          },
          methods: {
            async initProducts() {
              let res = await get_store_model()
              this.productList = res.data
            },
            async openGuideByModel(table) {
              api.showProgress({
                  style: 'default',
                  animationType: 'fade',
                  title: '加载中...',
                  text: '',
                  modal: false
              });
              api.sendEvent({
                name: 'open_detail_guide',
                extra: {table: table}
              });
              
              let res = await get_guide_html_str(table)
              api.hideProgress();
              
              if (res.data != "") {
                api.openFrame({
                  name: 'store'+ table + '_guide',
                  url: './store'+ table + '_guide.html',
                  data: res.data,
                  rect: {
                    x: 0,
                    y: api.pageParam.headerH,
                    w: api.frameWidth,
                    h: api.winHeight-api.pageParam.headerH-api.pageParam.footerH
                  },
                  hScrollBarEnabled: true,
                  vScrollBarEnabled: true,
                  slidBackEnabled: true,
                  allowEdit: false,
                  animation: {
                    type:"movein", 
                    subType:"from_right",
                    duration:300 
                  },                
                });
              }else {
                api.toast({
                  msg: res.message,
                  duration: 2000,
                  location: 'bottom'
                });
              }
            }
          }
        })
      };
  </script>
</html>