Ver a proveniência

202104211445

master
teddyhuang há 5 anos
ascendente
cometimento
f14b3f237f
8 ficheiros alterados com 39 adições e 13 eliminações
  1. +4
    -0
      app/src/App.vue
  2. +3
    -1
      app/src/components/AccountManage.vue
  3. +3
    -1
      app/src/components/AssetGroup.vue
  4. +4
    -0
      app/src/components/Home.vue
  5. +11
    -7
      app/src/components/Inventory.vue
  6. +6
    -2
      app/src/components/Login.vue
  7. +4
    -2
      app/src/components/Search.vue
  8. +4
    -0
      app/src/components/TypeManage.vue

+ 4
- 0
app/src/App.vue Ver ficheiro

@@ -30,6 +30,10 @@
this.$router.replace({name: 'login'});
break;
}
case '2': {
this.$router.replace({name: 'type'});
break;
}
default: {
this.$router.replace({name: 'asset_group'});
}


+ 3
- 1
app/src/components/AccountManage.vue Ver ficheiro

@@ -98,6 +98,8 @@
<p>{{item.level === '2' ? '一般使用者' : ''}}</p>
<p>{{item.level === '3' ? '稽核人員' : ''}}</p>
</template>
<template v-slot:item.pwd="{ }">
</template>
<template v-slot:item.actions="{ item }">
<div class="d-flex">
<v-btn
@@ -171,7 +173,7 @@
{'text': '部門', 'value': 'department'},
// {'text': '型態', 'value': 'type'},
{'text': '帳號', 'value': 'account'},
{'text': '密碼', 'value': 'pwd'},
// {'text': '密碼', 'value': 'pwd'},
{'text': '權限', 'value': 'level'}],
items: [],
departments: [],


+ 3
- 1
app/src/components/AssetGroup.vue Ver ficheiro

