perf(src/views/user): 减少请求数

duizhaopin_ui
duan 2 years ago
parent 3e7a6637de
commit cd3bf44e57

@ -90,10 +90,7 @@
align="center" align="center"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="scope.row.is_enabled === 1?'success':'danger'">{{ <el-tag :type="scope.row.is_enabled === 1?'success':'danger'">{{ scope.row.is_enabled === 1 ? '启用' : '未启用' }}</el-tag>
scope.row.is_enabled === 1 ? '启用' : '未启用'
}}
</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -278,7 +275,7 @@ import {
update update
} from '@/api/user/user' } from '@/api/user/user'
import stringify from '@/utils/stringify' import stringify from '@/utils/stringify'
import { web_stream as webStream } from '@/utils' import { throttle, web_stream as webStream } from '@/utils'
export default { export default {
name: 'User', name: 'User',
@ -542,7 +539,7 @@ export default {
instrument_module_id: [] instrument_module_id: []
} }
}, },
handleFaceCancel() { handleFaceCancel: throttle(function() {
faceStop().then( faceStop().then(
res => { res => {
console.log(res) console.log(res)
@ -551,7 +548,7 @@ export default {
this.web_stream.destroy() this.web_stream.destroy()
this.play = null this.play = null
this.rflag = false this.rflag = false
}, }, 1000),
handleCancel() { handleCancel() {
this.play = null this.play = null
this.rflag = false this.rflag = false

Loading…
Cancel
Save