联调常态化干扰源页面 修改云效bug

This commit is contained in:
GGJ
2024-06-27 20:29:44 +08:00
parent 5bbff7ce0c
commit 3fa441af87
11 changed files with 184 additions and 106 deletions

View File

@@ -136,9 +136,6 @@ export function addPlanCycle(data: any) {
})
}
// 新增普测计划
export function addSurvey(data: any) {
return createAxios({
@@ -156,16 +153,12 @@ export function querySurveyDetail(data: any) {
})
}
// 修改普测计划
export function auditSurvey(data: any) {
return createAxios({
url: '/supervision-boot/surveyPlan/update',
method: 'POST',
data
data
})
}
// 取消普测计划
@@ -173,7 +166,7 @@ export function cancel(data: any) {
return createAxios({
url: '/supervision-boot/surveyPlan/cancel',
method: 'POST',
data
data
})
}
@@ -185,15 +178,12 @@ export function cancelTest(data: any) {
})
}
//新版普测计划管理新增
export function addSurveyPlan(data: any) {
return createAxios({
url: '/supervision-boot/surveyPlan/add',
method: 'POST',
data
data
})
}
@@ -210,6 +200,14 @@ export function getById(id: any) {
return createAxios({
url: '/supervision-boot/surveyPlan/getById',
method: 'get',
params:{id:id}
params: { id: id }
})
}
//新版普测计划管理新增
export function userReportRenewalCancel(data: any) {
return createAxios({
url: '/supervision-boot/userReportRenewal/cancel',
method: 'POST',
data
})
}

View File