@@ -36,6 +36,7 @@
>
<template v-slot:activator='{ on, attrs }'>
<v-btn
v-if="level === 0"
v-bind='attrs'
v-on='on'
icon
@@ -167,7 +168,7 @@
</v-card>
</v-dialog>
<v-btn icon>
<v-icon v-show="optionIconShow === index" small @click="deleteAssertGroup(item)">
<v-icon v-show="level === 0" small @click="deleteAssertGroup(item)">
mdi-delete
</v-icon>
</v-btn>
@@ -578,6 +579,7 @@
dialogModifySelectItem: false,
oldIndex: '',
modifyTypeSelectItem: '',
level: parseInt(localStorage.getItem('level'))
}
},
async mounted() {


+ 4
- 0
app/src/components/Home.vue Ver ficheiro

@@ -229,6 +229,10 @@
//一般管理員
if (level === '1') {
this.items.push({text: '資訊資產群組', route: '/asset_group'});
this.items.push({'text': '資產類別管理', 'route': '/type'});
}
if (level === '2') {
this.items.push({'text': '資產類別管理', 'route': '/type'});
}
if (level === '3') {
this.items = [{'text': '資訊資產清冊', 'route': '/serverlist'}];


+ 11
- 7
app/src/components/Inventory.vue Ver ficheiro

@@ -35,7 +35,7 @@
<div class="row align-center">
<p v-if="haveSearch" class="mb-0 pa-0">搜尋條件:</p>
<div v-for="(val, key, index) in searchItem" :key="index" class="pa-0 ma-0">
<v-chip color="secondary" v-if="val !== null">
<v-chip color="secondary" v-if="haveSearch === true && val !== null && val !== ''">
{{mappingHeaders[key]}} 包含: {{val}}
<v-icon @click="clearSinglePropInSearchItem(key)">mdi-close</v-icon>
</v-chip>
@@ -51,13 +51,14 @@
>
<template v-slot:activator="{ on, attrs }">
<v-btn
v-if="level < 2"
color="white"
class="primary mr-5"
v-bind="attrs"
v-on="on"
icon
>
<v-icon>mdi-file-import-outline</v-icon>
<v-icon >mdi-file-import-outline</v-icon>
</v-btn>

</template>
@@ -93,6 +94,7 @@
</v-card>
</v-dialog>
<v-btn
v-if="level < 2"
color="white"
class="primary mr-5"
@click="exportFile"
@@ -275,6 +277,7 @@
<v-icon>mdi-pencil</v-icon>
</v-btn>
<v-icon
v-if="level < 2"
small
@click="deleteOne(item)"
>
@@ -378,6 +381,7 @@
dialogImport: false,
file: null,
progress: false,
level: parseInt(localStorage.getItem('level')),
}
},
async mounted() {
@@ -446,7 +450,7 @@
this.isrequired.push(item.colname);
}
this.insertItem[item.colname] = null;
this.searchItem[item.colname] = null;
this.searchItem[item.colname] = '';
});
});
},
@@ -544,13 +548,13 @@
this.getInventories();
},
async clearSearchItem() {
const self = this;
this.haveSearch = false;
const obj = {};
Object.keys(this.searchItem).forEach(function(key){
self.searchItem[key] = null;
obj[key] = null;
});
console.log(this.searchItem);
this.searchItem = obj;
this.getInventories();
this.haveSearch = false;
},
onFileChange(e) {
const files = e.target.files || e.dataTransfer.files;


+ 6
- 2
app/src/components/Login.vue Ver ficheiro

@@ -12,7 +12,7 @@
>
<v-col cols="12" align-self="center" class="d-flex">
<v-spacer/>
<img src="/rms/obank_logo.svg">
<img src="/rms/obank_logo.svg" type="img">
<v-spacer/>
</v-col>
<v-col
@@ -21,6 +21,8 @@
md='4'
>
<v-card class='elevation-12 grey lighten-3'>

<div @keyup.enter="login">
<v-toolbar
color='primary'
dark
@@ -51,8 +53,9 @@
</v-card-text>
<v-card-actions>
<v-spacer />
<v-btn color='primary' v-on:click='login()'>登入</v-btn>
<v-btn color='primary' @click="login">登入</v-btn>
</v-card-actions>
</div>
</v-card>
</v-col>
</v-row>
@@ -83,6 +86,7 @@
}
},
methods: {
log() { alert('asda')},
login() {
this.loginError = false;
const _this = this;


+ 4
- 2
app/src/components/Search.vue Ver ficheiro

@@ -34,7 +34,7 @@
</v-col>
</v-row>
<v-btn
v-if="result !== null"
v-if="level < 2 && result !== null"
color="white"
class="primary mr-5"
@click="exportFile"
@@ -98,7 +98,8 @@
currentTab: 0,
assertGroup: [],
allHeaders: {},
progress: false
progress: false,
level: parseInt(localStorage.getItem('level'))
}
},
mounted() {
@@ -120,6 +121,7 @@
this.$forceUpdate();
}
},
// before
methods: {
async getTabs() {
await this.$axios.get(`/assert/assertGroups`).then((resp) => {


+ 4
- 0
app/src/components/TypeManage.vue Ver ficheiro

@@ -48,12 +48,14 @@
>
<template v-slot:item.actions='{ item }'>
<v-btn
v-if="level === 0"
icon
@click='openDialogModifyCol(item)'
>
<v-icon>mdi-pencil</v-icon>
</v-btn>
<v-icon
v-if="level === 0"
small
@click='deleteCol(item)'
>
@@ -72,6 +74,7 @@
>
<template v-slot:activator='{ on, attrs }'>
<v-btn
v-if="level === 0"
v-bind='attrs'
v-on='on'
color='primary'
@@ -232,6 +235,7 @@
currentTab: 0,
cols: [],
oldId: '',
level: parseInt(localStorage.getItem('level'))
}
},
async mounted() {


Carregando…
Cancelar
Guardar