1. 程式人生 > >easyui 倆個錯誤 解決方案

easyui 倆個錯誤 解決方案

====================================================================

<script>
    $(document).ready(function () {
        $('#historyToolList').datagrid({
            url: '/tool/DateListToolUpdateHistory',
            method: 'get',
            width: '100%',
            height: '160',
            rownumbers: true,
            singleSelect: true,
            queryParams: { toolId: '1' }


            });
        });
</script>

 <table id="historyToolList" class="easyui-datagrid"
          >
        <thead>
            <tr>
                <th data-options="field:'updateDate',width:80">修改日期</th>
                <th data-options="field:'updateUserId',width:80">修改人</th>
                <th data-options="field:'T_id',width:60">模具ID</th>
                <th data-options="field:'supplier_C',width:80">供應商</th>
                <th data-options="field:'owner_C',width:80">所屬運營</th>
                <th data-options="field:'fixedAssetNo_C',width:80">固定資產號</th>
                <th data-options="field:'useStatus_C',width:80">使用狀態</th>
                <th data-options="field:'toolingStatus_C',width:80">模具狀態</th>
                <th data-options="field:'usableCavity_N',width:80">現在的模具腔數</th>
                <th data-options="field:'cycleTime_N',width:80">每模時間</th>
                <th data-options="field:'efficiency_D',width:80">效率</th>
                <th data-options="field:'usedToolingLife_N',width:80">已經使用的模具壽命</th>
                <th data-options="field:'byPart_D',width:80">零件預測量</th>
                <th data-options="field:'machineSpeedSpm_N',width:80">衝壓速率</th>
            </tr>
        </thead>
    </table>

後臺處理

public ActionResult DateListToolUpdateHistory(string toolId)
        {
            if (String.IsNullOrEmpty(toolId) || toolId.Equals("0"))
            {
                return Json(" ", JsonRequestBehavior.AllowGet);
            }
            else
            {
                int toolId_I = Convert.ToInt32(toolId);
                var urList = from t in db.ToolUpdateHistories
                             where t.T_id == toolId_I
                             select t;
                return Json(urList.ToList(), JsonRequestBehavior.AllowGet);
            }
        }


====================================================================

以上報錯瀏覽器報錯:Uncaught TypeError: Cannot read property 'length' of undefined

如果不傳引數則報錯

Failed to load resource: the server responded with a status of 500 (Internal Server Error) 

這個倆個錯誤在MVC4 框架結合easyui  datagrid 出問題的,經過反覆測試 修改排除法查詢.

得出的結論 應該是關於瀏覽器 載入頁面時 應該先載入了JS 從而 執行了 DateListToolUpdateHistory 但是傳過來卻是Null

雖然後臺對 null 做了處理,返回 空字元的 JSON ,但是載入完JS後,頁面的引數已經有了 第二次執行DateListToolUpdateHistory 這時候,easyui 就報錯了,倆次重複的繫結

相關推薦

easyui 錯誤 解決方案

==================================================================== <script>     $(document).ready(function () {         $('#histo

Dynamic Web Module 3.1 requires Java 1.7 or newer. 錯誤解決方案

pom.xml文件 artifact logs per group -s conf 你會 cti 在寫代碼的時候工程出現了這樣奇怪的bug很是蛋疼啊,經過查詢解決方法,終於解決了這些個問題。 下面是解決問題的方法,和大家分享一下 (1)確定你的java工程配置使用了java

SSH登陸阿裏雲服務器出現Permission denied (publickey)錯誤解決方案

ckey 是個 鑰匙串 col code gen fff font 重啟 操作環境: 操作系統:Mac10.11.5 阿裏雲服務器:Ubuntu16.04 遠程連接:SSH 註:首先我們已假設你已經自己生成了SSH秘鑰,並已經配置到阿裏雲、綁定了自己的雲服務器。 但是

Ubuntu 搭建svn服務器 ,以及常見錯誤解決方案

mkdir creat mod 服務 csdn 解決 details 守護 center 一、安裝命令: 1)以root身份登錄。執行:sudo su -命令 2)執行安裝命令:apt-get install subversion 二、創建項目目錄 1)mkdir /

JSP 插入到數據庫的數據出現 “SQLServerException: 將截斷字符串或二進制數據” 錯誤解決方案

表單 設置 文本 錯誤 測試 約束 數據 打開 但是 最近在編寫一個小型基於的jsp系統開發。掌握數據庫一直感覺還不錯。但是今天就出現了一個問題困擾我大半天。後來本來準備睡覺,但是覺得今天不解決這個問題恐怕晚上是“徹夜難眠啊”!!於是打開電腦,又開始搗騰。遇到問

