JYGL系统 学习1

 

1.框架中的竖线(自已做的一个图),可以左点,右点使框架变化。 附件: splitor 工程

splitor.html
<html>
<head>
  <title></title>
  <link href="css/public.css" rel="stylesheet" type="text/css" />
  <script type="text/javascript">
  function showHide(titl){
    if(titl=="left"){
      document.all.img1.src="images/rightMove.gif";     
      top.document.getElementById("middle").cols="0,7,*";  //  使上一级页面,即框架页 的分栏条向最右边靠齐
      document.all.img1.title="right";
    }else{
      document.all.img1.src="images/leftMove.gif";     
      top.document.getElementById("middle").cols="190,7,*";//使上一级页面,即框架页 的分栏条向最左边靠齐,也是最初始的样子
      document.all.img1.title="left";     
    }
  }
  </script>
</head>
<body  leftmargin="0" topmargin="0">
<table style="cursor:hand"  width="100%" height="100%" background="images/splitor7.gif" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center" valign="middle"><img  name="img1" src="images/leftMove.gif" width="7" height="54" onClick="showHide(document.all.img1.title)" title="left" /></td>
  </tr>
</table>
</body>

 

2.文本框的验证:

check.js  (定义了属性规则allownull,isDigital,isInt,allowzero,isdate,还有使用方法)
 //check.js开始
 //使用方法:在form提交事件里调用:return checkOwnRule(objfrm);
 //传入参数为当前form对象。使用该函数的前提是页面必须包含check.js
 function checkOwnRule(objfrm){
  
  //验证input
  var inputObj=objfrm.getElementsByTagName("input");

  for (i=0;i<inputObj.length;i++){
   if (!inputObj(i).getAttribute("hint")||inputObj(i).getAttribute("hint") == "")
   {
    strHint=inputObj(i).name;
   }else{
    strHint=inputObj(i).getAttribute("hint");
   }
   
   //不许为空
   //如:<input type="text" name="UserName" allownull="false" hint="用户名">
   if (inputObj(i).getAttribute("allownull")=="false"){
    
    
    if (inputObj(i).value==""){
     alert(strHint+"不能为空!");
     return false;
    }
   }

   //只许为数字
   //如:<input type="text" name="UserName" isDigital="true" hint="用户名">
   if (inputObj(i).getAttribute("isDigital")=="true"){
    if (inputObj(i).value!=""&&isNaN(inputObj(i).value)){
     alert(strHint+"必须为数字!");
     inputObj(i).focus();
     return false;
    }
   }
   

   //只许为整数
   //如:<input type="text" name="UserName" isInt="true" hint="用户名">
   if (inputObj(i).getAttribute("isInt")=="true"){
    if (inputObj(i).value.indexOf(".")>=0){
     alert(strHint+"必须为整数!");
     inputObj(i).focus();
     return false;
    } 
   }
   
   //不许输入0
   //如:<input type="text" name="UserName" allowzero="false" hint="用户名">
   if (inputObj(i).getAttribute("allowzero")=="false"){
    if (inputObj(i).value==0){
     alert(strHint+"不能为0!");
     inputObj(i).focus();
     return false;
    } 
   } 
   
   //只许为日期
   //如:<input type="text" name="UserName" isdate="true" hint="日期">
   if (inputObj(i).getAttribute("isdate")=="true"){
    if (inputObj(i).value!=""&&!checkdate(inputObj(i).value)){
     alert(strHint+"必须为正确的日期格式!");
     inputObj(i).focus();
     return false;
    }
   }
  
  } 


  //验证select
  var selectObj=objfrm.getElementsByTagName("select");
  for (i=0;i<selectObj.length;i++){
   if (!selectObj(i).getAttribute("hint")||selectObj(i).getAttribute("hint") == "")
   {
    strHint=selectObj(i).name;
   }else{
    strHint=selectObj(i).getAttribute("hint");
   }

   //不允许为空
   //如:<select name="xxx" allownull="false" hint="下拉框">
   if (selectObj(i).getAttribute("allownull")=="false"){
    if (selectObj(i).value==""){
     alert(strHint+"不能为空!");
     selectObj(i).focus();
     return false;
    }
   }

  }


  //验证textarea
  var areaObj=objfrm.getElementsByTagName("textarea");
  for (i=0;i<areaObj.length;i++){
   if (!areaObj(i).getAttribute("hint")||areaObj(i).getAttribute("hint") == "")
   {
    strHint=areaObj(i).name;
   }else{
    strHint=areaObj(i).getAttribute("hint");
   }

   //不允许为空
   //如:<textarea name="zysm" allownull="false" hint="专业说明">
   if (areaObj(i).getAttribute("allownull")=="false"){
    if (areaObj(i).value==""){
     alert(strHint+"不能为空!");
     areaObj(i).focus();
     return false;
    }
   }

  }


  return true;
 }


