zoukankan      html  css  js  c++  java
  • jeecg项目笔记

    1.node-sass 安装不成功   

    cnpm install node-sass

       https://segmentfault.com/a/1190000010984731      

    使用 cnpm 安装 node-sass 会默认从淘宝镜像源下载,也是一个办法.

     
     
    2.com.mysql.cj.jdbc.Driver         对应的url需加入时区 url=jdbc:mysql:///test?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&useSSL=false
     
    3.maven 项目启动命令mvn tomcat:run          在cmd路径下运行  操作系统无需安装eclipse和tomcat
     
    4.文件上传下载 是上传到作为服务器的电脑上,也从这里下载,碰到一个问题,上传下载时网址是localhost,不是服务器电脑的IP地址,在前端传路径的时候需要修改,

    5.vue v-model 可实现双向绑定 input组件和select组件都可使用

    6.v-for 遍历循环 

    <a-select placeholder="请选择" v-model="Task.selectPerson"  mode="multiple">
                            <template v-for='(li,key) in person'>
    
                              <a-select-option  v-bind:key="key" :value="li">{{li}}</a-select-option>
    
                            </template>
                            <!--<a-select-option value="1">阮海丽</a-select-option>-->
     </a-select>
    View Code

    7.js更改时间格式 

    format(time, format) {
          var t = new Date(time);
          var tf = function (i) {
           return (i < 10 ? '0' : '') + i
          };
          return format.replace(/yyyy|MM|dd|HH|mm|ss/g, function (a) {
          switch (a) {
            case 'yyyy':
              return tf(t.getFullYear());
            case 'MM':
              return tf(t.getMonth() + 1);
            case 'mm':
              return tf(t.getMinutes());
            case 'dd':
              return tf(t.getDate());
            case 'HH':
              return tf(t.getHours());
            case 'ss':
              return tf(t.getSeconds());
            }
          })
        }
    //写好format方法后调用format方法更改时间格式
     this.Task.deliverTime=this.format(new Date(),'yyyy-MM-dd HH:mm:ss');
    View Code

     8.弹框跳转  碰到这个问题也是和老师一起花很大功夫才解决 

    this.$refs.modalForm.edit(record);
    this.$refs.modalForm.title="详情";
    this.$refs.modalForm.disableSubmit = true;
    modalForm 就是前面跳转时的ref属性给的 modalForm 当时没有理解 this.$refs.modalForm 从哪里来
    <!--插槽 点击跳转到方法-->
    <span slot="action" slot-scope="text, record">
                <a @click="handleDetail(record)">进度详情</a>
              </span>
    
              <span slot="action2" slot-scope="text, record">
                <a @click="handleDetail2(record)">装置详情</a>
              </span>
    
    <!--跳转到的页面-->
    <ProTaskQu ref="modalForm" @ok="modalFormOk"></ProTaskQu>
    
     <ProTaskQu2 ref="modalForm2" @ok="modalFormOk"></ProTaskQu2>
    
    
    handleDetail:function(record){
          this.$refs.modalForm.edit(record);
          this.$refs.modalForm.title="详情";
          this.$refs.modalForm.disableSubmit = true;
          this.$refs.modalForm.data = this.deliverytaskInfo;
        },
        handleDetail2:function(record){
          this.$refs.modalForm2.edit(record);
          this.$refs.modalForm2.title="详情";
          this.$refs.modalForm2.disableSubmit = true;
          this.$refs.modalForm2.data = this.deliverytaskInfo;
          /* this.$refs.modalForm.data = this.deliverytask;*/
          console.log("************");
          console.log(this.$refs.modalForm.data);
        },
    View Code

    9.https://github.com/zhangdaiscott/jeecg-boot/issues/215 代码生成器的代码支持模糊查询

    10.https://blog.csdn.net/qq_38789941/article/details/97628317  

    beforeUpload 返回true false 运行效果很慢 
    返回 Promise对象就好了
    beforeUpload(file,fileList){
           return new Promise((resolve, reject) => {
             if(file.name.search(this.queryWreper)==-1){
               reject(file);
             }else{
               var fileList2=[];
               for(var i=0;i<fileList.length;i++){
                 if(fileList[i].name.search(this.queryWreper)!=-1){
                   fileList2.push(fileList[i]);
                 }
               }
               console.log("fileList2..........")
               console.log(fileList2)
               var isMaxFlag = true;
               for(var j=0;j<fileList2.length;j++){
                 if(fileList2[j].name.localeCompare(file.name)>0){
                   isMaxFlag = false;
                   reject(file);
                 }
               }
               if(isMaxFlag == true){
                 resolve(file);
               }
             }
           });
          }
    View Code

    11.让组件不显示

    <Dropdown v-if="isVisible"></Dropdown>
    可根据isVisible为true或为false,使得中间的组件是否显示,true显示,false不显示。


    10.webstorm激活
    http://idea.medeming.com/jet/


  • 相关阅读:
    实时控制软件设计第一周作业-汽车ABS软件系统案例分析
    团队项目·冰球模拟器——任务间通信、数据共享等设计
    团队项目·冰球模拟器——cmake 自动化构建系统的配置文件的编写
    团队项目·冰球模拟器——文件结构设计
    团队项目·冰球模拟器——插值算法接口设计
    第四周作业
    第三周作业、实时操作系统µC/OS介绍及其它内容
    第二周作业、停车场门禁控制系统状态机
    Open Dynamics Engine for Linux 安装笔记
    第一周作业、典型实时控制系统案例分析
  • 原文地址:https://www.cnblogs.com/jianghuxiao/p/11294997.html
Copyright © 2011-2022 走看看