Commit a72c90e2 by Jie Feng

revisit page logic init

parent 49c56b0e
.idea/*
*.iml
\ No newline at end of file
This diff is collapsed. Click to expand it.
jQuery(document).ready(function ($) {
var orderList = new Vue({
el: '#order-list',
data: {
workOrders: [
{text: '未处理 JavaScript'},
{text: '处理完成 Vue2'},
{text: '处理完成 Vue'},
{text: '处理完成'}
]
}
})
function initLoadWO() {
var url = "/work/wo/list?page=1&limit=20";
var data = JSON.stringify({
"reqDto": {
"woStatus": 0,
"woType": "revisit",
"woProcessUid":''
}
});
$.ajax({
url: url,
dataType: "json",
data: data,
type: 'post',
contentType: "application/json; charset=utf-8",
success: function (res) {
console.log(res);
orderList.workOrders = res.data.list;
}
});
}
var host = "http://localhost:8083";
// 初始化加载回访工单列表
initLoadWO();
var statusTab = new Vue({
el: '#statusTab',
methods: {
unprocessed: function () {
console.log('unprocessed...');
var url = "/work/wo/list?page=1&limit=20";
var data = JSON.stringify(
{
"woStatus": 0,
"woType": "revisit",
"woProcessUid":''
}
);
console.log('unprocessed...2');
$.ajax({
url: url,
dataType: "json",
data: data,
type: 'post',
contentType: "application/json; charset=utf-8",
success: function (res) {
orderList.workOrders = res.data.list;
},
fail: function (msg) {
console.log("Error happened, Please contact Administrator. " + msg);
}
});
console.log('unprocessed...3');
},
processed: function () {
console.log('unprocessed...');
var url = "/work/wo/list?page=1&limit=20";
var data = JSON.stringify(
{
"woStatus": 1,
"woType": "revisit"
}
);
console.log('unprocessed...2');
$.ajax({
url: url,
dataType: "json",
data: data,
type: 'post',
contentType: "application/json; charset=utf-8",
success: function (res) {
console.log('unprocessed...4');
console.log(res);
orderList.workOrders = res.data.list;
},
fail: function (msg) {
console.log(msg);
}
});
console.log('unprocessed...3');
}
}
})
// 将回访工单列表做页面渲染
console.log('Finished.');
});
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