修改测试问题
This commit is contained in:
@@ -122,7 +122,7 @@ const open = async (text: string, tempData?: any) => {
|
||||
}
|
||||
form.value.deviceType = '1'
|
||||
form.value.devStatus = '0'
|
||||
changeType(form.value.deviceType)
|
||||
// changeType(form.value.deviceType)
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,59 +1,51 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
draggable
|
||||
class='cn-operate-dialog'
|
||||
v-model='dialogVisible'
|
||||
:title='title'
|
||||
width='450px'
|
||||
top='20vh'
|
||||
>
|
||||
<el-scrollbar>
|
||||
<el-form :inline='false' :model='form' label-width='120px' :rules='rules' ref='formRef'>
|
||||
<!-- <el-form-item label="设备类型" prop="deviceType">
|
||||
<el-dialog draggable class="cn-operate-dialog" v-model="dialogVisible" :title="title" width="450px" top="20vh">
|
||||
<el-scrollbar>
|
||||
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
|
||||
<!-- <el-form-item label="设备类型" prop="deviceType">
|
||||
<el-radio-group v-model="form.deviceType" :disabled="title == '监测点退运'" @change="changeType">
|
||||
<el-radio border label="1">监测装置</el-radio>
|
||||
<el-radio border label="2">监测点</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="监测点" prop="deviceId">
|
||||
<el-tree-select
|
||||
v-model="form.deviceId"
|
||||
:data="data"
|
||||
filterable
|
||||
:default-expand-all="true"
|
||||
style="width: 100%"
|
||||
@change="changeDevStatus"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label='监测点' prop='deviceId'>
|
||||
<el-tree-select
|
||||
v-model='form.deviceId'
|
||||
:data='data'
|
||||
filterable
|
||||
:default-expand-all='true'
|
||||
style='width: 100%'
|
||||
@change='changeDevStatus'
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label='退运原因' prop='propertyNo'>
|
||||
<!-- <el-input
|
||||
<el-form-item label="退运原因" prop="propertyNo">
|
||||
<!-- <el-input
|
||||
v-model='form.propertyNo'
|
||||
clearable
|
||||
placeholder='请输入退役原因'
|
||||
/> -->
|
||||
<el-input
|
||||
type='textarea'
|
||||
clearable
|
||||
:autosize='{ minRows: 2, maxRows: 4 }'
|
||||
placeholder='请输入退运原因'
|
||||
v-model='form.propertyNo'
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
<el-input
|
||||
type="textarea"
|
||||
clearable
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
placeholder="请输入退运原因"
|
||||
v-model="form.propertyNo"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
|
||||
<template #footer>
|
||||
<span class='dialog-footer'>
|
||||
<el-button @click='dialogVisible = false'>取消</el-button>
|
||||
<el-button type='primary' @click='submit'>确认</el-button>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submit">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang='ts' setup>
|
||||
<script lang="ts" setup>
|
||||
import { ref, inject } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删除
|
||||
@@ -72,75 +64,75 @@ const formRef = ref()
|
||||
const dialogVisible = ref(false)
|
||||
// 注意不要和表单ref的命名冲突
|
||||
const form = ref({
|
||||
id: '',
|
||||
deviceId: '',
|
||||
deviceType: '2',
|
||||
devOriginalStatus: '0',
|
||||
propertyNo: ''
|
||||
id: '',
|
||||
deviceId: '',
|
||||
deviceType: '2',
|
||||
devOriginalStatus: '0',
|
||||
propertyNo: ''
|
||||
})
|
||||
|
||||
//form表单校验规则
|
||||
const rules = {
|
||||
deviceId: [{ required: true, message: '设备不能为空', trigger: 'change' }],
|
||||
propertyNo: [{ required: true, message: '请输入退役原因', trigger: 'blur' }]
|
||||
deviceId: [{ required: true, message: '设备不能为空', trigger: 'change' }],
|
||||
propertyNo: [{ required: true, message: '请输入退役原因', trigger: 'blur' }]
|
||||
}
|
||||
const resetForm = () => {
|
||||
if (formRef.value) {
|
||||
formRef.value.resetFields()
|
||||
}
|
||||
if (formRef.value) {
|
||||
formRef.value.resetFields()
|
||||
}
|
||||
}
|
||||
|
||||
const open = async (text: string, tempData?: any) => {
|
||||
title.value = text
|
||||
//监测点
|
||||
await getTerminalSelectTree(6).then(res => {
|
||||
lineList.value = res.data
|
||||
})
|
||||
sourceData.value = lineList.value
|
||||
data.value = lineList.value
|
||||
if (tempData) {
|
||||
// 表单赋值
|
||||
for (let key in form.value) {
|
||||
form.value[key] = tempData[key]
|
||||
title.value = text
|
||||
//监测点
|
||||
await getTerminalSelectTree(6).then(res => {
|
||||
lineList.value = res.data
|
||||
})
|
||||
|
||||
sourceData.value = lineList.value
|
||||
data.value = lineList.value
|
||||
if (tempData) {
|
||||
// 表单赋值
|
||||
for (let key in form.value) {
|
||||
form.value[key] = tempData[key]
|
||||
}
|
||||
form.value.deviceType = form.value.deviceType + ''
|
||||
} else {
|
||||
resetForm()
|
||||
// 在此处恢复默认表单
|
||||
for (let key in form.value) {
|
||||
form.value[key] = ''
|
||||
}
|
||||
form.value.deviceType = '1'
|
||||
}
|
||||
form.value.deviceType = form.value.deviceType + ''
|
||||
} else {
|
||||
resetForm()
|
||||
// 在此处恢复默认表单
|
||||
for (let key in form.value) {
|
||||
form.value[key] = ''
|
||||
}
|
||||
form.value.deviceType = '1'
|
||||
}
|
||||
form.value.deviceType = '2'
|
||||
changeType(form.value.deviceType)
|
||||
dialogVisible.value = true
|
||||
form.value.deviceType = '2'
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交用户表单数据
|
||||
*/
|
||||
const submit = () => {
|
||||
formRef.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
if (form.value.devOriginalStatus == '4') {
|
||||
ElMessage.warning('终端当前状态就是退运,无需变更!')
|
||||
} else {
|
||||
if (form.value.id) {
|
||||
await quitRunningDeviceUpdate(form.value)
|
||||
ElMessage.success('重新发起成功')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
} else {
|
||||
await addRunningDevice(form.value)
|
||||
//查询进线数据,避免一直处于loading状态
|
||||
ElMessage.success('申请成功')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
formRef.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
if (form.value.devOriginalStatus == '4') {
|
||||
ElMessage.warning('终端当前状态就是退运,无需变更!')
|
||||
} else {
|
||||
if (form.value.id) {
|
||||
await quitRunningDeviceUpdate(form.value)
|
||||
ElMessage.success('重新发起成功')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
} else {
|
||||
await addRunningDevice(form.value)
|
||||
//查询进线数据,避免一直处于loading状态
|
||||
ElMessage.success('申请成功')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -148,31 +140,31 @@ const submit = () => {
|
||||
*/
|
||||
|
||||
const changeType = (event: any) => {
|
||||
sourceData.value = lineList.value
|
||||
form.value.deviceId = ''
|
||||
data.value = sourceData.value
|
||||
sourceData.value = lineList.value
|
||||
form.value.deviceId = ''
|
||||
data.value = sourceData.value
|
||||
}
|
||||
const changeDevStatus = async (event: any) => {
|
||||
await getLineDetailData(event).then(res => {
|
||||
//给当前设备赋值初始运行状态
|
||||
switch (res.data.runFlag) {
|
||||
case '投运':
|
||||
form.value.devOriginalStatus = '0'
|
||||
break
|
||||
case '检修':
|
||||
form.value.devOriginalStatus = '1'
|
||||
break
|
||||
case '停运':
|
||||
form.value.devOriginalStatus = '2'
|
||||
break
|
||||
case '调试':
|
||||
form.value.devOriginalStatus = '3'
|
||||
break
|
||||
default:
|
||||
form.value.devOriginalStatus = '4'
|
||||
break
|
||||
}
|
||||
})
|
||||
await getLineDetailData(event).then(res => {
|
||||
//给当前设备赋值初始运行状态
|
||||
switch (res.data.runFlag) {
|
||||
case '投运':
|
||||
form.value.devOriginalStatus = '0'
|
||||
break
|
||||
case '检修':
|
||||
form.value.devOriginalStatus = '1'
|
||||
break
|
||||
case '停运':
|
||||
form.value.devOriginalStatus = '2'
|
||||
break
|
||||
case '调试':
|
||||
form.value.devOriginalStatus = '3'
|
||||
break
|
||||
default:
|
||||
form.value.devOriginalStatus = '4'
|
||||
break
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
@@ -180,10 +172,10 @@ defineExpose({ open })
|
||||
|
||||
<style scoped>
|
||||
.el-upload-list__item {
|
||||
transition: none !important;
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
.el-select {
|
||||
min-width: 180px;
|
||||
min-width: 180px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,214 +1,232 @@
|
||||
<!--待办事项列表-->
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<TableHeader date-picker>
|
||||
<template v-slot:select>
|
||||
<!-- <el-form-item label='任务名称'>-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model='tableStore.table.params.searchValue'-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder='请输入任务名称'-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon='el-icon-Plus' type='primary' @click='add'>新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef'></Table>
|
||||
<!--弹框-->
|
||||
<device-quit-popup ref='deviceQuitPopup' />
|
||||
|
||||
</div>
|
||||
<div class="default-main">
|
||||
<TableHeader date-picker>
|
||||
<template v-slot:select>
|
||||
<!-- <el-form-item label='任务名称'>-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model='tableStore.table.params.searchValue'-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder='请输入任务名称'-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef"></Table>
|
||||
<!--弹框-->
|
||||
<device-quit-popup ref="deviceQuitPopup" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
<script setup lang="ts">
|
||||
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 DeviceQuitPopup from '@/views/pqs/supervise/retire/deviceQuitPopup.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'
|
||||
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',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '60',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '供电公司', field: 'gdName', minWidth: 130 },
|
||||
{ title: '变电站', field: 'subName', minWidth: 160 },
|
||||
{ title: '终端名称', field: 'deviceName', minWidth: 130 },
|
||||
{ title: '变更原因', field: 'propertyNo', minWidth: 160 },
|
||||
{
|
||||
title: '当前状态', field: 'devOriginalStatus', minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'danger',
|
||||
3: 'warning',
|
||||
4: 'info'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '运行',
|
||||
1: '检修',
|
||||
2: '停运',
|
||||
3: '调试',
|
||||
4: '退运'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '变更状态', field: 'devStatus', minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'danger',
|
||||
3: 'warning',
|
||||
4: 'info'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '运行',
|
||||
1: '检修',
|
||||
2: '停运',
|
||||
3: '调试',
|
||||
4: '退运'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status', title: '审核状态', minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||
url: '/supervision-boot/quitRunningDevice/list',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '60',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '供电公司', field: 'gdName', minWidth: 130 },
|
||||
{ title: '变电站', field: 'subName', minWidth: 160 },
|
||||
{ title: '终端名称', field: 'deviceName', minWidth: 130 },
|
||||
{ title: '变更原因', field: 'propertyNo', minWidth: 160 },
|
||||
{
|
||||
title: '当前状态',
|
||||
field: 'devOriginalStatus',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'danger',
|
||||
3: 'warning',
|
||||
4: 'info'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '运行',
|
||||
1: '检修',
|
||||
2: '停运',
|
||||
3: '调试',
|
||||
4: '退运'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '变更状态',
|
||||
field: 'devStatus',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'danger',
|
||||
3: 'warning',
|
||||
4: 'info'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '运行',
|
||||
1: '检修',
|
||||
2: '停运',
|
||||
3: '调试',
|
||||
4: '退运'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '审核状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
minWidth: '150',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.status !== 3
|
||||
},
|
||||
click: row => {
|
||||
deviceQuitPopup.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)
|
||||
}
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
minWidth: '150',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
flag.value = true
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '重新发起',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status !== 3
|
||||
},
|
||||
click: row => {
|
||||
deviceQuitPopup.value.open('重新发起终端状态变更', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
tableStore.table.params.deviceType = 1
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
tableStore.table.params.deviceType = 1
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
//新增退运设备信息
|
||||
const add = () => {
|
||||
deviceQuitPopup.value.open('新增终端状态变更')
|
||||
deviceQuitPopup.value.open('新增终端状态变更')
|
||||
}
|
||||
|
||||
/** 流程实例详情 */
|
||||
const handleAudit = (instanceId: string, historyInstanceId: string) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
state: {
|
||||
id: instanceId,
|
||||
historyInstanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelQuitRunningDevice(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
reason: value
|
||||
}
|
||||
await cancelQuitRunningDevice(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user