运行管理

This commit is contained in:
仲么了
2023-12-28 14:06:57 +08:00
parent c1b08dabd4
commit a16c31707f
6 changed files with 528 additions and 32 deletions

View File

@@ -18,9 +18,9 @@
<Table ref="tableRef" />
</div>
</template>
<script setup lang="ts">
<script setup lang="tsx">
import { Plus } from '@element-plus/icons-vue'
import { ref, onMounted, provide, h } from 'vue'
import { ref, onMounted, provide } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
@@ -51,30 +51,29 @@ const tableStore = new TableStore({
field: 'onlineEvaluate',
align: 'center',
width: 100,
render: 'customTemplate',
customTemplate: row => {
return h(
'el-tag',
{
effect: 'dark',
type:
row.onlineEvaluate * 100 > 90
? 'success'
: row.onlineEvaluate * 100 > 60
? 'warning'
: 'danger'
},
row.onlineEvaluate * 100 + '%'
)
// if (row.onlineEvaluate == null) {
// return '-'
// } else if (row.onlineEvaluate * 100 > 90) {
// return `<el-tag effect="dark" type="success"> 优 </el-tag> `
// } else if (row.onlineEvaluate * 100 > 60) {
// return `<el-tag effect="dark" type="warning"> 良 </el-tag> `
// } else {
// return `<el-tag effect="dark" type="danger"> 差 </el-tag> `
// }
render: 'customRender',
customRender: props => {
if (props.renderValue == null) {
return <span></span>
} else if (props.renderValue * 100 > 90) {
return (
<el-tag effect="dark" type="success">
</el-tag>
)
} else if (props.renderValue * 100 > 60) {
return (
<el-tag effect="dark" type="warning">
</el-tag>
)
} else {
return (
<el-tag effect="dark" type="danger">
</el-tag>
)
}
}
}
]