修改 查看详情 返回页面刷新

This commit is contained in:
GGJ
2024-06-04 18:06:17 +08:00
parent eb62676b5d
commit 9ee495f40d
13 changed files with 404 additions and 278 deletions

View File

@@ -13,7 +13,7 @@
import { useAdminInfo } from '@/stores/adminInfo'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
import { ref, onMounted, provide, nextTick } from 'vue'
import { ref, onMounted, provide, watch } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
@@ -23,13 +23,14 @@ import planAdd from './planAdd.vue'
import { useRouter } from 'vue-router'
import { queryPlan, removeSurvey } from '@/api/process-boot/generalTest'
import { getUserByRoleType } from '@/api/user-boot/user'
const { push } = useRouter()
const { push, options, currentRoute } = useRouter()
const dialogVisible = ref(false)
const tableRef = ref()
const planAddRef = ref()
const TableHeaderRef = ref()
const auditList: any = ref([])
const auditUser = ref('')
const flag = ref(false)
const openType = ref('create')
const tableStore = new TableStore({
url: '/supervision-boot/surveyPlan/surveyPlanPage',
@@ -89,6 +90,7 @@ const tableStore = new TableStore({
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
flag.value = true
handleAudit(row.processInstanceId,row.historyInstanceId)
}
},
@@ -198,6 +200,18 @@ onMounted(() => {
auditList.value = res.data
})
})
watch(
() => currentRoute.value.path,
() => {
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
},
{
deep: true
}
)
</script>
<style scoped lang="scss"></style>

View File

