修改 重新发起 按钮显示逻辑
This commit is contained in:
@@ -381,7 +381,7 @@ body,
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
z-index: 2;
|
// z-index: 2;
|
||||||
}
|
}
|
||||||
.bjs-powered-by {
|
.bjs-powered-by {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status == 1 || row.status == 2
|
return !(row.createBy == adminInfo.$state.id || row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
// deviceQuitPopup.value.open('重新发起退运', row)
|
// deviceQuitPopup.value.open('重新发起退运', row)
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status == 6 || row.status == 1 || row.status == 2
|
return !(row.createBy == adminInfo.$state.id|| row.status == 6 || row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
planTestRef.value.open('重新发起计划测试', row.id, false)
|
planTestRef.value.open('重新发起计划测试', row.id, false)
|
||||||
@@ -175,7 +175,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status == 6 || row.status == 2 || row.status == 3 || row.status == 4
|
return !(row.createBy == adminInfo.$state.id|| row.status == 1 )
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.details_item {
|
.details_item {
|
||||||
width: 50%;
|
width: 48%;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
display: flex;
|
display: flex;
|
||||||
.left_title {
|
.left_title {
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 3
|
return !(row.createBy == adminInfo.$state.id|| row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id ||row.status!=3
|
return row.createBy != adminInfo.$state.id || row.status != 3
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
handleEffectProblem(row)
|
handleEffectProblem(row)
|
||||||
@@ -221,7 +221,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 3
|
return !(row.createBy == adminInfo.$state.id || row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
@@ -237,7 +237,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 1||!row.processInstanceId
|
return row.createBy != adminInfo.$state.id || row.status != 1 || !row.processInstanceId
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
cancelLeave(row)
|
cancelLeave(row)
|
||||||
@@ -268,8 +268,8 @@ const tableStore = new TableStore({
|
|||||||
click: row => {
|
click: row => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'supervision/supervision/manage',
|
name: 'supervision/supervision/manage',
|
||||||
state:{
|
state: {
|
||||||
type:1
|
type: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status !== 3
|
return !(row.createBy == adminInfo.$state.id|| row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
deviceQuitPopup.value.open('重新发起退运', row)
|
deviceQuitPopup.value.open('重新发起退运', row)
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status !== 3
|
return !(row.createBy == adminInfo.$state.id|| row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
deviceQuitPopup.value.open('重新发起终端状态变更', row)
|
deviceQuitPopup.value.open('重新发起终端状态变更', row)
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 3
|
return !(row.createBy == adminInfo.$state.id|| row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
// deviceQuitPopup.value.open('重新发起', row)
|
// deviceQuitPopup.value.open('重新发起', row)
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 3
|
return !(row.createBy == adminInfo.$state.id|| row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
// deviceQuitPopup.value.open('重新发起', row)
|
// deviceQuitPopup.value.open('重新发起', row)
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.status == 3 || row.status == 4)
|
return !(row.createBy == adminInfo.$state.id|| row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
FormRef.value.open('重新发起', row)
|
FormRef.value.open('重新发起', row)
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 3
|
return !(row.createBy == adminInfo.$state.id|| row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
debugForms.value.open('重新发起', row)
|
debugForms.value.open('重新发起', row)
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 3
|
return !(row.createBy == adminInfo.$state.id || row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
@@ -156,7 +156,7 @@ const tableStore = new TableStore({
|
|||||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.status=''
|
tableStore.table.params.status = ''
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
// tableStore.table.params.loadType = ''
|
// tableStore.table.params.loadType = ''
|
||||||
// tableStore.table.params.userName = ''
|
// tableStore.table.params.userName = ''
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || row.status != 3
|
return !(row.createBy == adminInfo.$state.id || row.status == 3 || row.status == 4)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
addForms.value.open({
|
addForms.value.open({
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!---试运行列表-->
|
<!---试运行列表-->
|
||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader area datePicker ref='TableHeaderRef'>
|
<TableHeader area datePicker ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
@@ -15,10 +15,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon='el-icon-Plus' type='primary' @click='startRunTest'>试运行</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="startRunTest">试运行</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref='tableRef' />
|
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||||
|
|
||||||
<!-- <el-dialog
|
<!-- <el-dialog
|
||||||
v-model='timeDialog'
|
v-model='timeDialog'
|
||||||
@@ -45,8 +45,8 @@
|
|||||||
</el-dialog>-->
|
</el-dialog>-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang='ts'>
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, reactive } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
@@ -55,9 +55,7 @@ import { useDictData } from '@/stores/dictData'
|
|||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { addRunTest } from '@/api/supervision-boot/lineRunTest'
|
import { addRunTest } from '@/api/supervision-boot/lineRunTest'
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
|
import { VxeTablePropTypes } from 'vxe-table'
|
||||||
|
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
@@ -99,8 +97,8 @@ const tableStore = new TableStore({
|
|||||||
field: 'testRunTime',
|
field: 'testRunTime',
|
||||||
title: '试运行时间范围',
|
title: '试运行时间范围',
|
||||||
minWidth: 260,
|
minWidth: 260,
|
||||||
formatter:(row)=>{
|
formatter: row => {
|
||||||
return row.cellValue?row.cellValue:'/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -138,14 +136,13 @@ const tableStore = new TableStore({
|
|||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '流程详情',
|
title: '流程详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
handleAudit(row.processInstanceId,row.historyInstanceId)
|
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.testRunState != 2
|
return row.testRunState != 2
|
||||||
@@ -153,7 +150,6 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
name: 'productSetting',
|
name: 'productSetting',
|
||||||
title: '重新试运行',
|
title: '重新试运行',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
@@ -168,7 +164,6 @@ const tableStore = new TableStore({
|
|||||||
return row.status != 3
|
return row.status != 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -179,18 +174,21 @@ const tableStore = new TableStore({
|
|||||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.status=''
|
tableStore.table.params.status = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
const checkboxConfig = reactive<VxeTablePropTypes.CheckboxConfig>({
|
||||||
|
labelField: '',
|
||||||
|
checkMethod: ({ row }) => {
|
||||||
|
return !(row.testRunState == 1 || row.testRunState == 2)
|
||||||
|
}
|
||||||
|
})
|
||||||
/** 处理审批按钮 */
|
/** 处理审批按钮 */
|
||||||
const handleAudit = (instanceId: any,historyInstanceId:any) => {
|
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||||
push({
|
push({
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
state: {
|
state: {
|
||||||
@@ -221,7 +219,6 @@ const startRunTest = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
return ElMessage({
|
return ElMessage({
|
||||||
message: '请选择未试运行的监测点进行试运行',
|
message: '请选择未试运行的监测点进行试运行',
|
||||||
@@ -233,14 +230,14 @@ const startRunTest = () => {
|
|||||||
ElMessageBox.confirm('是否确认执行72小时监测点试运行?', '试运行', {
|
ElMessageBox.confirm('是否确认执行72小时监测点试运行?', '试运行', {
|
||||||
confirmButtonText: '确 认',
|
confirmButtonText: '确 认',
|
||||||
cancelButtonText: '取 消'
|
cancelButtonText: '取 消'
|
||||||
}).then(() => {
|
})
|
||||||
|
.then(() => {
|
||||||
runTestSubmit(0)
|
runTestSubmit(0)
|
||||||
})
|
})
|
||||||
.catch(() => console.info('操作取消'))
|
.catch(() => console.info('操作取消'))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const runTestSubmit = (type:number) => {
|
const runTestSubmit = (type: number) => {
|
||||||
const start = new Date()
|
const start = new Date()
|
||||||
start.setDate(start.getDate() + 1)
|
start.setDate(start.getDate() + 1)
|
||||||
start.setHours(0, 0, 0)
|
start.setHours(0, 0, 0)
|
||||||
@@ -249,12 +246,12 @@ const runTestSubmit = (type:number) => {
|
|||||||
end.setDate(end.getDate() + 3)
|
end.setDate(end.getDate() + 3)
|
||||||
end.setHours(23, 59, 59)
|
end.setHours(23, 59, 59)
|
||||||
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
|
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
|
||||||
const endString = formatDate(end,'YYYY-MM-DD')
|
const endString = formatDate(end, 'YYYY-MM-DD')
|
||||||
const data = {
|
const data = {
|
||||||
startTime: startString,
|
startTime: startString,
|
||||||
endTime: endString,
|
endTime: endString,
|
||||||
lineIds: monitorIds,
|
lineIds: monitorIds,
|
||||||
operateType:type
|
operateType: type
|
||||||
}
|
}
|
||||||
addRunTest(data).then((res: any) => {
|
addRunTest(data).then((res: any) => {
|
||||||
if (res.code === 'A0000') {
|
if (res.code === 'A0000') {
|
||||||
@@ -266,10 +263,6 @@ const runTestSubmit = (type:number) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang='scss'>
|
<style scoped lang="scss"></style>
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user