<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>User List</title>
<link href="/css/publicCSS.css" rel="stylesheet" type="text/css">
<link href="/css/font-all.css" rel="stylesheet" type="text/css">
<script src=/js/jquery.min.js"></script>
<script src=/js/layer/layer.js"></script>
<script src="https://vuejs.org/js/vue.min.js"></script>
</head>
<body>
<!--表格样式1-->
<div class="panel_ZH">
<div class="line_header"><i class="fas fa-table"></i> 表格1
<div class="line_header_R"><i class="fas fa-plus"></i> <i class="fas fa-caret-left"></i> <i
class="fas fa-caret-down"></i> <i class="fas fa-caret-right"></i> <i class="fas fa-chevron-up"></i> <i
class="fas fa-chevron-down"></i> <i class="fas fa-chevron-left"></i> <i
class="fas fa-chevron-right"></i> <i class="fas fa-check"></i></div>
</div><!--line_header-->
<table class="table201801" id="userList">
<tbody>
<tr>
<th>操作</th>
<th>账号</th>
<th>中文名</th>
<th>英文名</th>
<th>所属公司</th> <th>所属平台</th>
<th>是否有效</th>
<th>最后登录时间</th>
<th>创建人</th>
<th>创建时间</th>
</tr>
<tr v-for="item in userList">
<td><i class="fas fa-pencil-alt"></i>   <i class="fas fa-trash-alt"></i></td>
<td>{{item.account}}</td>
<td>{{item.userNameCn}}</td>
<td>{{item.userNameEn}}</td>
<td>{{item.companyId}}</td>
<td>{{item.platformId}}</td> <td>{{item.isValid}}</td>
<td>{{item.lastLoginTime}}</td>
<td>{{item.createUserId}}</td>
<td>{{item.createTime}}</td> </tr> </tbody>
</table><!--table201801-->
</div><!--panel_ZH-->
</body>
</html>
<script>
//不用ajax调数直接用json当数据
var v1=new Vue({
el:"#userList",
data:{
userList:[]//[{"account":"admin","companyId":0,"createTime":"2018-07-31 09:24:24","createUserId":0,"isValid":1,"lastLoginTime":null,"platformId":1,"remark":"","roleIdstr":"","updateTime":null,"updateUserId":0,"userId":1,"userNameCn":"管理员","userNameEn":"Administrator"},{"account":"admin2","companyId":1,"createTime":"2018-07-31 09:24:24","createUserId":0,"isValid":1,"lastLoginTime":null,"platformId":1,"remark":"","roleIdstr":"","updateTime":null,"updateUserId":0,"userId":2,"userNameCn":"管理员2","userNameEn":"Administrator2"}]
}
}); $(function () {
loadData();
}); function loadData() {
var postdata = {pageIndex: "1"};
$.ajax3({
url: "/webapi/getlist",
data:postdata,
success: function (r) {
console.log("OK"+JSON.stringify(r))
if (r != null && r.code == 1 && r.data.list.length>0) {
console.log("list:"+JSON.stringify(r.data.list))
v1.userList=r.data.list;
//bindData(r.data);
} }
});
} </script>

  

                   
                   