//该函数为检测是否为日期的函数。上面方法调用了。
function checkdate(str){
 var reg = /^(/d+)-(/d{1,2})-(/d{1,2})$/;
 var r = str.match(reg);
 if(r==null)return false;
 r[2]=r[2]-1;
 var d= new Date(r[1], r[2],r[3]);
 if(d.getFullYear()!=r[1])return false;
 if(d.getMonth()!=r[2])return false;
 if(d.getDate()!=r[3])return false;

 return true;
}

//check.js结束

 

扩展使用方法
提交验证函数为:
function tijiao(objform){
 if (checkOwnRule(objform)){   // 使用这句就可以使用上面的验证函数(都满足了就为true),下面的则为扩展部份。
 var bz=document.all.zp.value;
    if(bz!=""){
      reg=//.([^/.]+)$/;
      var e=reg.exec(bz)[1].toLowerCase();
      if(e!="jpg"&&e!="bmp"&&e!="gif"){
      alert("必须上传图片格式文件!"); 
      return false;
      }
    }
  return true;
  
 }else{
  return false;
 }

}


3.在eclipse 中使用 sql 来查询
  连接:透视图中打开DB Browser,编辑要连接的数据库,连接上就可以了。
  测试:随便写一个*.sql 脚本,选中要执行的语句,点击播放键就可以了。
 sql result中观察结果

4.导入jar
 复制到lib中
 有时候需要另一种方法:点击工程/构建路径/添加库/用户库/用户库/新建/添加jar

