jt
2023-10-08 3dd7c408b5a8066d2726c05aaddd8c972367d0e0
test.vue
@@ -1,97 +1,153 @@
<template>
   <view class="content">
      <view class="v-area">
         <div class="class_attr_title">
            <div class="title_line"></div>
            <div class="title_icon" style="background-color:#0;">
               <i class="ace-icon fa fu-Function"></i>
            </div>
            <span class="title">基本属性</span>
            <a href="javascript:;" class="arrow"><i class="ace-icon fa fa-angle-down"></i></a>
         </div>
         <div class="class_attr_body" style="">
            <div class="dv_field_div">
               <div class="form-group" style="">
                  <label class="col-xs-12 no-padding-right" for="">测试:
                     <div class="pull-right text-right" style=" margin-right: 12px;">
                        <a href="#" class="class_attr_ext_button" data-click-button="" data-button-callback="" title="">
                           <i class="ace-icon fa fa-plus-circle"></i>
                        </a>
                     </div>
                  </label>
                  <div class="col-xs-12">
                     <input type="text" class="form-control attr_field focuscls" data-index="" style="" data-field="" data-type="" data-noempty="">
                     <textarea class="form-control attr_field focuscls" data-index="" style="height:60px;" data-field="" data-type="" data-noempty=""></textarea>
                     <textarea class="form-control attr_field focuscls" data-index="" style="height:90px;" data-field="" data-type="" data-noempty=""></textarea>
                     <view class="section section_gap">
                        <checkbox-group class="check_rememberPwd" change="">
                           <label>
                              <checkbox value="1" checked=""/>
                              <text>记住密码</text>
                           </label>
                        </checkbox-group>
                     </view>
                     <view class="section">
                         <view class="section__title">日期:</view>
                         <picker mode="date" value="test"  bindchange="bindDateChange" class="section__iput">
                              <view class="picker">test</view>
                         </picker>
                     </view>
                      <view class="uni-form-item uni-column">
                            <picker @change="onchange" :range="examinationTypeArray">
                            <label class="">{{ ItemType }}</label>
                            </picker>
                       </view>
                  </div>
               </div>
            </div>
         </div>
   <!-- 版本升级弹窗开始 -->
   <uni-popup ref="promotion" type="center">
      <view class="promotion">
         <view class="operates" v-if="showBtns==true">
            <text @click="cancel">取消</text>
            <text @click="sure">确认</text>
         </view>
         <view class="operates" v-else>
            <cmd-progress :percent="percentage" stroke-color="linear-gradient(to right, #ef32d9, #89fffd)"></cmd-progress>
         </view>
      </view>
   </view>
   </uni-popup>
   <!-- 版本升级弹窗结束 -->
</template>
<script>
   export default {
      data() {
         return {
            title: '新增',
            ItemType: '请选择',
            examinationTypeArray: ['请选择', '11111', '22222', '33333', '44444'],
            examinationTypeIndex: 0,
         }
      },
      onLoad(options) {
         console.log(options);
      },
      methods: {
         ontap(e){ //扫码功能
            console.log(e.target)
            getApp().onScan((result)=>{
               console.log(result.decodedata);
               this.$data.classAttrList[e.target.dataset['key']]=result.decodedata;
            })
         },
         onchange(e) {
            console.log(e.target)
            // this.$data.examinationTypeIndex = e.target.value;
            // this.$data.classAttrList[] = this.examinationTypeArray[this.examinationTypeIndex];
         },
         addresschange(e) {
             // this.txt = e.data.join('')
             console.log(e.data.join(''))
         },
      }
   }
</script>
// <script>
// import cmdProgress from "@/components/cmd-progress/cmd-progress.vue" //进度条
// export default {
//       components: {
//          cmdProgress
//       },
//       data() {
//          return {
//             downloadUrl: "", //安卓app下载链接
//             percentage: 0, //下载进度
//             showBtns: true,
//          }
//       },
//       onShow() {
//          this.query(); //版本升级
//       },
//       watch: {
//          //监听进度条
//          percentage(e) {
//             if (e >= 100) {
//                this.$refs.promotion.close()
//             }
//          }
//       },
//       methods: {
//          //查询当前版本号
//          query() {
//             //#ifdef APP-PLUS
//             plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
//                var version = wgtinfo.version //客户端版本号
//                this.check(version) //检测是否需要更新
//             })
//             //#endif
//          },
//          //检测是否需要更新
//          async check(version) {
//             let res = await edition.edition();
//             let resp = res.data;
//             if (resp) {
//                const obj = resp.data.filter(item => {
//                   return item.groupName == 'version'
//                })
//                //获取当前版本号
//                const versionNum = obj[0].title //服务端版本号
//                this.downloadUrl = obj[0].content //app下载链接
//                if (version != versionNum) {
//                   this.$refs.promotion.open();
//                } else {
//                   console.log('当前已是最新版本')
//                }
//             }
//          },
//          //确认更新
//          sure() {
//             //关闭按钮
//             this.showBtns = false;
//             let sys = uni.getSystemInfoSync().platform //检查系统
//             if (sys == 'ios') {
//                // this.getIosInfo()
//             } else if (sys == "android") {
//                this.updateAPP() // 调用下载方法app内下载
//             }
//          },
//          //取消更新
//          cancel() {
//             this.$refs.promotion.close();
//          },
//          // //链接苹果商店下载
//          // getIosInfo() {
//          //    let appleId = “你的appid”
//          //    plus.runtime.launchApplication({
//          //       action: "itms-apps://itunes.apple.com/cn/app/id" + appleId + "?mt=8"
//          //    }, function(e) {
//          //       console.log('Open system default browser failed: ' + e.message);
//          //    });
//          // },
//          //安卓更新
//          updateAPP() {
//             let _this = this;
//             let url = this.downloadUrl;
//             // 官方API
//             var dtask = plus.downloader.createDownload(url, {}, function(d, status) {
<style>
//                //d为下载的文件对象
//                if (status == 200) {
//                   //下载成功,d.filename是文件在保存在本地的相对路径,使用下面的API可转为平台绝对路径
//                   var fileSaveUrl = plus.io.convertLocalFileSystemURL(d.filename);
//                   plus.runtime.openFile(d.filename); //选择软件打开文件
//                   uni.showToast({
//                      icon: 'none',
//                      title: '更新成功'
//                   })
//                } else {
//                   //下载失败
//                   plus.downloader.clear(); //清除下载任务
//                   uni.showToast({
//                      icon: 'none',
//                      title: '更新失败'
//                   })
//                }
//             })
//             //开始下载
//             dtask.start();
//             //监听下载进度
//             dtask.addEventListener('statechanged', function(task) {
//                _this.percentage = parseInt(
//                   (parseFloat(task.downloadedSize) /
//                      parseFloat(task.totalSize)) *
//                   100
//                );
//                if (_this.percentage == 100) {
//                   this.$refs.promotion.close();
//                }
//                // console.log('下载进度:' + _this.percentage)
//             })
//          },
//       }
// </script>
   .fn_yousanjiao{
      position: relative;
   }
   .fn_yousanjiao::after{
      position: absolute;
      display: block;
      content: '';
      z-index: 1;
      transform: rotate(-45deg);
      left: -10px;
      top: -10px;
      border: 10px solid;
      border-color: transparent transparent red;
   }
   .class_attr_title {
       font-size: 34rpx;
       padding-bottom: 22rpx;