联调普测计划管理页面
This commit is contained in:
@@ -33,13 +33,15 @@ import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { submitAuditUser } from '@/api/process-boot/generalTest'
|
||||
import { submitAuditUser,cancel } from '@/api/process-boot/generalTest'
|
||||
import planAdd from './planAdd.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
import { queryPlan,removeSurvey } from '@/api/process-boot/generalTest'
|
||||
import { getUserByRoleType } from '@/api/user-boot/user'
|
||||
const dictData = useDictData()
|
||||
const { push } = useRouter()
|
||||
const dialogVisible=ref(false)
|
||||
const tableRef = ref()
|
||||
|
||||
@@ -71,18 +73,16 @@ const tableStore = new TableStore({
|
||||
title: '计划状态',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'info',
|
||||
1: 'primary',
|
||||
2: 'warning',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'info',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '新建',
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通',
|
||||
4: '已取消',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -92,16 +92,43 @@ const tableStore = new TableStore({
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '查看',
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
planAddRef.value.open('查看计划', row)
|
||||
// planAddRef.value.open('查看计划', row)
|
||||
handleAudit(row.processInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.status == 1 || row.status == 2
|
||||
},
|
||||
click: row => {
|
||||
// deviceQuitPopup.value.open('重新发起退运', row)
|
||||
planAddRef.value.open('重新发起计划', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.status == 3 || row.status == 2 || row.status == 4
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
// {
|
||||
// name: 'edit',
|
||||
// title: '编辑',
|
||||
@@ -193,10 +220,42 @@ const exportFn = () => {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.planNo,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancel(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
const handleClose = () => {
|
||||
dialogVisible.value = false
|
||||
auditUser.value = ''
|
||||
}
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
id: instanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
// 取消
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user