ERROR in ./src/main.js Module build failed: Error: Unknown keyword formatMinimum at get (/home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/ajv-keywords@5.1.0_ajv@8.17.1/node_modules/ajv-keywords/dist/index.js:25:15) at ajvKeywords (/home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/ajv-keywords@5.1.0_ajv@8.17.1/node_modules/ajv-keywords/dist/index.js:10:13) at Object. (/home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/schema-utils@2.7.1/node_modules/schema-utils/dist/validate.js:58:1) at Module._compile (node:internal/modules/cjs/loader:1165:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10) at Module.load (node:internal/modules/cjs/loader:1043:32) at Function.Module._load (node:internal/modules/cjs/loader:878:12) at Module.require (node:internal/modules/cjs/loader:1067:19) at require (node:internal/modules/cjs/helpers:103:18) at Object. (/home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/schema-utils@2.7.1/node_modules/schema-utils/dist/index.js:3:18) at Module._compile (node:internal/modules/cjs/loader:1165:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10) at Module.load (node:internal/modules/cjs/loader:1043:32) at Function.Module._load (node:internal/modules/cjs/loader:878:12) at Module.require (node:internal/modules/cjs/loader:1067:19) at require (node:internal/modules/cjs/helpers:103:18) at Object. (/home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/babel-loader@8.4.1_@babel+core@7.28.4_webpack@5.102.1/node_modules/babel-loader/lib/index.js:31:25) at Module._compile (node:internal/modules/cjs/loader:1165:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10) at Module.load (node:internal/modules/cjs/loader:1043:32) at Function.Module._load (node:internal/modules/cjs/loader:878:12) at Module.require (node:internal/modules/cjs/loader:1067:19) at require (node:internal/modules/cjs/helpers:103:18) at /home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/webpack@5.102.1/node_modules/webpack/lib/ProgressPlugin.js:495:9 at Hook.eval [as call] (eval at create (/home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/tapable@2.3.0/node_modules/tapable/lib/HookCodeFactory.js:19:10), :7:1) at Hook.CALL_DELEGATE [as _call] (/home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/tapable@2.3.0/node_modules/tapable/lib/Hook.js:16:14) at NormalModule._doBuild (/home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/webpack@5.102.1/node_modules/webpack/lib/NormalModule.js:998:24) at NormalModule.build (/home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/webpack@5.102.1/node_modules/webpack/lib/NormalModule.js:1252:15) at /home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/webpack@5.102.1/node_modules/webpack/lib/Compilation.js:1556:12 at NormalModule.needBuild (/hom 帮我分析并解决这个问题
10-14
ERROR TypeError: Cannot convert undefined or null to object TypeError: Cannot convert undefined or null to object at Function.assign () at /home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/@dcloudio+vue-cli-plugin-uni@2.0.2-4070620250821001/node_modules/@dcloudio/vue-cli-plugin-uni/lib/chain-webpack.js:53:34 at Object.tap (/home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/webpack-chain@6.5.1/node_modules/webpack-chain/src/Use.js:14:20) at /home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/@dcloudio+vue-cli-plugin-uni@2.0.2-4070620250821001/node_modules/@dcloudio/vue-cli-plugin-uni/lib/chain-webpack.js:53:12 at Array.forEach () at /home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/@dcloudio+vue-cli-plugin-uni@2.0.2-4070620250821001/node_modules/@dcloudio/vue-cli-plugin-uni/lib/chain-webpack.js:22:17 at /home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/@vue+cli-service@5.0.9_prettier@3.6.2_sass-loader@13.3.3_vue-template-compiler@2.7.16_vue@2.7.16_webpack-sources@1.4.3/node_modules/@vue/cli-service/lib/Service.js:268:40 at Array.forEach () at Service.resolveChainableWebpackConfig (/home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/@vue+cli-service@5.0.9_prettier@3.6.2_sass-loader@13.3.3_vue-template-compiler@2.7.16_vue@2.7.16_webpack-sources@1.4.3/node_modules/@vue/cli-service/lib/Service.js:268:26) at Service.resolveWebpackConfig (/home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/@vue+cli-service@5.0.9_prettier@3.6.2_sass-loader@13.3.3_vue-template-compiler@2.7.16_vue@2.7.16_webpack-sources@1.4.3/node_modules/@vue/cli-service/lib/Service.js:272:48) at PluginAPI.resolveWebpackConfig (/home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/@vue+cli-service@5.0.9_prettier@3.6.2_sass-loader@13.3.3_vue-template-compiler@2.7.16_vue@2.7.16_webpack-sources@1.4.3/node_modules/@vue/cli-service/lib/PluginAPI.js:132:25) at serve (/home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/@dcloudio+vue-cli-plugin-uni@2.0.2-4070620250821001/node_modules/@dcloudio/vue-cli-plugin-uni/commands/serve.js:51:31) at Service.run (/home/project/wdckqx/sc-jygl-nbwz-web-yzl/node_modules/.pnpm/@vue+cli-service@5.0.9_prettier@3.6.2_sass-loader@13.3.3_vue-template-compiler@2.7.16_vue@2.7.16_webpack-sources@1.4.3/node_modules/@vue/cli-service/lib/Service.js:262:12) at processTicksAndRejections (internal/process/task_queues.js:95:5) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! jeecg-boot-h5@0.1.0 dev:h5: `cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the jeecg-boot-h5@0.1.0 dev:h5 script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2025-10-29T03_03_43_662Z-debug.log  ELIFECYCLE  Command failed with exit code 1. 请帮我分析并解决以上问题
10-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值