Commit 7d392f3e authored by xishifeng's avatar xishifeng

pc后台时间轴

parent 1ee2be11
...@@ -242,17 +242,8 @@ ...@@ -242,17 +242,8 @@
时间轴 时间轴
</h4> </h4>
</div> </div>
<div class="modal-body"> <div class="modal-body" class="iframe-div-parent">
<div class="modal-body" id="del_msg"> <iframe class="iframe-time-line"></iframe>
时间轴
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>
<button type="button" class="btn btn-primary" id=" ">
删除
</button>
</div> </div>
</div><!-- /.modal-content --> </div><!-- /.modal-content -->
</div><!-- /.modal --> </div><!-- /.modal -->
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div>{{dataindex+1}}</div> <div>{{dataindex+1}}</div>
<div> <div>
<div> <div>
<img :src="data.img" :onerror="onErrorImg" /> <img-error :datasrc="data.img" :imgtype="'avatar'"></img-error>
</div> </div>
</div> </div>
<div> <div>
...@@ -34,8 +34,7 @@ ...@@ -34,8 +34,7 @@
} }
}, },
data: () => ({ data: () => ({
//onErrorImg: 'this.src="' + require('@/assets/images/ic_default_headpic.png') + '"'
onErrorImg: 'this.src="' + onErrorImg + '"'
}), }),
methods: { methods: {
countRankPic(index) { countRankPic(index) {
......
<template>
<div>
</div>
</template>
<script>
import '@/assets/js/layer041002.js';
export default {
name: '',
props: {
data: {
type: Object,
default: () => ({
message: 'hello'
})
},
dataindex: {
type: [Number, String],
default: () => 0
}
},
components: {
},
data: () => ({
}),
created() {
let _this = this;
_this.axios({
method: 'get',
url: '/index/selectReportAll',
responseType: 'json',
data: {
'order_id': 41
}
})
.then(function(response) {
if(response.data.code == 200) {
} else {
layer.tipsX(response.data.msg);
}
})
.catch(function(error) {
layer.tipsX(error);
});
},
methods: {
},
computed: {
}
}
</script>
<style>
</style>
\ No newline at end of file
...@@ -20,6 +20,13 @@ ...@@ -20,6 +20,13 @@
'query': { 'query': {
'token': _token 'token': _token
} }
},
{
'path': '/timeLinePc',
'nameCustom': 'pc后台时间轴',
'query': {
'id': 41
}
}] }]
} }
}, },
......
<template>
<img v-if="imgtype" :src="datasrc" :onerror="onErrorImg" />
<div v-else class="img-error-div">占位图</div>
</template>
<script>
import onErrorImg from '@/assets/images/ic_default_headpic.png';
export default {
props: {
datasrc: {
type: String,
default: () => 'hello'
},
imgtype: {
type: String,
default: () => 'avatar'
}
},
data() {
let _obj = {};
if(this.imgtype === 'avatar'){
_obj['onErrorImg'] = 'this.src="' + onErrorImg + '"';
}else{
_obj['onErrorImg'] = 'this.src="' + onErrorImg + '"';
};
return _obj;
}
}
</script>
<style>
.img-error-div{
font-size: 0;
background-color: #e0e0e0;
width: 100%;
height: 100%;
}
</style>
\ No newline at end of file
...@@ -52,7 +52,9 @@ Vue.prototype.common = common; ...@@ -52,7 +52,9 @@ Vue.prototype.common = common;
Vue.config.productionTip = true; Vue.config.productionTip = true;
import headerPulic from '@/components/publicEg/headPublic'; import headerPulic from '@/components/publicEg/headPublic';
import errorImg from '@/components/publicEg/errorImg';
Vue.component('header-pulic', headerPulic);//注册全局组件 Vue.component('header-pulic', headerPulic);//注册全局组件
Vue.component('img-error', errorImg);//注册全局组件
/* eslint-disable no-new */ /* eslint-disable no-new */
new Vue({ new Vue({
......
...@@ -2,6 +2,7 @@ import Vue from 'vue' ...@@ -2,6 +2,7 @@ import Vue from 'vue'
import Router from 'vue-router' import Router from 'vue-router'
import entrance from '@/components/publicEg/entrance' import entrance from '@/components/publicEg/entrance'
import achieveFork from '@/components/achieveMain/achieveFork' import achieveFork from '@/components/achieveMain/achieveFork'
import timeLinePc from '@/components/pcPages/timeLinePc'
Vue.use(Router) Vue.use(Router)
...@@ -20,6 +21,11 @@ export default new Router({ ...@@ -20,6 +21,11 @@ export default new Router({
path: '/achieveFork', path: '/achieveFork',
name: 'v-achieve-fork', name: 'v-achieve-fork',
component: achieveFork component: achieveFork
},
{
path: '/timeLinePc',
name: 'v-timeline-pc',
component: timeLinePc
} }
] ]
}) })
...@@ -211,4 +211,12 @@ a:hover{ ...@@ -211,4 +211,12 @@ a:hover{
#pagediv .jump-ipt{ #pagediv .jump-ipt{
width: 50px; width: 50px;
margin-left: 5px; margin-left: 5px;
} }
\ No newline at end of file
/*时间轴模态框样式 xishifeng abbr018.b5.b7*/
.iframe-time-line{
border: none;
width: 100%;
max-width: 750px;
height: 600px;
}
...@@ -15,7 +15,38 @@ define(['doT', 'text!temp/refundorder_template_tpl.html', 'css!style/home.css', ...@@ -15,7 +15,38 @@ define(['doT', 'text!temp/refundorder_template_tpl.html', 'css!style/home.css',
init: function() { init: function() {
//初始化dot //初始化dot
$(document.body).append(template); $(document.body).append(template);
follow.getList(0); follow.getList(0, function(){
$.ajax({
type: 'POST',
url: 'https://pre2.tonglianjituan.com/index/selectReportAll',
data: {
'order_id': 41
},
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
if(_data['code'] == '200') {
} else {
layerTipsX(_data['msg']);
}
} else {
layerTipsX('数据错误');
};
},
error: function() {
layerTipsX('enter error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout') {
//处理超时的逻辑
layerTipsX('请求超时,请重试');
};
}
});
});
follow.event(); follow.event();
}, },
event: function() { event: function() {
...@@ -94,6 +125,16 @@ define(['doT', 'text!temp/refundorder_template_tpl.html', 'css!style/home.css', ...@@ -94,6 +125,16 @@ define(['doT', 'text!temp/refundorder_template_tpl.html', 'css!style/home.css',
$ (document).delegate (".addphone2", "click", function () {//list2消失 $ (document).delegate (".addphone2", "click", function () {//list2消失
follow.addphone2(this); follow.addphone2(this);
}); });
$(document).on('click', 'a[href="#modal-time"]', function(e){
e.preventDefault();
e.stopPropagation();
var _this = $(this);
//var _id = _this.attr('data-id');
var _id = _this.data('id');
console.log(_id);
$('.iframe-time-line').attr('src', '/app/dist/index.html?id='+_id);
});
}, },
addphone2:function(obj){ addphone2:function(obj){
...@@ -615,7 +656,7 @@ define(['doT', 'text!temp/refundorder_template_tpl.html', 'css!style/home.css', ...@@ -615,7 +656,7 @@ define(['doT', 'text!temp/refundorder_template_tpl.html', 'css!style/home.css',
}, },
//出纳审核 //出纳审核
getList: function(pageNo) { getList: function(pageNo, fn) {
follow.pageNo = pageNo; follow.pageNo = pageNo;
var params = {}; var params = {};
params.pageNo = follow.pageNo; params.pageNo = follow.pageNo;
...@@ -635,7 +676,7 @@ define(['doT', 'text!temp/refundorder_template_tpl.html', 'css!style/home.css', ...@@ -635,7 +676,7 @@ define(['doT', 'text!temp/refundorder_template_tpl.html', 'css!style/home.css',
$("#follow_list").html(doTtmpl(data.data.data.list)); $("#follow_list").html(doTtmpl(data.data.data.list));
/*分页代码*/ /*分页代码*/
add_page(data.data.data.total,pageNo,follow.pageSize,follow.getList); add_page(data.data.data.total,pageNo,follow.pageSize,follow.getList);
fn && fn();
}else { }else {
alert(data['msg']); alert(data['msg']);
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment