Merge branch 'dev-3.8' of git.mesalab.cn:nezha/nezha-fronted into dev-3.9

This commit is contained in:
zyh
2023-08-28 18:07:53 +08:00
25 changed files with 133 additions and 59 deletions

View File

@@ -54,6 +54,7 @@
{{scope.row[item.prop]}}
</div>
</span>
<span v-else-if="item.prop === 'operation'">{{formatOperation(scope.row)}}</span>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
<span v-else>-</span>
</template>
@@ -91,9 +92,10 @@
<script>
import table from '@/components/common/mixin/table'
import alertLabelMixin from '@/components/common/mixin/alertLabelMixin'
import searchSelectMixin from '@/components/common/searchSelectInfo'
export default {
name: 'operationLog',
mixins: [table, alertLabelMixin],
mixins: [table, alertLabelMixin, searchSelectMixin],
props: {
loading: Boolean
},
@@ -189,6 +191,14 @@ export default {
return '-'
}
},
formatOperation (row) {
const findItem = this.searchSelectInfo.operation.find(item => item.value === row.operation)
if (findItem) {
return findItem.label
} else {
return '-'
}
},
copyValue (item) {
const str = JSON.stringify(JSON.parse(item), null, 2)
// const domUrl = document.createElement('input')