oms init
This commit is contained in:
36
src/components/TicketStatus/index.vue
Normal file
36
src/components/TicketStatus/index.vue
Normal file
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<el-tag :type="type">{{statusName}}</el-tag>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
status: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
statusName() {
|
||||
if (this.status === 0) {
|
||||
return this.$t('message.nouse')
|
||||
} else if (this.status === 1) {
|
||||
return this.$t('message.used')
|
||||
} else if (this.status === 2) {
|
||||
return this.$t('message.canceld')
|
||||
} else {
|
||||
return this.$t('message.nosign')
|
||||
}
|
||||
},
|
||||
type() {
|
||||
if (this.status === 1) {
|
||||
return 'success'
|
||||
} else if (this.status === 0) {
|
||||
return 'warning'
|
||||
} else {
|
||||
return 'danger'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user