list Test result

This commit is contained in:
saeid
2019-04-29 13:20:56 +04:30
parent c6f352c711
commit 7bda94601c
7 changed files with 317 additions and 119 deletions
+219 -78
View File
@@ -9,6 +9,16 @@
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _services__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/services */ "./resources/js/vue/services/index.js");
/* harmony import */ var _config_urls__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/config/urls */ "./resources/js/vue/config/urls.js");
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
//
//
//
@@ -97,11 +107,83 @@ __webpack_require__.r(__webpack_exports__);
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({});
/* harmony default export */ __webpack_exports__["default"] = ({
data: function data() {
return {
headers: [{
sortable: false,
text: "AutoClaveId",
value: "name"
}, {
sortable: false,
text: "Hospital",
value: "Hospital"
}, {
sortable: false,
text: "User",
value: "Users"
}, {
sortable: false,
text: "Result",
value: "result"
}, {
sortable: false,
text: "Date",
value: "date"
}, {
sortable: false,
text: "Action",
value: "action",
align: "right"
}],
items: [],
currentPage: 1,
lastPage: 1
};
},
created: function created() {
this.load();
},
methods: {
load: function () {
var _load = _asyncToGenerator(
/*#__PURE__*/
_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() {
var result;
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return _services__WEBPACK_IMPORTED_MODULE_1__["ApiService"].get(_config_urls__WEBPACK_IMPORTED_MODULE_2__["urls"].listTestResult);
case 2:
result = _context.sent;
if (result && result.status == 200) {
this.items = result.data.data.data;
this.currentPage = result.data.data.current_page;
this.lastPage = result.data.data.last_page;
}
case 4:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
function load() {
return _load.apply(this, arguments);
}
return load;
}()
}
});
/***/ }),
@@ -216,81 +298,120 @@ var render = function() {
[
_c(
"v-flex",
{ attrs: { xs1: "" } },
{ attrs: { md12: "" } },
[
_c("v-card-title", [
_c("div", [
_c("div", [
_vm._v("\n 222\n ")
]),
_vm._v(" "),
_c("div", [
_vm._v("\n Test\n ")
]),
_vm._v(" "),
_c("div", {}, [
_vm._v("\n 1\n ")
])
_c("v-data-table", {
attrs: {
headers: _vm.headers,
items: _vm.items,
"hide-actions": ""
},
scopedSlots: _vm._u([
{
key: "headerCell",
fn: function(ref) {
var header = ref.header
return [
_c("span", {
staticClass:
"subheading font-weight-light text-white text--darken-3",
domProps: { textContent: _vm._s(header.text) }
})
]
}
},
{
key: "items",
fn: function(ref) {
var item = ref.item
return [
_c(
"td",
{ staticClass: "headline font-weight-light" },
[_vm._v(_vm._s(item.autoclave_id))]
),
_vm._v(" "),
_c(
"td",
{ staticClass: "title font-weight-light" },
[
_vm._v(
_vm._s(item.user.medical_center.name)
)
]
),
_vm._v(" "),
_c(
"td",
{ staticClass: "title font-weight-light" },
[_vm._v(_vm._s(item.user.name))]
),
_vm._v(" "),
_c(
"td",
{ staticClass: "title font-weight-light" },
[_vm._v(_vm._s(item.result))]
),
_vm._v(" "),
_c(
"td",
{ staticClass: "title font-weight-light" },
[_vm._v(_vm._s(item.created_at))]
),
_vm._v(" "),
_c(
"td",
{ staticClass: "text-xs-right" },
[
_c(
"v-btn",
{
staticClass: "mr-2",
attrs: { color: "black" }
},
[
_c(
"v-icon",
{
staticClass:
"white--text mr-1 caption"
},
[_vm._v("fas fa-folder")]
),
_vm._v(" "),
_c("span", [_vm._v("Archive")])
],
1
),
_vm._v(" "),
_c(
"v-btn",
{
staticClass: "mr-2",
attrs: { color: "cyan" }
},
[
_c(
"v-icon",
{
staticClass:
"white--text mr-1 caption"
},
[_vm._v("fas fa-pen")]
),
_vm._v(" "),
_c("span", [_vm._v("Edit")])
],
1
)
],
1
)
]
}
}
])
])
],
1
),
_vm._v(" "),
_c(
"v-flex",
{ attrs: { xs6: "" } },
[
_c("v-card-text", [
_c("p", [
_vm._v(
"\n Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna\n "
)
])
])
],
1
),
_vm._v(" "),
_c(
"v-flex",
{ attrs: { xs4: "" } },
[
_c(
"v-card-text",
[
_c(
"v-btn",
{ staticClass: "mr-2", attrs: { color: "black" } },
[
_c(
"v-icon",
{ staticClass: "white--text mr-1 caption" },
[_vm._v("fas fa-folder")]
),
_vm._v(" "),
_c("span", [_vm._v("Archive")])
],
1
),
_vm._v(" "),
_c(
"v-btn",
{ staticClass: "mr-2", attrs: { color: "cyan" } },
[
_c(
"v-icon",
{ staticClass: "white--text mr-1 caption" },
[_vm._v("fas fa-pen")]
),
_vm._v(" "),
_c("span", [_vm._v("Edit")])
],
1
)
],
1
)
})
],
1
)
@@ -300,6 +421,26 @@ var render = function() {
_vm._v(" "),
_c("v-divider"),
_vm._v(" "),
_vm.lastPage > 1
? _c(
"div",
{ staticClass: "text-xs-center" },
[
_c("v-pagination", {
attrs: { length: _vm.lastPage, "total-visible": 6 },
model: {
value: _vm.currentPage,
callback: function($$v) {
_vm.currentPage = $$v
},
expression: "currentPage"
}
})
],
1
)
: _vm._e(),
_vm._v(" "),
_c(
"v-layout",
{
Vendored
+7 -4
View File
@@ -148,11 +148,14 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
case 3:
result = _context.sent;
this.items = result.data.data.data;
this.currentPage = result.data.data.current_page;
this.lastPage = result.data.data.last_page;
case 7:
if (result && result.status == 200) {
this.items = result.data.data.data;
this.currentPage = result.data.data.current_page;
this.lastPage = result.data.data.last_page;
}
case 5:
case "end":
return _context.stop();
}
+1 -1
View File
@@ -1,3 +1,3 @@
{
"/vue/js/app.js": "/vue/js/app.js?id=705b759be318dc6a6352"
"/vue/js/app.js": "/vue/js/app.js?id=1f02d7209c44ae957984"
}
+1
View File
@@ -61844,6 +61844,7 @@ var urls = {
logout: "/logout",
storeMedicalCenter: "/MedicalCenters",
storeTestResult: "/TestResults",
listTestResult: "/TestResults",
listTestTypeName: "/TestTypes/ListNames",
getInputs: "/GetInputs",
listOpertor: "/Users",