修改监测列表页面
This commit is contained in:
@@ -62,7 +62,7 @@ import OverLimitDetails from '@/components/cockpit/monitoringPointList/component
|
|||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { uploadReport, getReportUrl } from '@/api/harmonic-boot/cockpit/cockpit'
|
import { uploadReport, getReportUrl } from '@/api/harmonic-boot/cockpit/cockpit'
|
||||||
import { getTime } from '@/utils/formatTime'
|
import { getTime } from '@/utils/formatTime'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
const prop = defineProps({
|
const prop = defineProps({
|
||||||
w: { type: [String, Number] },
|
w: { type: [String, Number] },
|
||||||
h: { type: [String, Number] },
|
h: { type: [String, Number] },
|
||||||
@@ -72,7 +72,8 @@ const prop = defineProps({
|
|||||||
timeValue: { type: Object },
|
timeValue: { type: Object },
|
||||||
interval: { type: Number }
|
interval: { type: Number }
|
||||||
})
|
})
|
||||||
|
const dictData = useDictData()
|
||||||
|
const monitorObjList = dictData.getBasicData('Line_Position')
|
||||||
const headerHeight = ref(57)
|
const headerHeight = ref(57)
|
||||||
|
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
@@ -122,19 +123,19 @@ const tableStore: any = new TableStore({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '监测点名称',
|
title: '监测点名称',
|
||||||
field: 'lineName',
|
field: 'name',
|
||||||
minWidth: '120',
|
minWidth: '120',
|
||||||
render: 'customTemplate',
|
render: 'customTemplate',
|
||||||
customTemplate: (row: any) => {
|
customTemplate: (row: any) => {
|
||||||
return `<span style='cursor: pointer;text-decoration: underline;'>${row.lineName}</span>`
|
return `<span style='cursor: pointer;text-decoration: underline;'>${row.name}</span>`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '监测类型',
|
title: '监测位置',
|
||||||
field: 'position',
|
field: 'position',
|
||||||
minWidth: '80',
|
minWidth: '80',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue || '/'
|
return monitorObjList.filter(item => item.id == row.cellValue)[0]?.name || '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
@@ -153,21 +154,19 @@ const tableStore: any = new TableStore({
|
|||||||
|
|
||||||
width: 100,
|
width: 100,
|
||||||
custom: {
|
custom: {
|
||||||
停运: 'danger',
|
0: 'success',
|
||||||
退运: 'danger',
|
1: 'warning',
|
||||||
运行: 'success',
|
2: 'danger',
|
||||||
中断: 'warning',
|
3: 'warning',
|
||||||
检修: 'warning',
|
4: 'danger',
|
||||||
调试: 'warning',
|
|
||||||
null: 'info'
|
null: 'info'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
运行: '运行',
|
0: '运行',
|
||||||
退运: '退运',
|
1: '检修',
|
||||||
停运: '停运',
|
2: '停运',
|
||||||
中断: '中断',
|
3: '调试',
|
||||||
检修: '检修',
|
4: '退运',
|
||||||
调试: '调试',
|
|
||||||
null: '/'
|
null: '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -183,7 +182,10 @@ const tableStore: any = new TableStore({
|
|||||||
{
|
{
|
||||||
title: '电压等级',
|
title: '电压等级',
|
||||||
field: 'volGrade',
|
field: 'volGrade',
|
||||||
minWidth: '80'
|
minWidth: '80',
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return row.cellValue || '/'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '是否治理',
|
title: '是否治理',
|
||||||
@@ -311,7 +313,7 @@ const setTime = () => {
|
|||||||
|
|
||||||
// 点击行
|
// 点击行
|
||||||
const cellClickEvent = ({ row, column }: any) => {
|
const cellClickEvent = ({ row, column }: any) => {
|
||||||
if (column.field == 'lineName') {
|
if (column.field == 'name') {
|
||||||
OverLimitDetailsRef.value.open(
|
OverLimitDetailsRef.value.open(
|
||||||
row,
|
row,
|
||||||
tableStore.table.params.searchBeginTime || prop.timeValue?.[0],
|
tableStore.table.params.searchBeginTime || prop.timeValue?.[0],
|
||||||
|
|||||||
@@ -165,7 +165,8 @@
|
|||||||
prop="engineeringParam.name"
|
prop="engineeringParam.name"
|
||||||
:rules="{ required: true, message: '请输入工程名称', trigger: 'blur' }"
|
:rules="{ required: true, message: '请输入工程名称', trigger: 'blur' }"
|
||||||
>
|
>
|
||||||
<el-input clearable
|
<el-input
|
||||||
|
clearable
|
||||||
v-model="formData.engineeringParam.name"
|
v-model="formData.engineeringParam.name"
|
||||||
placeholder="请输入工程名称"
|
placeholder="请输入工程名称"
|
||||||
:disabled="
|
:disabled="
|
||||||
@@ -180,7 +181,8 @@
|
|||||||
prop="engineeringParam.description"
|
prop="engineeringParam.description"
|
||||||
v-if="nodeLevel > 0 || pageStatus == 2"
|
v-if="nodeLevel > 0 || pageStatus == 2"
|
||||||
>
|
>
|
||||||
<el-input clearable
|
<el-input
|
||||||
|
clearable
|
||||||
v-model="formData.engineeringParam.description"
|
v-model="formData.engineeringParam.description"
|
||||||
placeholder="请输入描述"
|
placeholder="请输入描述"
|
||||||
:disabled="
|
:disabled="
|
||||||
@@ -213,7 +215,8 @@
|
|||||||
{ required: true, message: '请输入项目名称', trigger: 'blur' }
|
{ required: true, message: '请输入项目名称', trigger: 'blur' }
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<el-input clearable
|
<el-input
|
||||||
|
clearable
|
||||||
v-model="item.name"
|
v-model="item.name"
|
||||||
placeholder="请输入项目名称"
|
placeholder="请输入项目名称"
|
||||||
:disabled="
|
:disabled="
|
||||||
@@ -231,7 +234,8 @@
|
|||||||
:prop="'projectInfoList[' + index + '].area'"
|
:prop="'projectInfoList[' + index + '].area'"
|
||||||
:rules="[{ required: true, message: '请输入地市', trigger: 'blur' }]"
|
:rules="[{ required: true, message: '请输入地市', trigger: 'blur' }]"
|
||||||
>
|
>
|
||||||
<el-input clearable
|
<el-input
|
||||||
|
clearable
|
||||||
v-model="item.area"
|
v-model="item.area"
|
||||||
placeholder="请输入地市"
|
placeholder="请输入地市"
|
||||||
:disabled="
|
:disabled="
|
||||||
@@ -249,7 +253,8 @@
|
|||||||
:prop="'projectInfoList[' + index + '].description'"
|
:prop="'projectInfoList[' + index + '].description'"
|
||||||
:rules="[{ required: true, message: '请输入描述', trigger: 'blur' }]"
|
:rules="[{ required: true, message: '请输入描述', trigger: 'blur' }]"
|
||||||
>
|
>
|
||||||
<el-input clearable
|
<el-input
|
||||||
|
clearable
|
||||||
v-model="item.description"
|
v-model="item.description"
|
||||||
placeholder="请输入描述"
|
placeholder="请输入描述"
|
||||||
:disabled="
|
:disabled="
|
||||||
@@ -294,7 +299,8 @@
|
|||||||
{ required: true, message: '请输入装置名称', trigger: 'blur' }
|
{ required: true, message: '请输入装置名称', trigger: 'blur' }
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<el-input clearable
|
<el-input
|
||||||
|
clearable
|
||||||
v-model="busItem.name"
|
v-model="busItem.name"
|
||||||
placeholder="请输入装置名称"
|
placeholder="请输入装置名称"
|
||||||
:disabled="
|
:disabled="
|
||||||
@@ -427,7 +433,8 @@
|
|||||||
label="合同号:"
|
label="合同号:"
|
||||||
:prop="'deviceInfoList[' + bIndex + '].cntractNo'"
|
:prop="'deviceInfoList[' + bIndex + '].cntractNo'"
|
||||||
>
|
>
|
||||||
<el-input clearable
|
<el-input
|
||||||
|
clearable
|
||||||
v-model="busItem.cntractNo"
|
v-model="busItem.cntractNo"
|
||||||
placeholder="请输入合同号"
|
placeholder="请输入合同号"
|
||||||
:disabled="
|
:disabled="
|
||||||
@@ -467,7 +474,8 @@
|
|||||||
label="进程号:"
|
label="进程号:"
|
||||||
:prop="'deviceInfoList[' + bIndex + '].nodeProcess'"
|
:prop="'deviceInfoList[' + bIndex + '].nodeProcess'"
|
||||||
>
|
>
|
||||||
<el-input clearable
|
<el-input
|
||||||
|
clearable
|
||||||
v-model="busItem.nodeProcess"
|
v-model="busItem.nodeProcess"
|
||||||
placeholder="自动分配"
|
placeholder="自动分配"
|
||||||
:disabled="true"
|
:disabled="true"
|
||||||
@@ -480,7 +488,8 @@
|
|||||||
:prop="'deviceInfoList[' + bIndex + '].sort'"
|
:prop="'deviceInfoList[' + bIndex + '].sort'"
|
||||||
:rules="[{ required: true, message: '请输入排序', trigger: 'blur' }]"
|
:rules="[{ required: true, message: '请输入排序', trigger: 'blur' }]"
|
||||||
>
|
>
|
||||||
<el-input clearable
|
<el-input
|
||||||
|
clearable
|
||||||
v-model="busItem.sort"
|
v-model="busItem.sort"
|
||||||
placeholder="请输入排序"
|
placeholder="请输入排序"
|
||||||
:disabled="
|
:disabled="
|
||||||
@@ -527,7 +536,8 @@
|
|||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<el-input clearable
|
<el-input
|
||||||
|
clearable
|
||||||
v-model="lineItem.name"
|
v-model="lineItem.name"
|
||||||
placeholder="请输入监测点名称"
|
placeholder="请输入监测点名称"
|
||||||
:disabled="
|
:disabled="
|
||||||
@@ -631,7 +641,8 @@
|
|||||||
:rules="{ required: true, message: '请输入pt', trigger: 'blur' }"
|
:rules="{ required: true, message: '请输入pt', trigger: 'blur' }"
|
||||||
>
|
>
|
||||||
<div style="width: 100%; display: flex; justify-content: space-between">
|
<div style="width: 100%; display: flex; justify-content: space-between">
|
||||||
<el-input clearable-number
|
<el-input
|
||||||
|
clearable-number
|
||||||
:controls="false"
|
:controls="false"
|
||||||
:min="1"
|
:min="1"
|
||||||
style="width: 48%"
|
style="width: 48%"
|
||||||
@@ -654,7 +665,8 @@
|
|||||||
>
|
>
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
<el-input clearable-number
|
<el-input
|
||||||
|
clearable-number
|
||||||
:controls="false"
|
:controls="false"
|
||||||
:min="1"
|
:min="1"
|
||||||
style="width: 48%"
|
style="width: 48%"
|
||||||
@@ -677,7 +689,8 @@
|
|||||||
:rules="{ required: true, message: '请输入ct', trigger: 'blur' }"
|
:rules="{ required: true, message: '请输入ct', trigger: 'blur' }"
|
||||||
>
|
>
|
||||||
<div style="width: 100%; display: flex; justify-content: space-between">
|
<div style="width: 100%; display: flex; justify-content: space-between">
|
||||||
<el-input clearable-number
|
<el-input
|
||||||
|
clearable-number
|
||||||
:controls="false"
|
:controls="false"
|
||||||
:min="1"
|
:min="1"
|
||||||
style="width: 48%"
|
style="width: 48%"
|
||||||
@@ -700,7 +713,8 @@
|
|||||||
>
|
>
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
<el-input clearable-number
|
<el-input
|
||||||
|
clearable-number
|
||||||
:controls="false"
|
:controls="false"
|
||||||
:min="1"
|
:min="1"
|
||||||
style="width: 48%"
|
style="width: 48%"
|
||||||
@@ -723,7 +737,8 @@
|
|||||||
:prop="'lineInfoList[' + lIndex + '].basicCapacity'"
|
:prop="'lineInfoList[' + lIndex + '].basicCapacity'"
|
||||||
:rules="{ required: true, message: '请输入基准容量', trigger: 'blur' }"
|
:rules="{ required: true, message: '请输入基准容量', trigger: 'blur' }"
|
||||||
>
|
>
|
||||||
<el-input clearable-number
|
<el-input
|
||||||
|
clearable-number
|
||||||
:controls="false"
|
:controls="false"
|
||||||
:min="0"
|
:min="0"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@@ -744,7 +759,8 @@
|
|||||||
:prop="'lineInfoList[' + lIndex + '].shortCircuitCapacity'"
|
:prop="'lineInfoList[' + lIndex + '].shortCircuitCapacity'"
|
||||||
:rules="{ required: true, message: '请输入短路容量', trigger: 'blur' }"
|
:rules="{ required: true, message: '请输入短路容量', trigger: 'blur' }"
|
||||||
>
|
>
|
||||||
<el-input clearable-number
|
<el-input
|
||||||
|
clearable-number
|
||||||
:controls="false"
|
:controls="false"
|
||||||
:min="0"
|
:min="0"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@@ -765,7 +781,8 @@
|
|||||||
:prop="'lineInfoList[' + lIndex + '].devCapacity'"
|
:prop="'lineInfoList[' + lIndex + '].devCapacity'"
|
||||||
:rules="{ required: true, message: '请输入设备容量', trigger: 'blur' }"
|
:rules="{ required: true, message: '请输入设备容量', trigger: 'blur' }"
|
||||||
>
|
>
|
||||||
<el-input clearable-number
|
<el-input
|
||||||
|
clearable-number
|
||||||
:controls="false"
|
:controls="false"
|
||||||
:min="0"
|
:min="0"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@@ -786,7 +803,8 @@
|
|||||||
:prop="'lineInfoList[' + lIndex + '].protocolCapacity'"
|
:prop="'lineInfoList[' + lIndex + '].protocolCapacity'"
|
||||||
:rules="{ required: true, message: '请输入协议容量', trigger: 'blur' }"
|
:rules="{ required: true, message: '请输入协议容量', trigger: 'blur' }"
|
||||||
>
|
>
|
||||||
<el-input clearable-number
|
<el-input
|
||||||
|
clearable-number
|
||||||
:controls="false"
|
:controls="false"
|
||||||
:min="0"
|
:min="0"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@@ -1087,8 +1105,8 @@ const devId: any = ref('0')
|
|||||||
const busBarId: any = ref('0')
|
const busBarId: any = ref('0')
|
||||||
const lineId: any = ref('0')
|
const lineId: any = ref('0')
|
||||||
const userList: any = ref([])
|
const userList: any = ref([])
|
||||||
const monitorObjList: any = ref([])
|
const monitorObjList: any = dictData.getBasicData('M_Obj_Types')
|
||||||
const linePosition: any = ref([])
|
const linePosition: any = dictData.getBasicData('Line_Position')
|
||||||
|
|
||||||
const currentGdName: any = ref('')
|
const currentGdName: any = ref('')
|
||||||
const affiliatiedFrontArr: any = ref([])
|
const affiliatiedFrontArr: any = ref([])
|
||||||
@@ -2809,7 +2827,7 @@ const reaseStatus = () => {
|
|||||||
currentGdName.value = ''
|
currentGdName.value = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
const area = () => {
|
const area = async () => {
|
||||||
nodeAllList()
|
nodeAllList()
|
||||||
.then(res => {
|
.then(res => {
|
||||||
affiliatiedFrontArr.value = res.data
|
affiliatiedFrontArr.value = res.data
|
||||||
@@ -2839,12 +2857,6 @@ const area = () => {
|
|||||||
getListByIds().then(res => {
|
getListByIds().then(res => {
|
||||||
userList.value = res.data
|
userList.value = res.data
|
||||||
})
|
})
|
||||||
getDicDataByTypeCode({ dictTypeCode: 'M_Obj_Types' }).then(res => {
|
|
||||||
monitorObjList.value = res.data
|
|
||||||
})
|
|
||||||
getDicDataByTypeCode({ dictTypeCode: 'Line_Position' }).then(res => {
|
|
||||||
linePosition.value = res.data
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@@ -2906,7 +2918,7 @@ area()
|
|||||||
|
|
||||||
.el-form-item {
|
.el-form-item {
|
||||||
width: 30%;
|
width: 30%;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px !important;
|
||||||
|
|
||||||
.el-select {
|
.el-select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -41,15 +41,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目排序:" prop="orderBy">
|
<el-form-item label="项目排序:" prop="orderBy">
|
||||||
<el-input
|
<el-input maxlength="32" show-word-limit-number v-model.number="form.orderBy" style="width: 100%" />
|
||||||
maxlength="32"
|
|
||||||
show-word-limit-number
|
|
||||||
v-model.trim="form.orderBy"
|
|
||||||
:min="0"
|
|
||||||
:step="1"
|
|
||||||
step-strictly
|
|
||||||
style="width: 100%"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="备注:" class="top">
|
<el-form-item label="备注:" class="top">
|
||||||
@@ -78,7 +70,7 @@ import { deviceTree, add, audit, getztProjectTree } from '@/api/cs-harmonic-boot
|
|||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const hasAdmin = adminInfo.roleCode.some(item => item.includes('operation_manager')|| item.includes('root'))
|
const hasAdmin = adminInfo.roleCode.some(item => item.includes('operation_manager') || item.includes('root'))
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const Engineering = ref([])
|
const Engineering = ref([])
|
||||||
@@ -95,7 +87,7 @@ const form: any = reactive({
|
|||||||
name: '',
|
name: '',
|
||||||
projectIds: [],
|
projectIds: [],
|
||||||
scope: 1,
|
scope: 1,
|
||||||
orderBy: '100',
|
orderBy: 100,
|
||||||
remark: ''
|
remark: ''
|
||||||
})
|
})
|
||||||
const rules = {
|
const rules = {
|
||||||
@@ -117,11 +109,13 @@ const addFn = () => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
audit({ ...form, projectIds: form.scope == 1 ? ['WIRELESS_PROJECT_ID'] : form.projectIds }).then((res: any) => {
|
audit({ ...form, projectIds: form.scope == 1 ? ['WIRELESS_PROJECT_ID'] : form.projectIds }).then(
|
||||||
ElMessage.success('修改项目成功!')
|
(res: any) => {
|
||||||
dialogVisible.value = false
|
ElMessage.success('修改项目成功!')
|
||||||
emit('submit')
|
dialogVisible.value = false
|
||||||
})
|
emit('submit')
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -201,13 +195,14 @@ const open = ref((row: any) => {
|
|||||||
if (row.title == '新增项目') {
|
if (row.title == '新增项目') {
|
||||||
form.name = ''
|
form.name = ''
|
||||||
form.projectIds = []
|
form.projectIds = []
|
||||||
form.orderBy = '100'
|
form.orderBy = 100
|
||||||
form.remark = ''
|
form.remark = ''
|
||||||
} else {
|
} else {
|
||||||
for (let key in form) {
|
for (let key in form) {
|
||||||
form[key] = row.row[key] || ''
|
form[key] = row.row[key] || ''
|
||||||
}
|
}
|
||||||
form.id = row.row.id
|
form.id = row.row.id
|
||||||
|
form.orderBy = row.row.orderBy - 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const removeData = arr => {
|
const removeData = arr => {
|
||||||
|
|||||||
Reference in New Issue
Block a user