联调常态化干扰源页面 修改云效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) { export function addSurvey(data: any) {
return createAxios({ return createAxios({
@@ -156,16 +153,12 @@ export function querySurveyDetail(data: any) {
}) })
} }
// 修改普测计划 // 修改普测计划
export function auditSurvey(data: any) { export function auditSurvey(data: any) {
return createAxios({ return createAxios({
url: '/supervision-boot/surveyPlan/update', url: '/supervision-boot/surveyPlan/update',
method: 'POST', method: 'POST',
data data
}) })
} }
// 取消普测计划 // 取消普测计划
@@ -173,7 +166,7 @@ export function cancel(data: any) {
return createAxios({ return createAxios({
url: '/supervision-boot/surveyPlan/cancel', url: '/supervision-boot/surveyPlan/cancel',
method: 'POST', method: 'POST',
data data
}) })
} }
@@ -185,15 +178,12 @@ export function cancelTest(data: any) {
}) })
} }
//新版普测计划管理新增 //新版普测计划管理新增
export function addSurveyPlan(data: any) { export function addSurveyPlan(data: any) {
return createAxios({ return createAxios({
url: '/supervision-boot/surveyPlan/add', url: '/supervision-boot/surveyPlan/add',
method: 'POST', method: 'POST',
data data
}) })
} }
@@ -210,6 +200,14 @@ export function getById(id: any) {
return createAxios({ return createAxios({
url: '/supervision-boot/surveyPlan/getById', url: '/supervision-boot/surveyPlan/getById',
method: 'get', 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 data: data
}) })
} }
/**
* 重新发起表单数据(编辑)
*/
export const resend = (data: any) => {
return createAxios({
url: '/supervision-boot/userReportRenewal/resend',
method: 'POST',
data: data
})
}
//取消干扰源审批 //取消干扰源审批
export const cancelFormData = (data: any) => { export const cancelFormData = (data: any) => {

View File

@@ -60,13 +60,13 @@ defineOptions({
name: 'govern/tree' name: 'govern/tree'
}) })
interface Props { interface Props {
width?: string, width?: string
expanded?: any expanded?: any
} }
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {
width: '280px', width: '280px',
expanded:[] expanded: []
}) })
const { proxy } = useCurrentInstance() const { proxy } = useCurrentInstance()
const menuCollapse = ref(false) const menuCollapse = ref(false)
@@ -82,16 +82,47 @@ const onMenuCollapse = () => {
menuCollapse.value = !menuCollapse.value menuCollapse.value = !menuCollapse.value
proxy.eventBus.emit('cnTreeCollapse', menuCollapse) proxy.eventBus.emit('cnTreeCollapse', menuCollapse)
} }
const filterNode = (value: string, data: any) => { const filterNode = (value: string, data: any, node: any) => {
if (!value) return true 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 treeRef = ref<InstanceType<typeof ElTree>>()
const setCurrentKey=(e:string)=>{ const setCurrentKey = (e: string) => {
treeRef.value!.setCurrentKey(e) treeRef.value!.setCurrentKey(e)
} }
defineExpose({ treeRef,setCurrentKey }) defineExpose({ treeRef, setCurrentKey })
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -31,7 +31,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
draggable draggable
> >
<BpmUserReportDetail :id="interId" ref="detailsRef" :update="update"></BpmUserReportDetail> <BpmUserReportDetail :id="interId" ref="detailsRef"></BpmUserReportDetail>
</el-dialog> </el-dialog>
<!-- 查看详情 detail 新增/修改 create--> <!-- 查看详情 detail 新增/修改 create-->
<addForm <addForm
@@ -56,6 +56,8 @@ import addForm from '@/views/pqs/supervise/interfere/components/undocumented/add
import { getUserReportById } from '@/api/supervision-boot/userReport/form' import { getUserReportById } from '@/api/supervision-boot/userReport/form'
import BpmUserReportDetail from '../../components/undocumented/detail.vue' import BpmUserReportDetail from '../../components/undocumented/detail.vue'
import { useAdminInfo } from '@/stores/adminInfo' import { useAdminInfo } from '@/stores/adminInfo'
import { ElMessage, ElMessageBox } from 'element-plus'
import { userReportRenewalCancel } from '@/api/process-boot/generalTest'
const dictData = useDictData() const dictData = useDictData()
const areaOptionList = dictData const areaOptionList = dictData
.getBasicData('jibei_area') .getBasicData('jibei_area')
@@ -185,18 +187,31 @@ const tableStore = new TableStore({
render: 'buttons', render: 'buttons',
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', name: 'edit',
title: '编辑', title: '编辑',
type: 'primary', type: 'primary',
icon: 'el-icon-Open', icon: 'el-icon-Open',
render: 'basicButton', render: 'basicButton',
// showDisabled: row => { showDisabled: row => {
// return row.createBy != adminInfo.$state.id || !(row.status == 0) return row.createBy != adminInfo.$state.id || !(row.status == 0 || row.status == null)
// }, },
// disabled: row => { disabled: row => {
// return !(row.status == 0) return !(row.status == 0 || row.status == null)
// }, },
click: row => { click: row => {
update.value = row.status == null ? false : true update.value = row.status == null ? false : true
setTimeout(() => { setTimeout(() => {
@@ -207,6 +222,19 @@ const tableStore = new TableStore({
}, 100) }, 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', name: 'productSetting',
title: '入网设计方案申请', title: '入网设计方案申请',
@@ -253,6 +281,7 @@ const tableStore = new TableStore({
tableStore.table.params.relationUserName = tableStore.table.params.userName tableStore.table.params.relationUserName = tableStore.table.params.userName
} }
}) })
tableStore.table.params.city = '' tableStore.table.params.city = ''
tableStore.table.params.projectName = '' tableStore.table.params.projectName = ''
tableStore.table.params.loadType = '' tableStore.table.params.loadType = ''
@@ -272,6 +301,39 @@ const open = async val => {
dialogVisible.value = true 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 needGovernance = ref()
/** 方案审查 */ /** 方案审查 */
const toFangAn = (row: any, typeNo: number) => { 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 { useAdminInfo } from '@/stores/adminInfo'
import { queryByAllCode } from '@/api/system-boot/dictTree' import { queryByAllCode } from '@/api/system-boot/dictTree'
import { uploadFile } from '@/api/system-boot/file' 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' import { getUserReportUpdateById } from '@/api/supervision-boot/userReport/form'
const props = defineProps({ const props = defineProps({
openType: { openType: {
@@ -946,66 +946,29 @@ const open = async (row: any) => {
resendId.value = row.row.id resendId.value = row.row.id
if (props.update) { if (props.update) {
await getUserReportUpdateById(row.row.id).then(res => { await getUserReportUpdateById(row.row.id).then(res => {
handleResponse(res.userReportMessageJson) handleResponse(res.data.userReportMessageJson)
}) })
} else { } else {
await getById({ id: row.row.id }).then(res => { 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 { } else {
resendId.value = '' resendId.value = ''
form.value.userType = userTypeList.value[0].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 // userType logic is commented out; if needed, implement accordingly
if (response.data.userReportProjectPO) { if (data.userReportProjectPO) {
form.value = { ...response.data, ...response.data.userReportProjectPO } form.value = { ...data, ...data.userReportProjectPO }
fileRaw(response.data, 'userReportProjectPO') fileRaw(data, 'userReportProjectPO')
} else if (response.data.userReportSubstationPO) { } else if (data.userReportSubstationPO) {
form.value = { ...response.data, ...response.data.userReportSubstationPO } form.value = { ...data, ...data.userReportSubstationPO }
fileRaw(response.data, 'userReportSubstationPO') fileRaw(data, 'userReportSubstationPO')
} else if (response.data.userReportSensitivePO) { } else if (data.userReportSensitivePO) {
form.value = { ...response.data, ...response.data.userReportSensitivePO } form.value = { ...data, ...data.userReportSensitivePO }
fileRaw(response.data, 'userReportSensitivePO') fileRaw(data, 'userReportSensitivePO')
} }
form.value.orgId = adminInfo.$state.deptName form.value.orgId = adminInfo.$state.deptName
} }
@@ -1397,18 +1360,28 @@ const confirmForm = (flag: boolean) => {
close() close()
}) })
} else { } else {
console.log(confirmFormData)
confirmFormData.id = resendId.value confirmFormData.id = resendId.value
if (props.normalizedControl) {
updateFormData(confirmFormData).then(res => { resend(confirmFormData).then(res => {
ElMessage({ ElMessage({
message: '重新发起成功', message: '重新发起成功',
type: 'success' type: 'success'
})
ruleFormRef.value.resetFields()
resetForm()
close()
}) })
ruleFormRef.value.resetFields() } else {
resetForm() updateFormData(confirmFormData).then(res => {
close() ElMessage({
}) message: '重新发起成功',
type: 'success'
})
ruleFormRef.value.resetFields()
resetForm()
close()
})
}
} }
} else { } else {
console.log('表单验证失败') console.log('表单验证失败')

View File

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