win7訪問局域網總提示用戶名密碼錯誤解決方案

網絡安全 本地安全策略 雙擊 本地 win7 rdquo 安全 搜索 解決 win7訪問局域網總提示用戶名密碼錯誤解決方案 1、點擊開始-在搜索欄輸入:secpol.msc(或者直接按下win+r鍵,輸入secpol.msc),打開本地安全策略。 2、找到“安

Spring整合Mybatis錯誤解決方案

pri ror org abs cto factor tran spring整合 原因 ERROR:java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransactionF

【ansible】Windows開啟遠程控制錯誤解決方案:無法檢查防火墻狀態

contain ret turn nbsp windows wall 解決方案 itl wrapper 這個在老版本的Windows系統才有這種bug。例如Windows 2008 R2和Windows 7,如果你的系統的阿裏雲的Windows server 2

關於webconsole報../website/console.go:35: undefined: ssh.InsecureIgnoreHostkey 錯誤解決方案

http lan 執行 spa 錯誤 api ole git 應該 1.首先,進入webconsole目錄刪除/opt/webconsole/src/golang.org/x/目錄下 crypto文件夾 2.然後,在/opt/webconsole/src/golang.or

webacula root登陸密碼錯誤解決方案

bacula webacula 登陸Mysql查看庫列表mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | bac

mysql開啟skip-name-resolve 導致[email protected](localhost)訪問引發的ERROR 1045 (28000)錯誤解決方案

its 遠程訪問 5.6 速度 base mat change http oracl 為什麽配置skip-name-resolve? 由於mysql -h${ip} 遠程訪問速度過慢, mysql -h172.16.66.171 -uroot -p123456 根據網

大數據常見錯誤解決方案(轉載)

nvi clu linux腳本 /etc/ var fin remove -c 技術 1、用./bin/spark-shell啟動spark時遇到異常:java.net.BindException: Can‘t assign requested address

同時增刪改多附件解決方案

align data 最終 inf file div 異常 臨時 技術 同時增刪改多個附件解決方案 需求描述如下圖: 由於同時涉及增刪改、多文件、保存、取消、異常退出、源文件刪除等多種情況,現將實現邏輯梳理如下圖: 最終確定方案要點如下(不刪

新浪微博登錄重定向地址錯誤 解決方案

spa src uri 回調 style 微博登錄 高級設置 img ima 業務需求 接入新浪微博登錄 在新浪開放平臺的 高級設置裏 設置了回調域名 是http://xxx.xxx.com/ http://xxx.com/都不行 都是報如上圖所示的錯誤 於是試了一下 ht

linux+nginx+phpfpm 訪問出現Access denied錯誤解決方案

技術分享 技術 gpo phpfpm post gin ces alt acc linux上安裝nginx,php-fpm後訪問頁面一直出現Access denied錯誤。 網上搜原因大概如下圖: 我試了第一個方案,然後就好了。linux+nginx+phpfpm 訪問出

adobe illustrator cc 安裝錯誤解決方案

adobe illustrator ccExit Code: 34Please see specific errors below for troubleshooting. For example, ERROR: -------------------------------------- Summary

mongodb錯誤解決方案

helper error: list ror show help and god 使用 問題描述: 因為一段時間沒有使用MongoDB數據庫,所以今天出現一個問題,在進入MongoDB數據庫後執行show dbs等命令基本都會出現一個錯誤,如下: MongoDB Enter

安裝mysql 8.0版本時,使用navicat 連接報1251錯誤解決方案

sha cal TE roo oot string XP 規則 nat 今天安裝mysql8 使用navicat 連接時報錯 1251 這個錯誤出現的原因是在mysql8之前的版本中加密規則為mysql_native_password,而在mysql8以後的加密規則為ca

redis 配置多ip 解決方案

配置ip 我想 外網 password In fire firewall 訪問 all 因為在 redis 中bind 指定的ip 其實為同一網段或localhost 監聽ip,在這裏配置 內網其他網段或者外網多個ip 後 重啟 redis 是不會成功的,

IDEA使用Git出現push to origin/master was rejected錯誤解決方案

reject url all 圖片 ima 解決方案 技術 cte min 在IDEA中配置碼雲的URL,如下圖 切換到自己項目所在的目錄,右鍵選擇GIT BASH Here 在terminl窗口中依次輸入命令: git pull git pull ori