@@ -30,7 +30,7 @@
<addForm ref="addForms" @onSubmit="tableStore.index()" openType="create"></addForm>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import { ref, onMounted, provide, watch } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
@@ -47,7 +47,7 @@ import { useAdminInfo } from '@/stores/adminInfo'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
const dictData = useDictData()
const { push } = useRouter()
const { push, options, currentRoute } = useRouter()
const TableHeaderRef = ref()
const tableRef = ref()
const areaOptionList = dictData.getBasicData('jibei_area')
@@ -56,6 +56,7 @@ const AuditRef = ref()
const ruleFormRef = ref()
const show: any = ref(false)
const fileList = ref([])
const flag = ref(false)
const tableStore = new TableStore({
url: '/supervision-boot/userReport/getUserReport',
publicHeight: 65,
@@ -133,6 +134,7 @@ const tableStore = new TableStore({
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
@@ -143,7 +145,7 @@ const tableStore = new TableStore({
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || row.status !=3
return row.createBy != adminInfo.$state.id || row.status != 3
},
click: row => {
addForms.value.open({
@@ -159,7 +161,7 @@ const tableStore = new TableStore({
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || row.status !=1
return row.createBy != adminInfo.$state.id || row.status != 1
},
click: row => {
cancelLeave(row)
@@ -238,6 +240,18 @@ const cancelLeave = async (row: any) => {
onMounted(() => {
tableStore.index()
})
watch(
() => currentRoute.value.path,
() => {
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
},
{
deep: true
}
)
/** 处理审批按钮 */
const handleAudit = (instanceId: any, historyInstanceId: any) => {

View File

@@ -53,9 +53,10 @@ const adminInfo = useAdminInfo()
defineOptions({
name: 'plan'
})
const flag = ref(false)
// const layout = mainHeight(120) as any
const dictData = useDictData()
const { push } = useRouter()
const { push, options, currentRoute } = useRouter()
const router = useRouter() // 路由对象
const TableHeaderRef = ref()
const tableRef = ref()
@@ -172,6 +173,7 @@ const tableStore = new TableStore({
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
flag.value = true
handleDetails(row.processInstanceId, row.historyInstanceId)
},
disabled: row => {
@@ -208,9 +210,7 @@ const tableStore = new TableStore({
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return (
row.createBy != adminInfo.$state.id || row.status !=3
)
return row.createBy != adminInfo.$state.id || row.status != 3
},
click: row => {
addForms.value.open({
@@ -226,9 +226,7 @@ const tableStore = new TableStore({
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return (
row.createBy != adminInfo.$state.id || row.status != 1
)
return row.createBy != adminInfo.$state.id || row.status != 1
},
click: row => {
cancelLeave(row)
@@ -359,4 +357,16 @@ const handleEffectProblem = (row: any) => {
}
})
}
watch(
() => currentRoute.value.path,
() => {
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
},
{
deep: true
}
)
</script>

View File

@@ -1,6 +1,6 @@
<!--待办事项列表-->
<template>
<div class='default-main'>
<div>
<TableHeader date-picker>
<template v-slot:select>
<!-- <el-form-item label='任务名称'>-->
@@ -12,22 +12,21 @@
<!-- </el-form-item>-->
</template>
<template #operation>
<el-button icon='el-icon-Plus' type='primary' @click='add'>新增</el-button>
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
</template>
</TableHeader>
<!--表格-->
<Table ref='tableRef'></Table>
<Table ref="tableRef"></Table>
<!--弹框-->
<device-quit-popup ref='deviceQuitPopup' />
<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'
@@ -37,16 +36,20 @@ import { cancelQuitRunningDevice } from '@/api/supervision-boot/device/quitRunni
defineOptions({
name: 'supervision/retire'
})
const { push } = useRouter()
const { push, options, currentRoute } = useRouter()
const deviceQuitPopup = ref()
const flag = ref(false)
const tableStore = new TableStore({
url: '/supervision-boot/quitRunningDevice/list',
method: 'POST',
publicHeight: 65,
column: [
{ title: '序号', type: 'seq', width: 80 },
{
title: '设备类型', field: 'deviceType', minWidth: 130,
title: '设备类型',
field: 'deviceType',
minWidth: 130,
render: 'tag',
custom: {
1: 'primary',
@@ -62,7 +65,9 @@ const tableStore = new TableStore({
{ title: '设备名称', field: 'deviceName', minWidth: 130 },
{ title: '退役原因', field: 'propertyNo', minWidth: 130 },
{
title: '设备状态', field: 'deviceStatus', minWidth: 130,
title: '设备状态',
field: 'deviceStatus',
minWidth: 130,
render: 'tag',
custom: {
0: 'success',
@@ -80,7 +85,9 @@ const tableStore = new TableStore({
}
},
{
field: 'status', title: '审核状态', minWidth: 100,
field: 'status',
title: '审核状态',
minWidth: 100,
render: 'tag',
custom: {
1: 'primary',
@@ -111,7 +118,8 @@ const tableStore = new TableStore({
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
handleAudit(row.processInstanceId,row.historyInstanceId)
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
{
@@ -149,7 +157,6 @@ const tableStore = new TableStore({
delete tableStore.table.params[key]
}
}
}
})
@@ -166,7 +173,7 @@ const add = () => {
}
/** 流程实例详情 */
const handleAudit = (instanceId: string,historyInstanceId:string) => {
const handleAudit = (instanceId: string, historyInstanceId: string) => {
push({
name: 'BpmProcessInstanceDetail',
state: {
@@ -197,5 +204,16 @@ 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>

View File

@@ -1,6 +1,6 @@
<!--待办事项列表-->
<template>
<div class='default-main'>
<div>
<TableHeader date-picker>
<template v-slot:select>
<!-- <el-form-item label='任务名称'>-->
@@ -12,22 +12,21 @@
<!-- </el-form-item>-->
</template>
<template #operation>
<el-button icon='el-icon-Plus' type='primary' @click='add'>新增</el-button>
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
</template>
</TableHeader>
<!--表格-->
<Table ref='tableRef'></Table>
<Table ref="tableRef"></Table>
<!--弹框-->
<device-quit-popup ref='deviceQuitPopup' />
<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'
@@ -37,16 +36,19 @@ import { cancelQuitRunningDevice } from '@/api/supervision-boot/device/quitRunni
defineOptions({
name: 'supervision/retire'
})
const { push } = useRouter()
const { push, options, currentRoute } = useRouter()
const deviceQuitPopup = ref()
const flag = ref(false)
const tableStore = new TableStore({
url: '/supervision-boot/quitRunningDevice/list',
method: 'POST',
publicHeight: 65,
column: [
{ title: '序号', type: 'seq', width: 80 },
{
title: '设备类型', field: 'deviceType', minWidth: 130,
title: '设备类型',
field: 'deviceType',
minWidth: 130,
render: 'tag',
custom: {
1: 'primary',
@@ -62,7 +64,9 @@ const tableStore = new TableStore({
{ title: '设备名称', field: 'deviceName', minWidth: 130 },
{ title: '退役原因', field: 'propertyNo', minWidth: 130 },
{
title: '设备状态', field: 'deviceStatus', minWidth: 130,
title: '设备状态',
field: 'deviceStatus',
minWidth: 130,
render: 'tag',
custom: {
0: 'success',
@@ -80,7 +84,9 @@ const tableStore = new TableStore({
}
},
{
field: 'status', title: '审核状态', minWidth: 100,
field: 'status',
title: '审核状态',
minWidth: 100,
render: 'tag',
custom: {
1: 'primary',
@@ -111,7 +117,8 @@ const tableStore = new TableStore({
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
handleAudit(row.processInstanceId,row.historyInstanceId)
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
{
@@ -149,7 +156,6 @@ const tableStore = new TableStore({
delete tableStore.table.params[key]
}
}
}
})
@@ -166,7 +172,7 @@ const add = () => {
}
/** 流程实例详情 */
const handleAudit = (instanceId: string,historyInstanceId:string) => {
const handleAudit = (instanceId: string, historyInstanceId: string) => {
push({
name: 'BpmProcessInstanceDetail',
state: {
@@ -197,5 +203,16 @@ 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>

View File

@@ -20,7 +20,13 @@
label-position="right"
>
<el-form-item label="原因:" prop="reason">
<el-input v-model="form.reason" autocomplete="off" placeholder="请输入原因" />
<el-input
v-model="form.reason"
autocomplete="off"
:autosize="{ minRows: 2, maxRows: 4 }"
type="textarea"
placeholder="请输入原因"
/>
</el-form-item>
</el-form>
<template #footer>
@@ -37,10 +43,10 @@ import { useDictData } from '@/stores/dictData'
import { useAdminInfo } from '@/stores/adminInfo'
import { addMointorPointTempLinedebug } from '@/api/supervision-boot/jointDebugList/index'
const emits = defineEmits(['onSubmit'])
const props=defineProps({
debugId:{
type:String,
default:''
const props = defineProps({
debugId: {
type: String,
default: ''
}
})
const dictData = useDictData()
@@ -52,7 +58,7 @@ const selectFormType = ref('')
selectFormType.value = '0'
const resetForm = () => {
form.value = {
reason: '', //填报人
reason: '' //填报人
}
}
//初始化数据
@@ -101,9 +107,9 @@ const confirmForm = () => {
ruleFormRef.value.validate(valid => {
if (valid) {
//提交监测点联调信息
form.value={
form.value = {
...form.value,
id:props.debugId
id: props.debugId
}
addMointorPointTempLinedebug(form.value).then(res => {
ruleFormRef.value.resetFields()
@@ -118,4 +124,3 @@ const confirmForm = () => {
}
defineExpose({ open })
</script>

View File

@@ -27,7 +27,7 @@
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import { ref, onMounted, provide, watch } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
@@ -42,14 +42,8 @@ import { cancelMointorPointFormData } from '@/api/supervision-boot/monitorpoint/
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
const dictData = useDictData()
const { push, beforeEach } = useRouter()
beforeEach((to, from) => {
if (from.path == '/bpm/instanceDetail') {
if (to.path == '/admin/terminalNetwotk') {
console.log('监测点2222')
}
}
})
const { push, options, currentRoute } = useRouter()
const flag = ref(false)
const TableHeaderRef = ref()
const tableRef = ref()
const areaOptionList = dictData.getBasicData('jibei_area')
@@ -107,6 +101,7 @@ const tableStore = new TableStore({
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
@@ -205,6 +200,18 @@ const exportEvent = () => {
onMounted(() => {
tableStore.index()
})
watch(
() => currentRoute.value.path,
() => {
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
},
{
deep: true
}
)
/** 处理审批按钮 */
const handleAudit = (instanceId: any, historyInstanceId: any) => {

View File

@@ -12,7 +12,7 @@
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import { ref, onMounted, provide, watch } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
@@ -27,20 +27,15 @@ import { useAdminInfo } from '@/stores/adminInfo'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
const dictData = useDictData()
const { push, beforeEach } = useRouter()
beforeEach((to, from) => {
if (from.path == '/bpm/instanceDetail') {
if (to.path == '/admin/terminalNetwotk') {
console.log('终端1111')
}
}
})
const { push, options, currentRoute } = useRouter()
const TableHeaderRef = ref()
const tableRef = ref()
const areaOptionList = dictData.getBasicData('jibei_area')
const ruleFormRef = ref()
const show: any = ref(false)
const fileList = ref([])
const flag = ref(false)
const tableStore = new TableStore({
url: '/supervision-boot/deVReport/list',
publicHeight: 65,
@@ -137,6 +132,7 @@ const tableStore = new TableStore({
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
}
},
@@ -233,6 +229,18 @@ onMounted(() => {
tableStore.index()
})
watch(
() => currentRoute.value.path,
() => {
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
tableStore.index()
flag.value = false
}
},
{
deep: true
}
)
/** 处理审批按钮 */
const handleAudit = (instanceId: any, historyInstanceId: any) => {
push({