<!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. mybatis 在xml文件中获取当前时间的sql

    在Service等地方获取当前时间: SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日 ...

  2. MyDAL - .QueryOneAsync() 使用

    索引: 目录索引 一.API 列表 .QueryOneAsync() .QueryOneAsync<M>() 如: .QueryOneAsync<Agent>() , 用于 单 ...

  3. live-server 介绍&安装

    live-server是可以运行前端静态文件的一个服务器,既然我们要前后端分离,所以就需要单独将html代码运行起来,这里我们选择live-server,等到后边真正部署的时候在用nginx js的解 ...

  4. GlusterFS群集存储项目

    最小化安装的centos7.5 内存大于1GB 关闭selinux,防火墙端口放行(port:24007,111)(测试建议关闭firewalld) 一.环境部署 所有软件包离线安装,原因是yum安装 ...

  5. js坚持不懈之14:不要在文档加载之后使用 document.write()示例

    在看w3school的JavaScript教程时,关于文档输出流中有这么一句话:绝不要在文档加载之后使用 document.write().这会覆盖该文档. 不太明白什么意思,找了一个例子: < ...

  6. 关掉那些windows上因权限无法关闭的服务

    ProcessExplorer 下载地址 :https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer 以管理员身 ...

  7. dicom错误解决

    https://github.com/pydicom/pydicom/issues/331 sudo apt-get install python-gdcm

  8. Linux 压缩某个文件夹命令

    tar -zcvf /home/xahot.tar.gz /xahot tar -zcvf 打包后生成的文件名全路径 要打包的目录 例子:把/xahot文件夹打包后生成一个/home/xahot.ta ...

  9. Springboot+mybatis中整合过程访问Mysql数据库时报错

    报错原因如下:com.mysql.cj.core.exceptions.InvalidConnectionAttributeException: The server time zone.. 产生这个 ...

  10. 简单实现Python调用有道API接口(最新的)

    # ''' # Created on 2018-5-26 # # @author: yaoshuangqi # ''' import urllib.request import urllib.pars ...