修改技术监督bug

This commit is contained in:
GGJ
2024-06-18 09:03:53 +08:00
parent 8233b13927
commit f33aed9b89
18 changed files with 233 additions and 178 deletions

View File

@@ -3,7 +3,7 @@
padding: 0 8px;
border-left: 1px solid #eeeeee;
box-shadow: 0 0 8px #cccccc;
max-height: 100%;
max-height: calc(100vh - 200px);
overflow-y: scroll;
}
.panel-tab__title {

View File

@@ -117,7 +117,8 @@ onMounted(async () => {
<style lang="scss">
.process-panel__container {
position: absolute;
top: 90px;
top: 62px;
right: 60px;
background-color: #fff;
}
</style>

View File

@@ -694,7 +694,7 @@ defineExpose({ open })
}
.conclusion {
display: inline-block;
padding: 0 5px;
padding: 2px 5px;
height: 20px;
border-radius: 4px;
}

View File

@@ -172,6 +172,6 @@ onMounted(() => {
<style lang="scss" scoped>
.elView {
cursor: pointer;
margin-right: 5px;
margin-right: 10px;
}
</style>

View File

@@ -652,17 +652,17 @@ onMounted(() => {
</script>
<style lang="scss">
::v-deep.el-icon svg {
margin: 5px !important;
position: absolute !important;
top: 20px !important;
}
.details {
width: 100%;
display: flex;
flex-wrap: wrap;
// margin: 5px !important;
// position: absolute !important;
// top: 20px !important;
}
// .details {
// width: 100%;
// display: flex;
// flex-wrap: wrap;
// }
.elView {
cursor: pointer;
margin-right: 5px;
margin-right: 10px;
}
</style>

View File

@@ -47,7 +47,7 @@ import { getUserReportById } from '@/api/supervision-boot/userReport/form'
import BpmUserReportDetail from '../../components/undocumented/detail.vue'
import { useAdminInfo } from '@/stores/adminInfo'
const dictData = useDictData()
const areaOptionList = dictData.getBasicData('jibei_area')
const areaOptionList = dictData.getBasicData('jibei_area').filter(item => !(item.name == '超高压' || item.name == '风光储'))
const statusSelect = dictData.statusSelect()
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()

View File

@@ -630,20 +630,21 @@ onMounted(() => {
</script>
<style lang="scss">
::v-deep.el-icon svg {
margin: 5px !important;
position: absolute !important;
top: 20px !important;
// margin: 5px !important;
// position: absolute !important;
// top: 20px !important;
// float: right;
}
// .el-icon {
// float: left;
// }
a {
display: block;
width: 200px;
float: left;
}
// a {
// display: block;
// width: 200px;
// float: right;
// }
.elView {
cursor: pointer;
margin-right: 5px;
margin-right:10px;
}
</style>

View File

@@ -61,7 +61,7 @@ const dictData = useDictData()
const { push, options, currentRoute } = useRouter()
const TableHeaderRef = ref()
const tableRef = ref()
const areaOptionList = dictData.getBasicData('jibei_area')
const areaOptionList = dictData.getBasicData('jibei_area').filter(item => !(item.name == '超高压' || item.name == '风光储'))
const statusSelect = dictData.statusSelect()
const addRef = ref()
const AuditRef = ref()

View File

@@ -104,42 +104,42 @@
{{ detailData.otherRemark }}
</el-descriptions-item>
<el-descriptions-item label="盖章报告" v-if="detailData.factoryInspectionReport">
<el-icon>
<Link />
<el-icon class="elView" v-if="detailData?.factoryInspectionReport.name">
<View @click="openFile(detailData?.factoryInspectionReport.name)" />
</el-icon>
<a :href="detailData?.factoryInspectionReport.url">
{{ detailData?.factoryInspectionReport.name }}
</a>
</el-descriptions-item>
<el-descriptions-item label="佐证材料" v-if="detailData?.informationSecurityTestReport">
<el-icon>
<Link />
<el-icon class="elView" v-if="detailData?.informationSecurityTestReport.name">
<View @click="openFile(detailData?.informationSecurityTestReport.name)" />
</el-icon>
<a :href="detailData?.informationSecurityTestReport.url">
{{ detailData?.informationSecurityTestReport.name }}
</a>
</el-descriptions-item>
<el-descriptions-item label="计划变更材料" v-if="detailData?.otherAttachments">
<el-icon>
<Link />
<el-icon class="elView" v-if="detailData?.otherAttachments.name">
<View @click="openFile(detailData?.otherAttachments.name)" />
</el-icon>
<a :href="detailData?.otherAttachments.url">{{ detailData?.otherAttachments.name }}</a>
</el-descriptions-item>
<el-descriptions-item label="告预警单材料" v-if="detailData?.performanceTestReport">
<el-icon>
<Link />
<el-icon class="elView" v-if="detailData?.performanceTestReport.name">
<View @click="openFile(detailData?.performanceTestReport.name)" />
</el-icon>
<a :href="detailData?.performanceTestReport.url">{{ detailData?.performanceTestReport.name }}</a>
</el-descriptions-item>
<el-descriptions-item label="告预警单反馈材料" v-if="detailData?.typeExperimentReport">
<el-icon>
<Link />
<el-icon class="elView" v-if="detailData?.typeExperimentReport.name">
<View @click="openFile(detailData?.typeExperimentReport.name)" />
</el-icon>
<a :href="detailData?.typeExperimentReport.url">{{ detailData?.typeExperimentReport.name }}</a>
</el-descriptions-item>
<el-descriptions-item label="评估报告" v-if="detailData?.performanceTestReport">
<el-icon>
<Link />
<el-icon class="elView" v-if="detailData?.performanceTestReport.name">
<View @click="openFile(detailData?.performanceTestReport.name)" />
</el-icon>
<a :href="detailData?.performanceTestReport.url">{{ detailData?.performanceTestReport.name }}</a>
</el-descriptions-item>
@@ -153,14 +153,14 @@ import { propTypes } from '@/utils/propTypes'
import { useDictData } from '@/stores/dictData'
import { getFileNameAndFilePath } from '@/api/system-boot/file'
import { getUserByDeptId, getPlanDetailsById } from '@/api/supervision-boot/plan/index'
import { Link } from '@element-plus/icons-vue'
import { Link, View } from '@element-plus/icons-vue'
import { useAdminInfo } from '@/stores/adminInfo'
defineOptions({ name: 'BpmUserReportDetail' })
const { query } = useRoute() // 查询参数
const props = defineProps({
id: propTypes.string.def(undefined)
})
console.log(propTypes.string.def(undefined),"999999999999传参");
console.log(propTypes.string.def(undefined), '999999999999传参')
const detailLoading = ref(false) // 表单的加载中
const detailData = ref<any>({}) // 详情数据
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
@@ -199,7 +199,7 @@ getEffectUserList()
/** 获得数据 */
const getInfo = async () => {
detailLoading.value = true
console.log(props.id , queryId ,"流程详情内部的id");
console.log(props.id, queryId, '流程详情内部的id')
try {
await getPlanDetailsById({ id: props.id || queryId }).then(res => {
detailData.value = res.data
@@ -287,6 +287,10 @@ const getFileNamePath = async (val: any, pathName: any) => {
}
})
}
const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?' + name)
}
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
/** 初始化 **/
onMounted(() => {
@@ -299,8 +303,12 @@ onMounted(() => {
overflow: auto;
}
::v-deep.el-icon svg {
margin: 5px !important;
position: absolute !important;
top: 20px !important;
// margin: 5px !important;
// position: absolute !important;
// top: 20px !important;
}
.elView {
cursor: pointer;
margin-right: 10px;
}
</style>

View File

@@ -106,6 +106,6 @@ onMounted(() => {
<style lang="scss" scoped>
.elView {
cursor: pointer;
margin-right: 5px;
margin-right: 10px;
}
</style>

View File

@@ -230,6 +230,6 @@ const uploadFileName = val => {
}
.elView {
cursor: pointer;
margin-right: 5px;
margin-right: 10px;
}
</style>

View File

@@ -118,6 +118,6 @@ onMounted(() => {
<style lang="scss" scoped>
.elView {
cursor: pointer;
margin-right: 5px;
margin-right: 10px;
}
</style>

View File

@@ -59,8 +59,12 @@ onMounted(() => {
}
::v-deep.el-icon svg {
margin: 5px !important;
position: absolute !important;
top: 20px !important;
// margin: 5px !important;
// position: absolute !important;
// top: 20px !important;
}
.elView {
cursor: pointer;
margin-right: 10px;
}
</style>

View File

@@ -246,7 +246,6 @@
<el-form-item for="-" label="干扰源类型:" prop="loadType">
<el-select
v-model="form.loadType"
clearable
style="width: 100%"
placeholder="请选择干扰源类型"
@change="changeLoadType"
@@ -260,7 +259,7 @@
</el-select>
</el-form-item>
<el-form-item for="-" label="干扰源类别:" prop="businessType">
<el-select v-model="form.businessType" clearable style="width: 100%" placeholder="请选择干扰源类别">
<el-select v-model="form.businessType" style="width: 100%" placeholder="请选择干扰源类别">
<el-option
v-for="item in businessTypeList"
:key="item.id"
@@ -370,7 +369,7 @@ import { getDeviceList } from '@/api/supervision-boot/terminal/index'
import { addMointorPointFormData, getList, updateMointorPointFormData } from '@/api/supervision-boot/monitorpoint/index'
import { queryByAllCode } from '@/api/system-boot/dictTree'
import { getUserReportById } from '@/api/supervision-boot/userReport/form'
import { object } from 'vue-types'
import { getDictTreeById } from '@/api/system-boot/dictTree'
const emits = defineEmits(['onSubmit'])
const dictData = useDictData()
const dialogFormVisible = ref(false)
@@ -583,8 +582,7 @@ const resetForm = () => {
ptType: ptTypeList[0].id, //接线方式
num: numList[0].id //线路号
}
let obj = {}
getList(obj).then(res => {
getList({}).then(res => {
projectList.value = res.data
userNameList.value = res.data
//初始化
@@ -599,10 +597,11 @@ const resetForm = () => {
orgId: obj?.orgId,
orgName: obj?.orgName,
expectedProductionDate: obj?.expectedProductionDate,
userName: userNameList.value[0]?.projectName,
userName: userNameList.value[0]?.id,
userId: userNameList.value[0]?.id,
objName: userNameList.value[0]?.projectName
}
changeUserName()
}
})
changevoltageDeviationLimit()
@@ -662,15 +661,16 @@ getTreeList()
const changeLoadType = async () => {
businessTypeList.value = loadTypeList.value.find(item => {
return item.id == form.value.loadType
}).children
form.value.businessType = businessTypeList.value[0]?.id
})?.children
// form.value.businessType = businessTypeList.value[0]?.id
}
//选择关联干扰源回显数据
const changeUserName = () => {
let obj: any = projectList.value.find((item: any) => {
return form.value.userName == item.id
})
console.log(obj, '88888888')
// console.log('🚀 ~ letobj:any=projectList.value.find ~ projectList.value.find:', projectList.value)
// console.log(obj, '88888888')
form.value = {
...form.value,
city: obj?.city,
@@ -689,7 +689,7 @@ const changeUserName = () => {
//回显数据
if (obj.userType == '2' || obj.userType == '3' || obj.userType == '4' || obj.userType == '5') {
getUserReportById(obj.id).then(res => {
console.log(res.data, '继续查询数据')
// console.log(res.data, '继续查询数据')
const obj = res.data
form.value = {
...form.value,
@@ -698,7 +698,47 @@ const changeUserName = () => {
devCapacity: obj.userReportSubstationPO?.pccEquipmentCapacity, //终端容量
standardCapacity: obj.userReportSubstationPO?.baseShortCircuitCapacity //基准容量
}
getDictTree(obj.userReportSubstationPO?.nonlinearLoadType)
})
} else if (obj.userType == '0' || obj.userType == '1') {
getUserReportById(obj.id).then(res => {
// console.log(res.data, '继续查询数据')
const obj = res.data
form.value = {
...form.value,
shortCapacity: 0, // 短路容量
dealCapacity: obj.userReportProjectPO?.agreementCapacity, //协议容量
devCapacity: 0, //终端容量
standardCapacity: 0 //基准容量
}
getDictTree(obj.userReportProjectPO?.nonlinearDeviceType)
})
} else if (obj.userType == '6') {
getUserReportById(obj.id).then(res => {
// console.log(res.data, '继续查询数据')
const obj = res.data
form.value = {
...form.value,
shortCapacity: 0, // 短路容量
dealCapacity: 0, //协议容量
devCapacity: 0, //终端容量
standardCapacity: 0 //基准容量
}
getDictTree()
})
}
}
const getDictTree = (e?: string) => {
if (e) {
getDictTreeById(e).then(res => {
form.value.loadType = res.data.pids.split(',')[1] || ''
form.value.businessType = res.data.pids.split(',')[2] || ''
changeLoadType()
})
} else {
form.value.businessType = ''
form.value.loadType = ''
businessTypeList.value = []
}
}
//定义校验规则
@@ -918,16 +958,17 @@ const rules = ref({
})
const resendId = ref('')
const rowValue: any = ref({})
const open = (row: any) => {
const open = async (row: any) => {
resetForm()
dialogFormVisible.value = true
title.value = row.title
//初始化数据
resetForm()
nextTick(() => {
nextTick(async () => {
if (row.row) {
resendId.value = row.row.id
rowValue.value = row.row
getTempLineDetailsById({ id: row.row.id }).then(res => {
await getTempLineDetailsById({ id: row.row.id }).then(res => {
form.value = res.data
form.value.loadType = loadTypeList.value.filter((item: any) => item.name == res.data.loadType)[0]?.id
form.value.businessType = businessTypeList.value.filter(
@@ -955,9 +996,7 @@ const close = () => {
emits('onSubmit')
resetForm()
}
onMounted(() => {
console.log()
})
onMounted(() => {})
watch(
() => projectList.value,
@@ -966,7 +1005,7 @@ watch(
let obj: any = projectList.value.find((item: any) => {
return rowValue.value.createBy == item.createBy
})
console.log(projectList.value, '000000', obj, rowValue.value.createBy)
// console.log(projectList.value, '000000', obj, rowValue.value.createBy)
form.value = {
...form.value,
reporter: obj?.reporter,
@@ -994,7 +1033,7 @@ const uploadFileName = val => {
}
//移除文件上传
const removeFile = (file: any, uploadFiles: any) => {
console.log(file, uploadFiles)
// console.log(file, uploadFiles)
}
//监测点台账信息
const lineFilePath = ref('')
@@ -1059,7 +1098,7 @@ const confirmForm = () => {
})
} else {
confirmFormData.id = resendId.value
console.log(confirmFormData, '99999999999')
// console.log(confirmFormData, '99999999999')
updateMointorPointFormData(confirmFormData).then(res => {
if (res.code == 'A0000') {
ElMessage({
@@ -1073,7 +1112,7 @@ const confirmForm = () => {
})
}
} else {
console.log('表单验证失败')
// // console.log('表单验证失败')
return false
}
})

View File

@@ -265,12 +265,12 @@ onMounted(() => {
}
::v-deep.el-icon svg {
margin: 5px !important;
position: absolute !important;
top: 20px !important;
// margin: 5px !important;
// position: absolute !important;
// top: 20px !important;
}
.elView {
cursor: pointer;
margin-right: 5px;
margin-right: 10px;
}
</style>

View File

@@ -487,12 +487,12 @@ onMounted(() => {
}
::v-deep.el-icon svg {
margin: 5px !important;
position: absolute !important;
top: 20px !important;
// margin: 5px !important;
// position: absolute !important;
// top: 20px !important;
}
.elView {
cursor: pointer;
margin-right: 5px;
margin-right: 10px;
}
</style>

View File

@@ -68,8 +68,12 @@ onMounted(() => {
}
::v-deep.el-icon svg {
margin: 5px !important;
position: absolute !important;
top: 20px !important;
// margin: 5px !important;
// position: absolute !important;
// top: 20px !important;
}
.elView {
cursor: pointer;
margin-right: 10px;
}
</style>

View File

@@ -1,32 +1,32 @@
<template>
<div class='default-main'>
<ContentWrap>
<!-- 流程设计器负责绘制流程等 -->
<MyProcessDesigner
key='designer'
v-if='xmlString !== undefined'
v-model='xmlString'
:value='xmlString'
v-bind='controlForm'
keyboard
ref='processDesigner'
@init-finished='initModeler'
:additionalModel='controlForm.additionalModel'
@save='save'
/>
<!-- 流程属性器负责编辑每个流程节点的属性 -->
<MyProcessPenal
key='penal'
:bpmnModeler='modeler as any'
:prefix='controlForm.prefix'
class='process-panel'
:model='model'
/>
</ContentWrap>
</div>
<div class="default-main" >
<ContentWrap style="height: calc(100vh - 135px)">
<!-- 流程设计器负责绘制流程等 -->
<MyProcessDesigner
key="designer"
v-if="xmlString !== undefined"
v-model="xmlString"
:value="xmlString"
v-bind="controlForm"
keyboard
ref="processDesigner"
@init-finished="initModeler"
:additionalModel="controlForm.additionalModel"
@save="save"
/>
<!-- 流程属性器负责编辑每个流程节点的属性 -->
<MyProcessPenal
key="penal"
:bpmnModeler="modeler as any"
:prefix="controlForm.prefix"
class="process-panel"
:model="model"
/>
</ContentWrap>
</div>
</template>
<script lang='ts' setup>
<script lang="ts" setup>
import ContentWrap from '@/components/ContentWrap/src/ContentWrap.vue'
import { onMounted, provide, ref } from 'vue'
import { ElMessage } from 'element-plus'
@@ -43,109 +43,107 @@ defineOptions({ name: 'BpmModelEditor' })
const { push, currentRoute, go } = useRouter() // 路由
const { query } = useRoute() // 路由信息
const xmlString = ref(undefined) // BPMN XML
const modeler = ref(null) // BPMN Modeler
const controlForm = ref({
simulation: true,
labelEditing: false,
labelVisible: false,
prefix: 'flowable',
headerButtonSize: 'mini',
additionalModel: [CustomContentPadProvider, CustomPaletteProvider]
simulation: true,
labelEditing: false,
labelVisible: false,
prefix: 'flowable',
headerButtonSize: 'mini',
additionalModel: [CustomContentPadProvider, CustomPaletteProvider]
})
type ProcessDefinitionVO = {
id: string
version: number
deploymentTIme: string
suspensionState: number
id: string
version: number
deploymentTIme: string
suspensionState: number
}
type ModelVO = {
id: number
formName: string
key: string
name: string
description: string
category: string
formType: number
formId: number
formCustomCreatePath: string
formCustomViewPath: string
processDefinition: ProcessDefinitionVO
status: number
remark: string
createTime: string
bpmnXml: string
id: number
formName: string
key: string
name: string
description: string
category: string
formType: number
formId: number
formCustomCreatePath: string
formCustomViewPath: string
processDefinition: ProcessDefinitionVO
status: number
remark: string
createTime: string
bpmnXml: string
}
const model = ref<ModelVO>() // 流程模型的信息
/** 初始化 modeler */
const initModeler = (item: any) => {
setTimeout(() => {
modeler.value = item
}, 10)
setTimeout(() => {
modeler.value = item
}, 10)
}
/** 添加/修改模型 */
const save = async (bpmnXml: any) => {
const data = {
...model.value,
bpmnXml: bpmnXml // bpmnXml 只是初始化流程图,后续修改无法通过它获得
} as unknown as ModelVO
// 提交
if (data.id) {
await updateModel(data)
ElMessage.success('修改成功')
} else {
await addModel(data)
ElMessage.success('新增成功')
}
// 跳转回去
go(-1)
const data = {
...model.value,
bpmnXml: bpmnXml // bpmnXml 只是初始化流程图,后续修改无法通过它获得
} as unknown as ModelVO
// 提交
if (data.id) {
await updateModel(data)
ElMessage.success('修改成功')
} else {
await addModel(data)
ElMessage.success('新增成功')
}
// 跳转回去
go(-1)
}
/** 初始化 */
onMounted(async () => {
const modelId = query.modelId as unknown as string
if (!modelId) {
ElMessage.error('缺少模型 modelId 编号')
return
}
// 查询模型
let data = {
bpmnXml: '',
key: '',
name: ''
}
await getById(modelId).then(res => {
data = res.data
})
if (!data.bpmnXml) {
// 首次创建的 Model 模型,它是没有 bpmnXml此时需要给它一个默认的
data.bpmnXml = ` <?xml version="1.0" encoding="UTF-8"?>
const modelId = query.modelId as unknown as string
if (!modelId) {
ElMessage.error('缺少模型 modelId 编号')
return
}
// 查询模型
let data = {
bpmnXml: '',
key: '',
name: ''
}
await getById(modelId).then(res => {
data = res.data
})
if (!data.bpmnXml) {
// 首次创建的 Model 模型,它是没有 bpmnXml此时需要给它一个默认的
data.bpmnXml = ` <?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.activiti.org/processdef">
<process id="${data.key}" name="${data.name}" isExecutable="true" />
<bpmndi:BPMNDiagram id="BPMNDiagram">
<bpmndi:BPMNPlane id="${data.key}_di" bpmnElement="${data.key}" />
</bpmndi:BPMNDiagram>
</definitions>`
}
model.value = {
...data,
bpmnXml: undefined // 清空 bpmnXml 属性
}
xmlString.value = data.bpmnXml
}
model.value = {
...data,
bpmnXml: undefined // 清空 bpmnXml 属性
}
xmlString.value = data.bpmnXml
})
</script>
<style lang='scss'>
<style lang="scss">
.process-panel__container {
position: absolute;
top: 190px;
right: 20px;
position: absolute;
top: 62px;
right: 20px;
background-color: #fff;
}
</style>