@@ -35,6 +35,16 @@ export const updateFormData = (data: any) => {
data: data
})
}
/**
* 重新发起表单数据(编辑)
*/
export const resend = (data: any) => {
return createAxios({
url: '/supervision-boot/userReportRenewal/resend',
method: 'POST',
data: data
})
}
//取消干扰源审批
export const cancelFormData = (data: any) => {

View File

@@ -60,13 +60,13 @@ defineOptions({
name: 'govern/tree'
})
interface Props {
width?: string,
width?: string
expanded?: any
}
const props = withDefaults(defineProps<Props>(), {
width: '280px',
expanded:[]
expanded: []
})
const { proxy } = useCurrentInstance()
const menuCollapse = ref(false)
@@ -82,16 +82,47 @@ const onMenuCollapse = () => {
menuCollapse.value = !menuCollapse.value
proxy.eventBus.emit('cnTreeCollapse', menuCollapse)
}
const filterNode = (value: string, data: any) => {
const filterNode = (value: string, data: any, node: any) => {
if (!value) return true
return data.name.includes(value)
// return data.name.includes(value)
if (data.name) {
return chooseNode(value, data, node)
}
}
// 过滤父节点 / 子节点 (如果输入的参数是父节点且能匹配则返回该节点以及其下的所有子节点如果参数是子节点则返回该节点的父节点。name是中文字符enName是英文字符.
const chooseNode = (value: string, data: any, node: any) => {
if (data.name.indexOf(value) !== -1) {
return true
}
const level = node.level
// 如果传入的节点本身就是一级节点就不用校验了
if (level === 1) {
return false
}
// 先取当前节点的父节点
let parentData = node.parent
// 遍历当前节点的父节点
let index = 0
while (index < level - 1) {
// 如果匹配到直接返回此处name值是中文字符enName是英文字符。判断匹配中英文过滤
if (parentData.data.name.indexOf(value) !== -1) {
return true
}
// 否则的话再往上一层做匹配
parentData = parentData.parent
index++
}
// 没匹配到返回false
return false
}
const treeRef = ref<InstanceType<typeof ElTree>>()
const setCurrentKey=(e:string)=>{
treeRef.value!.setCurrentKey(e)
}
const setCurrentKey = (e: string) => {
treeRef.value!.setCurrentKey(e)
}
defineExpose({ treeRef,setCurrentKey })
defineExpose({ treeRef, setCurrentKey })
</script>
<style lang="scss" scoped>

View File

@@ -1318,7 +1318,9 @@
<el-form-item
class="form-item"
label="监测点拥有者:"
:prop="
>
<!-- :prop="
'deviceParam.' +
[deviceIndex] +
'.subVoltageParam.' +
@@ -1327,8 +1329,7 @@
lIndex +
'.owner'
"
:rules="{ required: true, message: '请输入监测点拥有者', trigger: 'blur' }"
>
:rules="{ required: true, message: '请输入监测点拥有者', trigger: 'blur' }" -->
<el-input
v-model="lineItem.owner"
:disabled="pageStatus == 1"
@@ -1338,7 +1339,9 @@
<el-form-item
class="form-item"
label="拥有者职务:"
:prop="
>
<!-- :prop="
'deviceParam.' +
[deviceIndex] +
'.subVoltageParam.' +
@@ -1347,8 +1350,7 @@
lIndex +
'.ownerDuty'
"
:rules="{ required: true, message: '请输入拥有者职务', trigger: 'blur' }"
>
:rules="{ required: true, message: '请输入拥有者职务', trigger: 'blur' }" -->
<el-input
v-model="lineItem.ownerDuty"
:disabled="pageStatus == 1"
@@ -1378,7 +1380,9 @@
<el-form-item
class="form-item"
label="上级变电站:"
:prop="
>
<!-- :prop="
'deviceParam.' +
[deviceIndex] +
'.subVoltageParam.' +
@@ -1387,8 +1391,7 @@
lIndex +
'.superiorsSubstation'
"
:rules="{ required: true, message: '请输入上级变电站', trigger: 'blur' }"
>
:rules="{ required: true, message: '请输入上级变电站', trigger: 'blur' }" -->
<el-input
v-model="lineItem.superiorsSubstation"
:disabled="pageStatus == 1"

View File

@@ -65,7 +65,7 @@
<!-- 稳态电能质量指标水平评估 -->
<div>
<div class="title">
<span>技术监督管理</span>
<span>技术监督统计</span>
<!-- <span class="info" @click="open(3)">
详情
<ArrowRight style="width: 12px" />

View File

@@ -1,6 +1,6 @@
<!-- 技术 -->
<template>
<el-dialog draggable title="技术监督管理统计" v-model="dialogVisible" width="1400px">
<el-dialog draggable title="技术监督统计" v-model="dialogVisible" width="1400px">
<div>
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="320px" :data="tableData">
<vxe-column field="orgName" title="区域" />

View File

@@ -171,7 +171,7 @@
<!-- 技术监督管理 -->
<div>
<div class="title">
<span>技术监督管理</span>
<span>技术监督统计</span>
<span class="info" @click="open(3)">
详情
<ArrowRight style="width: 12px" />

View File

@@ -296,8 +296,9 @@ const getInfo = async (row?: any) => {
form.value.reportDate = new Date()
if (row) {
goToNetReport.value = row.otherReport
form.value.id = row.id
form.value.goToNetReport =
row.otherReport == null
row.otherReport == null || row.otherReport == ''
? []
: [
{
@@ -313,7 +314,7 @@ const getInfo = async (row?: any) => {
const open = (row?: any) => {
dialogFormVisible.value = true
goToNetReport.value = ''
resetForm()
getInfo(row)
}
@@ -354,6 +355,7 @@ const confirmForm = (flag: boolean) => {
type: props.bussType,
userReportId: props.id,
reportUrl: goToNetReport.value,
id: form.value.id || null,
saveOrCheckflag: '1'
}
submitGoNet(data).then((res: any) => {
@@ -375,6 +377,7 @@ const confirmForm = (flag: boolean) => {
type: props.bussType,
userReportId: props.id,
reportUrl: goToNetReport.value,
id: form.value.id || null,
saveOrCheckflag: '2'
}
submitGoNet(data).then((res: any) => {

View File

@@ -31,7 +31,7 @@
:close-on-click-modal="false"
draggable
>
<BpmUserReportDetail :id="interId" ref="detailsRef" :update="update"></BpmUserReportDetail>
<BpmUserReportDetail :id="interId" ref="detailsRef"></BpmUserReportDetail>
</el-dialog>
<!-- 查看详情 detail 新增/修改 create-->
<addForm
@@ -56,6 +56,8 @@ import addForm from '@/views/pqs/supervise/interfere/components/undocumented/add
import { getUserReportById } from '@/api/supervision-boot/userReport/form'
import BpmUserReportDetail from '../../components/undocumented/detail.vue'
import { useAdminInfo } from '@/stores/adminInfo'
import { ElMessage, ElMessageBox } from 'element-plus'
import { userReportRenewalCancel } from '@/api/process-boot/generalTest'
const dictData = useDictData()
const areaOptionList = dictData
.getBasicData('jibei_area')
@@ -185,18 +187,31 @@ const tableStore = new TableStore({
render: 'buttons',
buttons: [
{
name: 'productSetting',
title: '流程详情',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
handleAudit(row.processInstanceId, row.historyInstanceId)
},
disabled: row => {
return !row.processInstanceId
}
},
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
// showDisabled: row => {
// return row.createBy != adminInfo.$state.id || !(row.status == 0)
// },
// disabled: row => {
// return !(row.status == 0)
// },
showDisabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 0 || row.status == null)
},
disabled: row => {
return !(row.status == 0 || row.status == null)
},
click: row => {
update.value = row.status == null ? false : true
setTimeout(() => {
@@ -207,6 +222,19 @@ const tableStore = new TableStore({
}, 100)
}
},
{
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: '入网设计方案申请',
@@ -253,6 +281,7 @@ const tableStore = new TableStore({
tableStore.table.params.relationUserName = tableStore.table.params.userName
}
})
tableStore.table.params.city = ''
tableStore.table.params.projectName = ''
tableStore.table.params.loadType = ''
@@ -272,6 +301,39 @@ const open = async val => {
dialogVisible.value = true
}
/** 流程实例详情 */
const handleAudit = (instanceId: string, historyInstanceId: string) => {
push({
name: 'BpmProcessInstanceDetail',
state: {
id: instanceId,
historyInstanceId
}
})
}
/**取消流程操作*/
const cancelLeave = async (row: any) => {
// 二次确认
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'textarea',
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: '取消原因不能为空'
})
// 发起取消
let data = {
id: row.id,
processInstanceId: row.processInstanceId,
reason: value
}
await userReportRenewalCancel(data).then(res => {
ElMessage.success('取消成功')
// 加载数据
tableStore.index()
})
}
const needGovernance = ref()
/** 方案审查 */
const toFangAn = (row: any, typeNo: number) => {

View File

@@ -523,7 +523,7 @@ import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
import { useAdminInfo } from '@/stores/adminInfo'
import { queryByAllCode } from '@/api/system-boot/dictTree'
import { uploadFile } from '@/api/system-boot/file'
import { submitFormData, getById, updateFormData, addEditor } from '@/api/supervision-boot/interfere/index'
import { submitFormData, getById, updateFormData, addEditor,resend } from '@/api/supervision-boot/interfere/index'
import { getUserReportUpdateById } from '@/api/supervision-boot/userReport/form'
const props = defineProps({
openType: {
@@ -946,66 +946,29 @@ const open = async (row: any) => {
resendId.value = row.row.id
if (props.update) {
await getUserReportUpdateById(row.row.id).then(res => {
handleResponse(res.userReportMessageJson)
handleResponse(res.data.userReportMessageJson)
})
} else {
await getById({ id: row.row.id }).then(res => {
handleResponse(res)
handleResponse(res.data)
})
}
// if (props.update) {
// await getUserReportUpdateById({ id: row.row.id }).then(res => {
// // form.value.userType = res.data.userType
// if (res.data.userReportProjectPO != null) {
// // userType 0 1
// form.value = { ...res.data, ...res.data.userReportProjectPO }
// fileRaw(res.data, 'userReportProjectPO')
// } else if (res.data.userReportSubstationPO != null) {
// // userType 2 3 4 5
// form.value = { ...res.data, ...res.data.userReportSubstationPO }
// fileRaw(res.data, 'userReportSubstationPO')
// } else if (res.data.userReportSensitivePO != null) {
// // userType6
// form.value = { ...res.data, ...res.data.userReportSensitivePO }
// fileRaw(res.data, 'userReportSensitivePO')
// }
// form.value.orgId = adminInfo.$state.deptName
// })
// } else {
// await getById({ id: row.row.id }).then(res => {
// // form.value.userType = res.data.userType
// if (res.data.userReportProjectPO != null) {
// // userType 0 1
// form.value = { ...res.data, ...res.data.userReportProjectPO }
// fileRaw(res.data, 'userReportProjectPO')
// } else if (res.data.userReportSubstationPO != null) {
// // userType 2 3 4 5
// form.value = { ...res.data, ...res.data.userReportSubstationPO }
// fileRaw(res.data, 'userReportSubstationPO')
// } else if (res.data.userReportSensitivePO != null) {
// // userType6
// form.value = { ...res.data, ...res.data.userReportSensitivePO }
// fileRaw(res.data, 'userReportSensitivePO')
// }
// form.value.orgId = adminInfo.$state.deptName
// })
// }
} else {
resendId.value = ''
form.value.userType = userTypeList.value[0].value
}
}
async function handleResponse(response) {
async function handleResponse(data) {
// userType logic is commented out; if needed, implement accordingly
if (response.data.userReportProjectPO) {
form.value = { ...response.data, ...response.data.userReportProjectPO }
fileRaw(response.data, 'userReportProjectPO')
} else if (response.data.userReportSubstationPO) {
form.value = { ...response.data, ...response.data.userReportSubstationPO }
fileRaw(response.data, 'userReportSubstationPO')
} else if (response.data.userReportSensitivePO) {
form.value = { ...response.data, ...response.data.userReportSensitivePO }
fileRaw(response.data, 'userReportSensitivePO')
if (data.userReportProjectPO) {
form.value = { ...data, ...data.userReportProjectPO }
fileRaw(data, 'userReportProjectPO')
} else if (data.userReportSubstationPO) {
form.value = { ...data, ...data.userReportSubstationPO }
fileRaw(data, 'userReportSubstationPO')
} else if (data.userReportSensitivePO) {
form.value = { ...data, ...data.userReportSensitivePO }
fileRaw(data, 'userReportSensitivePO')
}
form.value.orgId = adminInfo.$state.deptName
}
@@ -1397,18 +1360,28 @@ const confirmForm = (flag: boolean) => {
close()
})
} else {
console.log(confirmFormData)
confirmFormData.id = resendId.value
updateFormData(confirmFormData).then(res => {
ElMessage({
message: '重新发起成功',
type: 'success'
if (props.normalizedControl) {
resend(confirmFormData).then(res => {
ElMessage({
message: '重新发起成功',
type: 'success'
})
ruleFormRef.value.resetFields()
resetForm()
close()
})
ruleFormRef.value.resetFields()
resetForm()
close()
})
} else {
updateFormData(confirmFormData).then(res => {
ElMessage({
message: '重新发起成功',
type: 'success'
})
ruleFormRef.value.resetFields()
resetForm()
close()
})
}
}
} else {
console.log('表单验证失败')

View File

@@ -127,9 +127,7 @@ const tableStore = new TableStore({
showDisabled: row => {
return row.createBy != adminInfo.$state.id || !(row.dataType == 1)
},
disabled: row => {
return !(row.status == 0)
},
click: row => {
addForms.value.filterUsers([6])
addForms.value.open({