vue根据ajax绑定数数。。的更多相关文章

  1. Vue.js双向绑定的实现原理和模板引擎实现原理(##########################################)

    Vue.js双向绑定的实现原理 解析 神奇的 Object.defineProperty 这个方法了不起啊..vue.js和avalon.js 都是通过它实现双向绑定的..而且Object.obser ...

  2. 从零开始学 Web 之 Vue.js(四)Vue的Ajax请求和跨域

    大家好,这里是「 从零开始学 Web 系列教程 」,并在下列地址同步更新...... github:https://github.com/Daotin/Web 微信公众号:Web前端之巅 博客园:ht ...

  3. vue使用ajax

    1.Vue的Ajax基本用法 在vue中用Ajax需要用到vue.js和vue-resource.js; vue-resource.js的下载地址:https://cdn.staticfile.org ...

  4. Vue.js双向绑定的实现原理

    Vue.js最核心的功能有两个,一是响应式的数据绑定系统,二是组件系统.本文仅探究几乎所有Vue的开篇介绍都会提到的hello world双向绑定是怎样实现的.先讲涉及的知识点,再参考源码,用尽可能少 ...

  5. 【BZOJ】【3530】【SDOI2014】数数

    AC自动机/数位DP orz zyf 好题啊= =同时加深了我对AC自动机(这个应该可以叫Trie图了吧……出边补全!)和数位DP的理解……不过不能自己写出来还真是弱…… /************* ...

  6. Jquery ajax 绑定multiselect多选下拉选项,同时异步执行返回值

    Jquery ajax 绑定multiselect多选下拉选项,同时异步执行获取返回值 function load(mslt_employees,belongto,mark) {//传入$(#ID) ...

  7. BZOJ3530: [Sdoi2014]数数

    3530: [Sdoi2014]数数 Time Limit: 10 Sec  Memory Limit: 512 MBSubmit: 322  Solved: 188[Submit][Status] ...

  8. 【HDU3530】 [Sdoi2014]数数 (AC自动机+数位DP)

    3530: [Sdoi2014]数数 Time Limit: 10 Sec  Memory Limit: 512 MBSubmit: 682  Solved: 364 Description 我们称一 ...

  9. COJ 0036 数数happy有多少个?

    数数happy有多少个? 难度级别:B: 运行时间限制:1000ms: 运行空间限制:51200KB: 代码长度限制:2000000B 试题描述 图图是个爱动脑子.观察能力很强的好学生.近期他正学英语 ...

随机推荐

  1. .NET Core 学习笔记3——EF Core

    EF Core (EntityFramework Core)是实体关系映射(O/RM)数据库访问框架.这个模式的好处就是让开发人员可以用对象模型来操作数据库,这是一种对开发人员较为友好的方式. O/R ...

  2. docker根据配置文件启动redis

    更多docker基本命令请自行查询. 1.首先拉取合适版本的docker镜像 docker pull redis:5 2.如果不需要更改什么配置或者仅仅测试用可以直接启动镜像运行容器,这里要说明的是根 ...

  3. 我的Windows日常——Excel 打开.xls .xlsx 文件格式或文件扩展名无效

    就问下各位,这个图,熟不熟?!! 不熟? 好吧当我没问,遇到过的没遇到过的都让我继续写下去吧.... 很多时候,我们新建了一个word文件,但是打开却会弹出这个小窗口,新建的文件出现这个问题,是什么原 ...

  4. hbuilder IOS APP 打包与发布

    ---恢复内容开始--- 准备:苹果开发者账号,一个Mac系统 没有账号可以再这里注册 https://developer.apple.com/ 因为账号是公司的,自己并没有注册过,这里就不进行阐述了 ...

  5. 【原创】谈谈线上CPU100%排查套路

    引言 不知道在大家面试中,有没有遇到这个问题 生产服务器上部署了几个java程序,突然出现了CPU100%的异常告警,你如何定位出问题呢? 这个问题分为两版回答! 高调版 对不起,我是做研发的,这个问 ...

  6. FineUICore(基础版)v5.4.0已发布!

    FineUICore(基础版)已发布,请先加入知识星球,下载后可以永久免费商用:

  7. Web后台快速开发框架(.NET Core)

    Web后台快速开发框架(.NET Core) Coldairarrow 目录 目录 第1章    目录    1 第2章    简介    3 第3章    基础准备    4 3.1    开发环境 ...

  8. 身份认证功能chiro的使用

    package com.cun;import org.apache.shiro.SecurityUtils;import org.apache.shiro.authc.*;import org.apa ...

  9. 腾讯通信云服务端使用心得,腾讯云IM

    腾讯通信云服务端使用心得 1.腾讯通信服务入口并创建应用 方便使用保留url地址 :   https://cloud.tencent.com/product/im 注册账号腾讯云账号->通过审核 ...

  10. lazyMan

    class Lazyman { constructor() { this.tasks = []; this.init(); } init() { const task = () => { con ...