修改测试问题

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

@@ -1,7 +1,7 @@
<template>
<el-dialog
v-model="dialogFormVisible"
title="申请联调"
:title="title"
width="30%"
:append-to-body="true"
:before-close="close"
@@ -41,7 +41,10 @@
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch, onUnmounted } from 'vue'
import { useDictData } from '@/stores/dictData'
import { useAdminInfo } from '@/stores/adminInfo'
import { addMointorPointTempLinedebug } from '@/api/supervision-boot/jointDebugList/index'
import {
addMointorPointTempLinedebug,
updateMointorPointTempLinedebug
} from '@/api/supervision-boot/jointDebugList/index'
const emits = defineEmits(['onSubmit'])
const props = defineProps({
debugId: {
@@ -58,7 +61,8 @@ const selectFormType = ref('')
selectFormType.value = '0'
const resetForm = () => {
form.value = {
reason: '' //填报人
reason: '', //填报人
id: ''
}
}
//初始化数据
@@ -82,8 +86,12 @@ watch(
immediate: true
}
)
const open = () => {
const title = ref('')
const open = (text: any, row: any) => {
dialogFormVisible.value = true
title.value = text
form.value.id = row.id
form.value.reason=row.reason
}
const close = () => {
//重置表单内容
@@ -107,15 +115,19 @@ const confirmForm = () => {
ruleFormRef.value.validate(valid => {
if (valid) {
//提交监测点联调信息
form.value = {
...form.value,
id: props.debugId
if (title.value != '重新发起') {
addMointorPointTempLinedebug(form.value).then(res => {
ruleFormRef.value.resetFields()
resetForm()
close()
})
} else {
updateMointorPointTempLinedebug(form.value).then(res => {
ruleFormRef.value.resetFields()
resetForm()
close()
})
}
addMointorPointTempLinedebug(form.value).then(res => {
ruleFormRef.value.resetFields()
resetForm()
close()
})
} else {
console.log('表单验证失败')
return false

View File

@@ -37,19 +37,20 @@ import { getLoadTypeUserList } from '@/api/process-boot/interference'
import { setTempLinedebugLedgerSync } from '@/api/supervision-boot/jointDebugList/index'
import debug from './debug.vue'
import { any } from 'vue-types'
import { cancelMointorPointTempLinedebug } from '@/api/supervision-boot/jointDebugList/index'
import { useAdminInfo } from '@/stores/adminInfo'
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
const dictData = useDictData()
const { push, beforeEach } = useRouter()
beforeEach((to, from) => {
if (from.path == '/bpm/instanceDetail') {
console.log('联调333')
}
})
const { push, options, currentRoute } = useRouter()
const flag = ref(false)
const TableHeaderRef = ref()
const tableRef = ref()
const areaOptionList = dictData.getBasicData('jibei_area')
const ruleFormRef = ref()
const show: any = ref(false)
const fileList = ref([])
const tableStore = new TableStore({
url: '/supervision-boot/tempLinedebug/list',
publicHeight: 65,
@@ -65,6 +66,17 @@ const tableStore = new TableStore({
}
},
{ field: 'lineName', title: '监测点名称', minWidth: 170 },
{
field: 'reason',
title: '调试原因',
minWidth: 170,
formatter: (row: any) => {
return row.cellValue ? row.cellValue : '/'
}
},
{ field: 'lineId', title: '监测点编号', minWidth: 170 },
// { field: 'monitoringTerminalCode', title: '监测终端编码', minWidth: 170 },
{ field: 'monitoringTerminalName', title: '监测终端名称', minWidth: 170 },
{
field: 'status',
title: '审核状态',
@@ -86,17 +98,6 @@ const tableStore = new TableStore({
null: '/'
}
},
{
field: 'reason',
title: '调试原因',
minWidth: 170,
formatter: (row: any) => {
return row.cellValue ? row.cellValue : '/'
}
},
{ field: 'lineId', title: '监测点编号', minWidth: 170 },
// { field: 'monitoringTerminalCode', title: '监测终端编码', minWidth: 170 },
{ field: 'monitoringTerminalName', title: '监测终端名称', minWidth: 170 },
{
title: '操作',
minWidth: 150,
@@ -110,7 +111,8 @@ const tableStore = new TableStore({
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
handleAudit(row.processInstanceId)
flag.value = true
handleAudit(row.processInstanceId, row.historyInstanceId)
},
disabled: row => {
return !row.processInstanceId
@@ -123,12 +125,40 @@ const tableStore = new TableStore({
icon: 'el-icon-add',
render: 'basicButton',
click: row => {
handleDebug(row)
// handleDebug(row)
debugForms.value.open('申请联调', row)
},
disabled: row => {
return row.reason
}
},
{
name: 'edit',
title: '重新发起',
type: 'warning',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || row.status != 3
},
click: row => {
debugForms.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)
}
},
{
name: 'productSetting',
title: '同步台账',
@@ -189,11 +219,12 @@ onMounted(() => {
})
/** 处理审批按钮 */
const handleAudit = (instanceId: any) => {
const handleAudit = (instanceId: any, historyInstanceId: any) => {
push({
name: 'BpmProcessInstanceDetail',
query: {
id: instanceId
state: {
id: instanceId,
historyInstanceId
}
})
}
@@ -203,8 +234,40 @@ const debugId = ref('')
const handleDebug = (row: any) => {
debugId.value = row.id
console.log(debugId.value)
debugForms.value.open()
debugForms.value.open('申请联调', row)
}
/**取消流程操作*/
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 cancelMointorPointTempLinedebug(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>
<style scoped lang="scss">

View File

@@ -39,10 +39,10 @@
</el-upload>
</div>
<!-- 基础信息 -->
<el-form-item for="-" label="填报人:" prop="reporterName">
<el-form-item v-if="false" for="-" label="填报人:" prop="reporterName">
<el-input v-model="form.reporterName" autocomplete="off" placeholder="请输入填报人" :disabled="true" />
</el-form-item>
<el-form-item for="-" label="填报日期:" prop="reportDate">
<el-form-item v-if="false" for="-" label="填报日期:" prop="reportDate">
<el-date-picker
style="width: 100%"
v-model="form.reportDate"
@@ -53,10 +53,10 @@
placeholder="请选择填报日期"
/>
</el-form-item>
<el-form-item for="-" label="填报部门:" prop="orgId">
<el-form-item v-if="false" for="-" label="填报部门:" prop="orgId">
<el-input v-model="form.orgName" :disabled="true" autocomplete="off" />
</el-form-item>
<el-form-item for="-" label="工程投产日期:" prop="expectedProductionDate">
<el-form-item v-if="false" for="-" label="工程投产日期:" prop="expectedProductionDate">
<el-date-picker
style="width: 100%"
v-model="form.expectedProductionDate"
@@ -68,7 +68,7 @@
placeholder="请选择工程投产日期"
/>
</el-form-item>
<el-form-item for="-" label="所属地市:" prop="city">
<el-form-item v-if="false" for="-" label="所属地市:" prop="city">
<el-select
v-model="form.city"
clearable
@@ -84,7 +84,7 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item for="-" label="用户状态:" prop="userStatus">
<el-form-item v-if="false" for="-" label="用户状态:" prop="userStatus">
<el-select v-model="form.userStatus" placeholder="请选择用户状态" :disabled="true" style="width: 100%">
<el-option
v-for="(item, index) in userStateList"

View File

@@ -200,7 +200,7 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item for="-" label="通讯状态:" prop="communicationStatus">
<el-form-item v-if="false" for="-" label="通讯状态:" prop="communicationStatus">
<el-select
v-model="form.communicationStatus"
clearable