修改测试问题

This commit is contained in:
zhujiyan
2024-06-05 13:28:21 +08:00
parent 709ddc143b
commit ae5339eff3
19 changed files with 652 additions and 3397 deletions

View File

@@ -19,19 +19,21 @@
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { onMounted, provide, ref } from 'vue'
import { onMounted, provide, ref ,watch} from 'vue'
import { useRouter } from 'vue-router'
import MonitorQuitPopup from '@/views/pqs/supervise/retire/monitorQuitPopup.vue'
import { ElMessage } from 'element-plus'
import { ElMessageBox } from 'element-plus/es'
import { cancelQuitRunningDevice } from '@/api/supervision-boot/device/quitRunningDev'
import { useAdminInfo } from '@/stores/adminInfo'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
defineOptions({
name: 'supervision/retire'
})
const { push } = useRouter()
const { push, options, currentRoute } = useRouter()
const flag = ref(false)
const deviceQuitPopup = ref()
const tableStore = new TableStore({
url: '/supervision-boot/quitRunningDevice/list',
method: 'POST',
@@ -108,7 +110,7 @@ const tableStore = new TableStore({
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.status !== 3
return row.createBy != adminInfo.$state.id || row.status !== 3
},
click: row => {
deviceQuitPopup.value.open('重新发起退运', row)
@@ -121,7 +123,7 @@ const tableStore = new TableStore({
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.status == 3 || row.status == 2 || row.status == 4
return row.createBy != adminInfo.$state.id || row.status !== 1
},
click: row => {
cancelLeave(row)
@@ -185,5 +187,17 @@ const cancelLeave = async (row: any) => {
tableStore.index()
}
watch(
() => currentRoute.value.path,
() => {
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
},
{
deep: true
}
)
</script>