- varnewToAddLeave =function(){
- vargoIndex = {
- template:`
- `,
- data:function(){
- return {
- overTimeList:{
- columns:[],
- data:[],
- total:0,
- page:1,
- checkedNames: []
- }
- }
- },
- methods:{
- textData:function(){
- varlist = [];
- var_this =this;
- _this.$Loading.start();
- _this.$Message.loading("");
- for(vari=0; i<18; i++){
- list.push(Mock.mock({
- "Serial":'@increment',
- "Applicant":"@cname",
- "ApplicantType": 'trms',
- "StartTime":'@date("yyyy-MM-dd")',
- "endTime|":'@date("yyyy-MM-dd")',
- "days|1-10":10,
- "processName|1": ['tmrs','新闻','员工有话说','portal'],
- "action": '001',
- "Manage": '@clast',
- "processTime|1": ['2017-1-30'],
- "sydays|1": [2,3],
- "beizhu": '@ctitle(3, 5)',
- }));
- }
- _this.overTimeList.data = list;
- _this.overTimeList.total = list.length;
- setTimeout(function(){
- _this.$Loading.finish();
- _this.$Message.destroy();
- },2000)
- },
- handlePage:function(val){
- this.page = val;
- this.textData();
- },
- getOverTimeList:function(){
- varself =this;
- self.overTimeList.columns = [
- {
- title: '序号',
- key: 'Serial',
- align:'center'
- },
- {
- title: '申请人',
- key: 'Applicant',
- align:'center'
- },
- {
- title: '申请类型',
- key: 'ApplicantType',
- align:'center'
- },
- {
- title: '开始日期',
- key: 'StartTime',
- align:'center'
- },
- {
- title: '结束日期',
- key: 'endTime',
- align:'center'
- },
- {
- title: '天数',
- key: 'days',
- align:'center'
- },
- {
- title: '项目名称',
- key: 'processName',
- align:'center'
- },
- {
- title: '操作',
- key: 'action',
- align:'center'
- },
- {
- title: '经办人',
- key: 'Manage',
- align:'center'
- },
- {
- title: '处理时间',
- key: 'processTime',
- align:'center'
- },
- {
- title: '剩余天数',
- key: 'sydays',
- align:'center'
- },
- {
- title: '备注',
- key: 'beizhu',
- width:200,
- }
- ];
- }
- },
- ready:function(){
- this.getOverTimeList();
- this.textData();
- }
- }
- return new vue({
- el:'#app2',
- components:{
- goIndex:goIndex
- }
- })
- }()
来源: http://www.bubuko.com/infodetail-1966835.html