Next Edit

This commit is contained in:
saeid
2019-04-27 22:43:47 +04:30
parent 08670507f6
commit 4068a15686
24 changed files with 3582 additions and 3336 deletions
+4
View File
@@ -5,6 +5,7 @@ const urls = {
login : "/login",
logout : "/logout",
storeMedicalCenter : "/MedicalCenters",
listTestTypeName : "/TestTypes/ListNames",
listOpertor : "/Users",
listMedicalCenter : function(page) {
return "/MedicalCenters?page=" + page;
@@ -24,6 +25,9 @@ const urls = {
updateMedicalCenter : function(id) {
return `/MedicalCenters/${id}`;
},
editMedicalCenter : function(id) {
return `/MedicalCenters/${id}/edit`;
},
deleteMedicalCenter : function(id) {
return `/MedicalCenters/${id}`;
},
+7 -7
View File
@@ -91,16 +91,16 @@ export default [
name: 'AllResultTest',
view: 'TestResult/List'
},
{
path: '/submit-test-result',
path: '/add-test-result',
name: 'SubmitTestResult',
view: 'SubmitTestResult'
view: 'TestResult/AddEdit'
},
{
path: '/test-creator',
name: 'TestCreator',
+1 -1
View File
@@ -34,7 +34,7 @@ export default {
{title:'Manage Medical Center', text:'Managing users very fast by ...',icon:'/img/Static/Dashboard/Macbook.png',color:'WM-MuskGradient-BG',route:{name: 'ManageMedicalCenter'},aligntext:'text-md-left',alignimg:'text-md-right',column:'xs12 md7 sm7'},
{title:'List Test Type', text:'You can simply add your own test type',icon:'/img/Static/Dashboard/Book-and-Pen.png',color:'WM-GreyGradient-BG',route:{name: 'ListTestType'},aligntext:'text-md-left',alignimg:'text-md-right',column:'xs12 md5 sm5'},
{title:'Test to Verify', text:'You can simply add your own test type in this section of website',icon:'/img/Static/Dashboard/notepad-colorful.png',color:'WM-PinkGradient-BG',route:{name: 'SubmitTestResult'},aligntext:'text-md-center',alignimg:'text-md-left',column:'xs12 md12 sm12'},
{title:'Add a Test Result', text:'You can edit the medical center information',icon:'/img/Static/Dashboard/ipad.png',color:'WM-YellowPinkGradient-BG',route:{name: 'ManageMedicalCenter'},aligntext:'text-md-center',alignimg:'text-md-left',column:'xs12 md12 sm12'},
{title:'Add a Test Result', text:'You can edit the medical center information',icon:'/img/Static/Dashboard/ipad.png',color:'WM-YellowPinkGradient-BG',route:{name: 'SubmitTestResult'},aligntext:'text-md-center',alignimg:'text-md-left',column:'xs12 md12 sm12'},
]
}
}
@@ -57,7 +57,7 @@ export default {
},
methods: {
async load(id) {
const result = await ApiService.get(`MedicalCenters/${id}/edit`);
const result = await ApiService.get(urls.editMedicalCenter(id));
this.medicalCenter = result.data.MedicalCenter;
},
async AddMedicalCenter() {
@@ -6,24 +6,26 @@
title="Submit Test Result">
<v-layout align-center justify-center wrap class="px-5 my-3">
<v-flex xs12 sm4 md4>
<v-select
:items="items"
<v-autocomplete
:search-input.sync="searchInput"
:items="testTypeNames"
v-model="filter.name"
label="Choose Test Type"
color="black"
class="pa-2"
></v-select>
></v-autocomplete>
</v-flex>
<v-flex xs12 sm3 md3>
<v-text-field
name="testcode"
label="Or Enter Test Code"
id="id"
v-model="filter.unique_code"
label="Or Enter Test Unique Code"
color="black"
class="pa-2"
></v-text-field>
</v-flex>
<v-flex xs12 md2 sm2 class="text-xs-center text-sm-center text-md-center">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black" style="padding:10px 60px;">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black" @click="selectTestType" style="padding:10px 60px;">
<v-icon class="black--text mr-2 caption">fas fa-chevron-right</v-icon>
<span class="black--text">GO</span>
</v-btn>
@@ -33,32 +35,50 @@
<v-divider></v-divider>
</v-layout>
<v-layout align-center justify-center wrap class="px-5 my-3">
<v-flex xs12 sm4 md4>
<v-text-field
name="cssd"
label="ID CSSD"
color="black"
id="id"
class="pa-2"
></v-text-field>
</v-flex>
<v-flex xs12 sm4 md4>
<v-flex xs12 sm4 md3>
<v-text-field
name="autoclave"
v-model="form.autoclave_id"
label="ID AutoClave"
color="black"
id="id"
class="pa-2"
></v-text-field>
</v-flex>
<v-flex xs12 sm4 md4>
<v-flex xs12 sm4 md3>
<v-select
:items="items"
:items="result"
v-model="form.result"
label="Resualt"
color="black"
class="pa-2"
></v-select>
</v-flex>
<v-flex v-for="(item, key) in form.data" :key="key">
<v-text-field
v-if="item.type == 'Text'"
v-model="form.data[key][item.name]"
label="Resualt"
color="black"
class="pa-2"
></v-text-field>
<v-select
v-if="item.type == 'Select'"
:items="item.options"
v-model="form.data[key][item.name]"
label="Resualt"
color="black"
class="pa-2"
item-text="title"
></v-select>
<template v-if="item.type == 'CheckBox'">
<v-container fluid v-for="(optionValue, keyOption) in item.options" :key="keyOption">
<v-checkbox :label="option.title" v-model="form.data[key][item.name]" :value="optionValue"></v-checkbox>
</v-container>
</template>
<!-- <template v-if="item.type == 'Form'">
</template> -->
</v-flex>
</v-layout>
<v-layout row wrap class="px-5 my-3">
<v-divider></v-divider>
@@ -68,7 +88,7 @@
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
<span class="white--text">SAVE</span>
</v-btn>
<router-link to="/dashboard">
<router-link :to="{name: 'Dashboard'}">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
<span class="black--text">Back</span>
@@ -80,17 +100,39 @@
</v-form>
</template>
<script>
import { ApiService } from "@/services";
import { urls } from "@/config/urls";
export default {
name: "",
data: () => ({
items: [
'Item 1',
'Item 2',
'Item 3',
'Item 4'
]
})
result: [
'Accept',
'Reject',
],
testTypeNames: [],
searchInput: '',
form: {
autoclave_id: '',
result: '',
data: [
]
},
filter: {
name:'',
unique_code:''
}
}),
created() {
this.load();
},
methods:{
async load() {
const result = await ApiService.get(urls.listTestTypeName);
this.testTypeNames = result.data.data;
},
selectTestType() {
}
}
}
</script>
<style lang="scss" scoped>
</style>
</script>