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