联调 辽宁台账维护 页面 修改 冀北 bug
This commit is contained in:
10
src/api/device-boot/newEnergy.ts
Normal file
10
src/api/device-boot/newEnergy.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 新能源场站高低电压穿越信息更新
|
||||||
|
export function editNewStation(data: any) {
|
||||||
|
return request({ url: '/device-boot/newStation/editNewStation', method: 'post', data })
|
||||||
|
}
|
||||||
|
// 新能源场站高低电压穿越信息删除
|
||||||
|
export function delNewStation(data: any) {
|
||||||
|
return request({ url: '/device-boot/newStation/delNewStation', method: 'delete', params: data })
|
||||||
|
}
|
||||||
@@ -86,3 +86,11 @@ export const cancel = (data: any) => {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 根据id获取用户档案录入的详细数据
|
||||||
|
export const getByDeptDevLine = (params: any) => {
|
||||||
|
return createAxios({
|
||||||
|
url: '/device-boot/line/getByDeptDevLine',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -47,6 +47,16 @@ export const downloadSensitiveUserTemplate = () => {
|
|||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 下载敏感及重要用户模板
|
||||||
|
*/
|
||||||
|
export const downloadDevTemplate = () => {
|
||||||
|
return createAxios({
|
||||||
|
url: SUPERVISION_BOOT + '/deVReport/downloadDevTemplate',
|
||||||
|
method: 'GET',
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 下载干扰源用户台账模板
|
* 下载干扰源用户台账模板
|
||||||
*/
|
*/
|
||||||
@@ -81,6 +91,17 @@ export const importSensitiveReportData = (data: any) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量导入终端台账入网
|
||||||
|
*/
|
||||||
|
export const deVReportImportSensitive = (data: any) => {
|
||||||
|
return createAxios({
|
||||||
|
url: SUPERVISION_BOOT + '/deVReport/importSensitiveUserData',
|
||||||
|
method: 'POST',
|
||||||
|
data: data,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import { log } from 'console'
|
|||||||
* @param to — 导航位置,同 router.push
|
* @param to — 导航位置,同 router.push
|
||||||
*/
|
*/
|
||||||
export const routePush = async (to: RouteLocationRaw) => {
|
export const routePush = async (to: RouteLocationRaw) => {
|
||||||
|
console.log("🚀 ~ routePush ~ to:", to)
|
||||||
try {
|
try {
|
||||||
const failure = await router.push(to)
|
const failure = await router.push(to)
|
||||||
if (isNavigationFailure(failure, NavigationFailureType.aborted)) {
|
if (isNavigationFailure(failure, NavigationFailureType.aborted)) {
|
||||||
@@ -48,6 +49,8 @@ export const getFirstRoute = (routes: RouteRecordRaw[], menuType = 'tab'): false
|
|||||||
})
|
})
|
||||||
let find: boolean | RouteRecordRaw = false
|
let find: boolean | RouteRecordRaw = false
|
||||||
for (const key in routes) {
|
for (const key in routes) {
|
||||||
|
console.log(`11111111`,routes[key].path);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
routes[key].meta?.type == 'menu' &&
|
routes[key].meta?.type == 'menu' &&
|
||||||
routes[key].meta?.menu_type == menuType &&
|
routes[key].meta?.menu_type == menuType &&
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ import TableStore from '@/utils/tableStore'
|
|||||||
import { ref, onMounted, provide } from 'vue'
|
import { ref, onMounted, provide } from 'vue'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'highAndLowPressure'
|
name: 'newEnergy/highAndLowPressure'
|
||||||
})
|
})
|
||||||
const EchartMap = ref()
|
const EchartMap = ref()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
@@ -178,7 +178,7 @@ import MyEchart from '@/components/echarts/MyEchart.vue'
|
|||||||
import TimePopUpBox from './components/timePopUpBox.vue'
|
import TimePopUpBox from './components/timePopUpBox.vue'
|
||||||
import detail from './components/detail.vue'
|
import detail from './components/detail.vue'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'newEnergyAnalysis'
|
name: 'newEnergy/newEnergyAnalysis'
|
||||||
})
|
})
|
||||||
const timePopUpBox = ref<anyObj | null>(null)
|
const timePopUpBox = ref<anyObj | null>(null)
|
||||||
const flag = ref('0%~10%')
|
const flag = ref('0%~10%')
|
||||||
144
src/views/LN/newEnergy/newEnergyLedger/components/addForm.vue
Normal file
144
src/views/LN/newEnergy/newEnergyLedger/components/addForm.vue
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 新增 -->
|
||||||
|
<el-dialog draggable :title="title" v-model="userAdd" width="500px" :before-close="cancel">
|
||||||
|
<el-form :inline="true" ref="formRef" :model="addData" label-width="auto" class="form-one" :rules="rules">
|
||||||
|
<el-form-item label="新能源场站名称:" prop="name">
|
||||||
|
<el-input v-model="addData.name" clearable placeholder="请输入新能源场站名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="干扰源类型:" prop="stationType">
|
||||||
|
<el-select v-model="addData.stationType" clearable collapse-tags placeholder="请选择干扰源类型">
|
||||||
|
<el-option v-for="item in newEnergy" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="电压等级:" prop="scale">
|
||||||
|
<el-select v-model="addData.scale" clearable collapse-tags placeholder="请选择干扰源类型">
|
||||||
|
<el-option v-for="item in scaleList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="额定有功功率:" prop="ratedPower">
|
||||||
|
<el-input-number v-model="addData.ratedPower" :min="0" style="width: 100%" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="经度:" prop="longitude">
|
||||||
|
<el-input v-model="addData.longitude" type="text" placeholder="请输入经度" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="纬度:" prop="latitude">
|
||||||
|
<el-input v-model="addData.latitude" type="text" placeholder="请输入纬度" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="cancel">取消</el-button>
|
||||||
|
<el-button type="primary" @click="config">确定</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive } from 'vue'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { editNewStation } from '@/api/device-boot/newEnergy'
|
||||||
|
const dictData = useDictData()
|
||||||
|
const userAdd = ref(false)
|
||||||
|
const title = ref('')
|
||||||
|
const newEnergy = dictData.getBasicData('new_station_type')
|
||||||
|
const scaleList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||||
|
const emit = defineEmits(['onSubmit'])
|
||||||
|
const rules = reactive({
|
||||||
|
stationType: [{ required: true, message: '请选择干扰源类型', trigger: 'change' }],
|
||||||
|
scale: [{ required: true, message: '请选择电压等级', trigger: 'change' }],
|
||||||
|
name: [{ required: true, message: '请输入干扰源用户名称', trigger: 'blur' }],
|
||||||
|
ratedPower: [{ required: true, message: '请输入额定功率', trigger: 'blur' }],
|
||||||
|
longitude: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请输入经度',
|
||||||
|
trigger: 'blur'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
if (!longitudeReg.test(value)) {
|
||||||
|
callback(new Error('请输入有效的经度'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
latitude: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请输入纬度',
|
||||||
|
trigger: 'blur'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
if (!latitudeReg.test(value)) {
|
||||||
|
callback(new Error('请输入有效的纬度'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
// 经度正则表达式
|
||||||
|
const longitudeReg = /^[-+]?((180(\.0{1,10})?)|(1[0-7][0-9](\.\d{1,10})?)|([1-9]?\d(\.\d{1,10})?)|(0(\.\d{1,10})?))$/
|
||||||
|
// 纬度正则表达式
|
||||||
|
const latitudeReg = /^[-+]?((90(\.0{1,10})?)|([1-8]?\d(\.\d{1,10})?)|(0(\.\d{1,10})?))$/
|
||||||
|
|
||||||
|
const addData = ref({
|
||||||
|
scale: '',
|
||||||
|
stationType: '',
|
||||||
|
name: '',
|
||||||
|
ratedPower: 0,
|
||||||
|
longitude: '',
|
||||||
|
latitude: ''
|
||||||
|
})
|
||||||
|
const formRef = ref()
|
||||||
|
// 新增
|
||||||
|
const config = () => {
|
||||||
|
formRef.value.validate((valid: any) => {
|
||||||
|
if (valid) {
|
||||||
|
editNewStation(addData.value).then((res: any) => {
|
||||||
|
ElMessage.success('新增成功!')
|
||||||
|
emit('onSubmit')
|
||||||
|
cancel()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 重置
|
||||||
|
const cancel = () => {
|
||||||
|
// formRef.value.resetFields()
|
||||||
|
userAdd.value = false
|
||||||
|
}
|
||||||
|
const open = (row: any) => {
|
||||||
|
addData.value = {
|
||||||
|
scale: '',
|
||||||
|
stationType: '',
|
||||||
|
name: '',
|
||||||
|
ratedPower: 0,
|
||||||
|
longitude: '',
|
||||||
|
latitude: ''
|
||||||
|
}
|
||||||
|
title.value = row.title
|
||||||
|
if (row.title === '修改') {
|
||||||
|
addData.value = {
|
||||||
|
id: row.row.id,
|
||||||
|
scale: row.row.scale,
|
||||||
|
stationType: row.row.stationType,
|
||||||
|
name: row.row.name,
|
||||||
|
ratedPower: row.row.ratedPower - 0,
|
||||||
|
longitude: row.row.longitude,
|
||||||
|
latitude: row.row.latitude
|
||||||
|
}
|
||||||
|
}
|
||||||
|
userAdd.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({ open })
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
125
src/views/LN/newEnergy/newEnergyLedger/index.vue
Normal file
125
src/views/LN/newEnergy/newEnergyLedger/index.vue
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
<template>
|
||||||
|
<div class="default-main">
|
||||||
|
<TableHeader ref="TableHeaderRef">
|
||||||
|
<template #select>
|
||||||
|
<el-form-item label="新能源场站名称">
|
||||||
|
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="输入关键字筛选" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template #operation>
|
||||||
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||||
|
</template>
|
||||||
|
</TableHeader>
|
||||||
|
<Table ref="tableRef" />
|
||||||
|
<!--弹框-->
|
||||||
|
<addForm ref="addFormRef" @onSubmit="tableStore.index()" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
|
import TableStore from '@/utils/tableStore'
|
||||||
|
import Table from '@/components/table/index.vue'
|
||||||
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
import addForm from './components/addForm.vue'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
|
import { delNewStation } from '@/api/device-boot/newEnergy'
|
||||||
|
|
||||||
|
const dictData = useDictData()
|
||||||
|
//获取登陆用户姓名和部门
|
||||||
|
const adminInfo = useAdminInfo()
|
||||||
|
const newEnergy = dictData.getBasicData('new_station_type')
|
||||||
|
const scaleList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||||
|
const tableRef = ref()
|
||||||
|
const TableHeaderRef = ref()
|
||||||
|
const addFormRef = ref()
|
||||||
|
const tableStore = new TableStore({
|
||||||
|
url: '/device-boot/newStation/queryPage',
|
||||||
|
method: 'POST',
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
type: 'seq',
|
||||||
|
align: 'center',
|
||||||
|
width: 60,
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ field: 'name', title: '新能源场站名称' },
|
||||||
|
{
|
||||||
|
field: 'stationType',
|
||||||
|
title: '新能源场站类型',
|
||||||
|
|
||||||
|
formatter: (row: any) => newEnergy.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'scale',
|
||||||
|
title: '电压等级',
|
||||||
|
|
||||||
|
formatter: (row: any) => scaleList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
|
},
|
||||||
|
{ field: 'ratedPower', title: '额定有功功率' },
|
||||||
|
{ field: 'longitude', title: '经度' },
|
||||||
|
{ field: 'latitude', title: '维度' },
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
render: 'buttons',
|
||||||
|
fixed: 'right',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '修改',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-edit',
|
||||||
|
render: 'basicButton',
|
||||||
|
click: row => {
|
||||||
|
addFormRef.value.open({
|
||||||
|
title: '修改',
|
||||||
|
row: row
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'delete',
|
||||||
|
title: '删除',
|
||||||
|
type: 'danger',
|
||||||
|
icon: 'el-icon-Delete',
|
||||||
|
render: 'confirmButton',
|
||||||
|
popconfirm: {
|
||||||
|
confirmButtonText: '确认',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
confirmButtonType: 'danger',
|
||||||
|
title: '确定删除该数据吗?'
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
delNewStation({ ids: row.id }).then(() => {
|
||||||
|
ElMessage.success('删除成功')
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
beforeSearchFun: () => {
|
||||||
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
|
},
|
||||||
|
loadCallback: () => {}
|
||||||
|
})
|
||||||
|
tableStore.table.params.searchValue = ''
|
||||||
|
const add = () => {
|
||||||
|
addFormRef.value.open({
|
||||||
|
title: '新增'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
||||||
@@ -235,6 +235,7 @@ const exportEvent = () => {
|
|||||||
if (!line) {
|
if (!line) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
|
|
||||||
message: '请选择要导出的数据'
|
message: '请选择要导出的数据'
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
@@ -246,7 +247,10 @@ const exportEvent = () => {
|
|||||||
form.append('endTime', TableHeaderRef.value.datePickerRef.timeValue[1])
|
form.append('endTime', TableHeaderRef.value.datePickerRef.timeValue[1])
|
||||||
form.append('type', 0)
|
form.append('type', 0)
|
||||||
form.append('name', line.name)
|
form.append('name', line.name)
|
||||||
|
ElMessage({
|
||||||
|
message: '下载报告中,请稍等.....',
|
||||||
|
duration: 1000
|
||||||
|
})
|
||||||
exportModelJB(form).then(async res => {
|
exportModelJB(form).then(async res => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ resetForm()
|
|||||||
|
|
||||||
const detailLoading = ref(false) // 表单的加载中
|
const detailLoading = ref(false) // 表单的加载中
|
||||||
const getInfo = async (row?: any) => {
|
const getInfo = async (row?: any) => {
|
||||||
console.log('🚀 ~ getInfo ~ row:', row)
|
|
||||||
detailLoading.value = true
|
detailLoading.value = true
|
||||||
try {
|
try {
|
||||||
await getUserReportById(props.id).then(res => {
|
await getUserReportById(props.id).then(res => {
|
||||||
|
|||||||
@@ -178,10 +178,10 @@ const tableStore = new TableStore({
|
|||||||
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.status == 0 || row.status == 3)
|
||||||
},
|
},
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return !(row.status == 0)
|
return !(row.status == 0 || row.status == 3)
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
|
|||||||
@@ -158,6 +158,27 @@
|
|||||||
<el-radio :value="0">否</el-radio>
|
<el-radio :value="0">否</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="关联终端" prop="devId" v-if="props.openType != 'create'">
|
||||||
|
<el-select v-model="form.devId" placeholder="请选择关联终端" @change="changeDevId">
|
||||||
|
<el-option
|
||||||
|
v-for="(item, index) in devIdList"
|
||||||
|
:label="item.devName"
|
||||||
|
:value="item.devId"
|
||||||
|
:key="index"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="关联监测点" prop="lineId" v-if="props.openType != 'create'">
|
||||||
|
<el-select v-model="form.lineId" placeholder="请选择关联监测点">
|
||||||
|
<el-option
|
||||||
|
v-for="(item, index) in lineIdList"
|
||||||
|
:label="item.lineName"
|
||||||
|
:value="item.lineId"
|
||||||
|
:key="index"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
for="-"
|
for="-"
|
||||||
v-if="form.userType != '0' && form.userType != '1'"
|
v-if="form.userType != '0' && form.userType != '1'"
|
||||||
@@ -361,7 +382,6 @@
|
|||||||
action=""
|
action=""
|
||||||
:accept="acceptType"
|
:accept="acceptType"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:on-exceed="handleExceed"
|
|
||||||
:on-change="choose"
|
:on-change="choose"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
:on-remove="removeFile"
|
:on-remove="removeFile"
|
||||||
@@ -379,7 +399,6 @@
|
|||||||
action=""
|
action=""
|
||||||
:accept="acceptType"
|
:accept="acceptType"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:on-exceed="handleExceed"
|
|
||||||
:on-change="choose"
|
:on-change="choose"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
:on-remove="removeFile"
|
:on-remove="removeFile"
|
||||||
@@ -397,7 +416,6 @@
|
|||||||
action=""
|
action=""
|
||||||
:accept="acceptType"
|
:accept="acceptType"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:on-exceed="handleExceed"
|
|
||||||
:on-change="choose"
|
:on-change="choose"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
:on-remove="removeFile"
|
:on-remove="removeFile"
|
||||||
@@ -420,7 +438,6 @@
|
|||||||
action=""
|
action=""
|
||||||
:accept="acceptType"
|
:accept="acceptType"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:on-exceed="handleExceed"
|
|
||||||
:on-change="choose"
|
:on-change="choose"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
:on-remove="removeFile"
|
:on-remove="removeFile"
|
||||||
@@ -438,7 +455,6 @@
|
|||||||
action=""
|
action=""
|
||||||
:accept="acceptType"
|
:accept="acceptType"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:on-exceed="handleExceed"
|
|
||||||
:on-change="choose"
|
:on-change="choose"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
:on-remove="removeFile"
|
:on-remove="removeFile"
|
||||||
@@ -462,7 +478,6 @@
|
|||||||
action=""
|
action=""
|
||||||
:accept="acceptType"
|
:accept="acceptType"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:on-exceed="handleExceed"
|
|
||||||
:on-change="choose"
|
:on-change="choose"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
:on-remove="removeFile"
|
:on-remove="removeFile"
|
||||||
@@ -486,7 +501,6 @@
|
|||||||
action=""
|
action=""
|
||||||
:accept="acceptType"
|
:accept="acceptType"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:on-exceed="handleExceed"
|
|
||||||
:on-change="choose"
|
:on-change="choose"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
:on-remove="removeFile"
|
:on-remove="removeFile"
|
||||||
@@ -510,7 +524,6 @@
|
|||||||
action=""
|
action=""
|
||||||
:accept="acceptType"
|
:accept="acceptType"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:on-exceed="handleExceed"
|
|
||||||
:on-change="choose"
|
:on-change="choose"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
:on-remove="removeFile"
|
:on-remove="removeFile"
|
||||||
@@ -534,7 +547,6 @@
|
|||||||
action=""
|
action=""
|
||||||
:accept="acceptType"
|
:accept="acceptType"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:on-exceed="handleExceed"
|
|
||||||
:on-change="choose"
|
:on-change="choose"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
:on-remove="removeFile"
|
:on-remove="removeFile"
|
||||||
@@ -545,6 +557,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<addUpload ref="addUploadRef" v-if="props.openType == 'create'" />
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
@@ -565,8 +578,16 @@ 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, resend } from '@/api/supervision-boot/interfere/index'
|
import {
|
||||||
|
submitFormData,
|
||||||
|
getById,
|
||||||
|
updateFormData,
|
||||||
|
addEditor,
|
||||||
|
resend,
|
||||||
|
getByDeptDevLine
|
||||||
|
} from '@/api/supervision-boot/interfere/index'
|
||||||
import { getUserReportUpdateById } from '@/api/supervision-boot/userReport/form'
|
import { getUserReportUpdateById } from '@/api/supervision-boot/userReport/form'
|
||||||
|
import addUpload from './addUpload.vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const isInterferencemanagement: any = ref(false)
|
const isInterferencemanagement: any = ref(false)
|
||||||
@@ -596,6 +617,7 @@ const dialogFormVisible = ref(false)
|
|||||||
// .doc,.docx,.xlsx,.xls,.pdf
|
// .doc,.docx,.xlsx,.xls,.pdf
|
||||||
const acceptType = ''
|
const acceptType = ''
|
||||||
const form: any = ref({})
|
const form: any = ref({})
|
||||||
|
const addUploadRef: any = ref()
|
||||||
const control: any = ref(true)
|
const control: any = ref(true)
|
||||||
const ruleFormRef: any = ref(null)
|
const ruleFormRef: any = ref(null)
|
||||||
//字典获取所在地市
|
//字典获取所在地市
|
||||||
@@ -606,7 +628,8 @@ const areaOptionList = dictData
|
|||||||
//字典获取敏感电能质量指标
|
//字典获取敏感电能质量指标
|
||||||
// const energyQualityIndexList = dictData.getBasicData('Indicator_Type')
|
// const energyQualityIndexList = dictData.getBasicData('Indicator_Type')
|
||||||
const energyQualityIndexList = dictData.getBasicData('Problem_Indicators')
|
const energyQualityIndexList = dictData.getBasicData('Problem_Indicators')
|
||||||
|
const devIdList: any = ref([])
|
||||||
|
const lineIdList: any = ref([])
|
||||||
//字典获取行业类型
|
//字典获取行业类型
|
||||||
const industryList = dictData.getBasicData('industry_type_jb')
|
const industryList = dictData.getBasicData('industry_type_jb')
|
||||||
//字典电压等级
|
//字典电压等级
|
||||||
@@ -700,6 +723,8 @@ const resetForm = () => {
|
|||||||
evaluationDept: evaluationDeptList[0].name, //预测评估单位 1
|
evaluationDept: evaluationDeptList[0].name, //预测评估单位 1
|
||||||
evaluationConclusion: '', //预测评估结论 1
|
evaluationConclusion: '', //预测评估结论 1
|
||||||
backgroundTestPerformed: 0, //是否开展背景测试 1
|
backgroundTestPerformed: 0, //是否开展背景测试 1
|
||||||
|
devId: '', //关联终端 1
|
||||||
|
lineId: '', //关联监测点 1
|
||||||
feasibilityReport: [], // 可研报告告地址 1
|
feasibilityReport: [], // 可研报告告地址 1
|
||||||
preliminaryDesignDescription: [], //项目初步设计说明书告地址 1
|
preliminaryDesignDescription: [], //项目初步设计说明书告地址 1
|
||||||
predictionEvaluationReport: [], //预测评估报告地址 1
|
predictionEvaluationReport: [], //预测评估报告地址 1
|
||||||
@@ -789,6 +814,8 @@ const subForm: any = ref({
|
|||||||
expectedProductionDate: '', //工程预期投产日期
|
expectedProductionDate: '', //工程预期投产日期
|
||||||
orgId: '', //填报部门
|
orgId: '', //填报部门
|
||||||
projectName: '',
|
projectName: '',
|
||||||
|
devId: 0, //关联终端 1
|
||||||
|
lineId: 0, //关联监测点 1
|
||||||
reporter: '', //填报人
|
reporter: '', //填报人
|
||||||
reportDate: new Date(), //填报日期
|
reportDate: new Date(), //填报日期
|
||||||
responsibleDepartment: '', //归口管理部门
|
responsibleDepartment: '', //归口管理部门
|
||||||
@@ -872,6 +899,8 @@ const rules = ref({
|
|||||||
voltageLevel: [{ required: true, message: '请选择电压等级', trigger: 'change' }],
|
voltageLevel: [{ required: true, message: '请选择电压等级', trigger: 'change' }],
|
||||||
evaluationDept: [{ required: true, message: '请选择预测评估单位', trigger: 'change' }],
|
evaluationDept: [{ required: true, message: '请选择预测评估单位', trigger: 'change' }],
|
||||||
evaluationConclusion: [{ required: true, message: '请输入预测评估结论', trigger: 'blur' }],
|
evaluationConclusion: [{ required: true, message: '请输入预测评估结论', trigger: 'blur' }],
|
||||||
|
devId: [{ required: true, message: '请选择关联终端', trigger: 'change' }],
|
||||||
|
lineId: [{ required: true, message: '请选择关联监测点', trigger: 'change' }],
|
||||||
agreementCapacity: [{ required: true, message: '请选择用户协议容量', trigger: 'blur' }],
|
agreementCapacity: [{ required: true, message: '请选择用户协议容量', trigger: 'blur' }],
|
||||||
nonlinearDeviceType: [{ required: true, message: '请选择非线性终端类型', trigger: 'change' }],
|
nonlinearDeviceType: [{ required: true, message: '请选择非线性终端类型', trigger: 'change' }],
|
||||||
needGovernance: [{ required: true, message: '请选择是否需要治理', trigger: 'change' }],
|
needGovernance: [{ required: true, message: '请选择是否需要治理', trigger: 'change' }],
|
||||||
@@ -1025,10 +1054,11 @@ const status = ref('')
|
|||||||
const open = async (row: any) => {
|
const open = async (row: any) => {
|
||||||
title.value = row.title
|
title.value = row.title
|
||||||
dialogFormVisible.value = true
|
dialogFormVisible.value = true
|
||||||
|
let deptIds = adminInfo.$state.deptId
|
||||||
if (row.row) {
|
if (row.row) {
|
||||||
resendId.value = row.row.id
|
resendId.value = row.row.id
|
||||||
status.value = row.row.status
|
status.value = row.row.status
|
||||||
|
deptIds = row.row.orgId
|
||||||
if (props.update) {
|
if (props.update) {
|
||||||
await getUserReportUpdateById(row.row.id).then(res => {
|
await getUserReportUpdateById(row.row.id).then(res => {
|
||||||
handleResponse(res.data.userReportMessageJson)
|
handleResponse(res.data.userReportMessageJson)
|
||||||
@@ -1042,6 +1072,12 @@ const open = async (row: any) => {
|
|||||||
resendId.value = ''
|
resendId.value = ''
|
||||||
form.value.userType = userTypeList.value[0].value
|
form.value.userType = userTypeList.value[0].value
|
||||||
}
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
getByDeptDevLine({ id: deptIds }).then(res => {
|
||||||
|
devIdList.value = res.data
|
||||||
|
changeDevId(form.value.devId, false)
|
||||||
|
})
|
||||||
|
}, 10)
|
||||||
}
|
}
|
||||||
async function handleResponse(data: any) {
|
async function handleResponse(data: any) {
|
||||||
// userType logic is commented out; if needed, implement accordingly
|
// userType logic is commented out; if needed, implement accordingly
|
||||||
@@ -1186,7 +1222,14 @@ const choose = (e: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 关联终端
|
||||||
|
const changeDevId = (e: any, flag?: boolean = true) => {
|
||||||
|
if (flag) {
|
||||||
|
form.value.lineId = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
lineIdList.value = devIdList.value.filter(item => item.devId == e)[0]?.lineList
|
||||||
|
}
|
||||||
//设置工程预期投产日期时间选择范围不能<今天
|
//设置工程预期投产日期时间选择范围不能<今天
|
||||||
const disabledDate = (time: any) => {
|
const disabledDate = (time: any) => {
|
||||||
// return time.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天
|
// return time.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天
|
||||||
@@ -1194,6 +1237,7 @@ const disabledDate = (time: any) => {
|
|||||||
}
|
}
|
||||||
//提交
|
//提交
|
||||||
const confirmForm = (flag: boolean) => {
|
const confirmForm = (flag: boolean) => {
|
||||||
|
addUploadRef.value?.submitForm()
|
||||||
if (flag) {
|
if (flag) {
|
||||||
//整理上传文件的数据
|
//整理上传文件的数据
|
||||||
// userType==0,1
|
// userType==0,1
|
||||||
|
|||||||
@@ -0,0 +1,204 @@
|
|||||||
|
<template>
|
||||||
|
<el-form-item label="入网设计方案审查报告">
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.NetReport"
|
||||||
|
ref="NetReportRef"
|
||||||
|
action=""
|
||||||
|
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||||
|
:limit="1"
|
||||||
|
@change="choose($event, 'NetReport')"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="治理工程验收报告">
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.governReport"
|
||||||
|
action=""
|
||||||
|
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||||
|
:limit="1"
|
||||||
|
@change="choose($event, 'governReport')"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="信息安全检测报告">
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.informationSecurityTestReport"
|
||||||
|
action=""
|
||||||
|
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||||
|
:limit="1"
|
||||||
|
@change="choose($event, 'informationSecurityTestReport')"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="验收检验报告单">
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.acceptanceInspectionReportSingle"
|
||||||
|
action=""
|
||||||
|
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||||
|
:limit="1"
|
||||||
|
@change="choose($event, 'acceptanceInspectionReportSingle')"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="验收检验报告">
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.acceptanceInspectionReport"
|
||||||
|
action=""
|
||||||
|
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||||
|
:limit="1"
|
||||||
|
@change="choose($event, 'acceptanceInspectionReport')"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="型式实验报告">
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.typeExperimentReport"
|
||||||
|
action=""
|
||||||
|
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||||
|
:limit="1"
|
||||||
|
@change="choose($event, 'typeExperimentReport')"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="出厂检验报告">
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.factoryInspectionReport"
|
||||||
|
action=""
|
||||||
|
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||||
|
:limit="1"
|
||||||
|
@change="choose($event, 'factoryInspectionReport')"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="性能检测报告">
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.performanceTestReport"
|
||||||
|
action=""
|
||||||
|
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||||
|
:limit="1"
|
||||||
|
@change="choose($event, 'performanceTestReport')"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="主接线图">
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.mainWiringDiagram"
|
||||||
|
action=""
|
||||||
|
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||||
|
:limit="1"
|
||||||
|
@change="choose($event, 'mainWiringDiagram')"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="试运行报告">
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.runTheReport"
|
||||||
|
action=""
|
||||||
|
accept=".doc,.docx,.xlsx,.xls,.pdf"
|
||||||
|
:limit="1"
|
||||||
|
@change="choose($event, 'runTheReport')"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive } from 'vue'
|
||||||
|
import { uploadFile } from '@/api/system-boot/file'
|
||||||
|
import { genFileId, ElMessage } from 'element-plus'
|
||||||
|
import type { UploadProps, UploadRawFile } from 'element-plus'
|
||||||
|
|
||||||
|
const form = ref({
|
||||||
|
NetReport: [], //入网设计方案审查报告:
|
||||||
|
governReport: [], //治理工程验收报告
|
||||||
|
informationSecurityTestReport: [], //信息安全检测报告
|
||||||
|
acceptanceInspectionReportSingle: [], //信息安全检测报告
|
||||||
|
acceptanceInspectionReport: [], //验收检验报告:
|
||||||
|
typeExperimentReport: [], //型式实验报告
|
||||||
|
factoryInspectionReport: [], //出厂检验报告:
|
||||||
|
performanceTestReport: [], //性能检测报告
|
||||||
|
mainWiringDiagram: [], //主接线图:
|
||||||
|
runTheReport: [], //试运行报告
|
||||||
|
})
|
||||||
|
|
||||||
|
const formName = ref({
|
||||||
|
NetReport: '',
|
||||||
|
governReport: '',
|
||||||
|
informationSecurityTestReport: '',
|
||||||
|
acceptanceInspectionReportSingle: '',
|
||||||
|
acceptanceInspectionReport: '',
|
||||||
|
typeExperimentReport: '',
|
||||||
|
factoryInspectionReport: '',
|
||||||
|
performanceTestReport: '',
|
||||||
|
mainWiringDiagram: '',
|
||||||
|
runTheReport: '',
|
||||||
|
})
|
||||||
|
|
||||||
|
const choose = (e: any, name: string) => {
|
||||||
|
console.log('🚀 ~ choose ~ name:', name)
|
||||||
|
uploadFile(e.raw, '/supervision/').then(res => {
|
||||||
|
formName.value[name] = res.data.name
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const submitForm = () => {
|
||||||
|
console.log(formName.value)
|
||||||
|
}
|
||||||
|
defineExpose({ submitForm })
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-form-item__content > div:first-child {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
:deep(.el-upload-list) {
|
||||||
|
margin: 0;
|
||||||
|
.el-upload-list__item {
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
|
.el-upload-list__item-file-name {
|
||||||
|
width: 150px !important;
|
||||||
|
height: 25px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -102,6 +102,19 @@
|
|||||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||||
</span>
|
</span>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="关联终端" v-if="props.openType != 'create'">
|
||||||
|
<span>
|
||||||
|
{{ devIdList[0]?.devName }}
|
||||||
|
</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="关联监测点" v-if="props.openType != 'create'">
|
||||||
|
<span>
|
||||||
|
<!-- {{ detailData?.lineId }} -->
|
||||||
|
{{ devIdList[0]?.lineList.filter(item => item.lineId == detailData?.lineId)[0].lineName }}
|
||||||
|
</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item label="是否开展抗扰度测试" v-if="detailData.userType == 6">
|
<el-descriptions-item label="是否开展抗扰度测试" v-if="detailData.userType == 6">
|
||||||
<span>
|
<span>
|
||||||
{{ proviteData.antiInterferenceTest == 0 ? '否' : '是' }}
|
{{ proviteData.antiInterferenceTest == 0 ? '否' : '是' }}
|
||||||
@@ -346,6 +359,7 @@ import { useDictData } from '@/stores/dictData'
|
|||||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||||
import { Link, View } from '@element-plus/icons-vue'
|
import { Link, View } from '@element-plus/icons-vue'
|
||||||
import PreviewFile from '@/components/PreviewFile/index.vue'
|
import PreviewFile from '@/components/PreviewFile/index.vue'
|
||||||
|
import { getByDeptDevLine } from '@/api/supervision-boot/interfere/index'
|
||||||
defineOptions({ name: 'BpmUserReportDetail' })
|
defineOptions({ name: 'BpmUserReportDetail' })
|
||||||
|
|
||||||
const { query } = useRoute() // 查询参数
|
const { query } = useRoute() // 查询参数
|
||||||
@@ -355,10 +369,15 @@ const props = defineProps({
|
|||||||
update: {
|
update: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
openType: {
|
||||||
|
type: String,
|
||||||
|
default: 'create'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const detailLoading = ref(false) // 表单的加载中
|
const detailLoading = ref(false) // 表单的加载中
|
||||||
const detailData = ref<any>({}) // 详情数据
|
const detailData = ref<any>({}) // 详情数据
|
||||||
|
const devIdList = ref([])
|
||||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||||
const openFile = (name: any) => {
|
const openFile = (name: any) => {
|
||||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||||
@@ -595,6 +614,11 @@ const getProviteData = async () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 调用关联终端接口
|
||||||
|
getByDeptDevLine({ id: detailData.value.orgId }).then(res => {
|
||||||
|
devIdList.value = res.data.filter((item: any) => item.devId == detailData.value.devId)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
//根据文件名请求
|
//根据文件名请求
|
||||||
const getFileNamePath = async (val: any, pathName: any) => {
|
const getFileNamePath = async (val: any, pathName: any) => {
|
||||||
|
|||||||
@@ -78,7 +78,14 @@ const tableStore = new TableStore({
|
|||||||
column: [
|
column: [
|
||||||
{ title: '序号', type: 'seq', width: 80 },
|
{ title: '序号', type: 'seq', width: 80 },
|
||||||
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
{
|
||||||
|
field: 'city',
|
||||||
|
title: '所在地市',
|
||||||
|
minWidth: 80,
|
||||||
|
formatter: (obj: any) => {
|
||||||
|
return areaOptionList.filter(item => item.id == obj.row.city)[0]?.name
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'substation',
|
field: 'substation',
|
||||||
title: '变电站',
|
title: '变电站',
|
||||||
|
|||||||
@@ -29,12 +29,14 @@
|
|||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
|
|
||||||
<el-dialog title="详情" width="80%" v-model="dialogShow"><DetailInfo :id="userId"></DetailInfo></el-dialog>
|
<el-dialog title="详情" width="80%" v-model="dialogShow">
|
||||||
|
<DetailInfo :id="userId" :openType="'sourcesOfInterference'"></DetailInfo>
|
||||||
|
</el-dialog>
|
||||||
<!-- 批量导入 -->
|
<!-- 批量导入 -->
|
||||||
<sensitive-user-popup ref="sensitiveUserPopup" />
|
<sensitive-user-popup ref="sensitiveUserPopup" />
|
||||||
|
|
||||||
<!-- 查看详情 detail 新增/修改 create-->
|
<!-- 查看详情 detail 新增/修改 create-->
|
||||||
<addForm ref="addForms" @onSubmit="tableStore.index()" openType="create"></addForm>
|
<addForm ref="addForms" @onSubmit="tableStore.index()" :openType="'sourcesOfInterference'"></addForm>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -125,7 +127,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
showDisabled: row => {
|
showDisabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !( row.dataType == 1)
|
return row.city != adminInfo.$state.deptName || !(row.dataType == 1)
|
||||||
},
|
},
|
||||||
|
|
||||||
click: row => {
|
click: row => {
|
||||||
@@ -145,6 +147,7 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.city = ''
|
tableStore.table.params.city = ''
|
||||||
|
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||||
tableStore.table.params.projectName = ''
|
tableStore.table.params.projectName = ''
|
||||||
tableStore.table.params.loadType = ''
|
tableStore.table.params.loadType = ''
|
||||||
tableStore.table.params.userName = ''
|
tableStore.table.params.userName = ''
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-Open',
|
icon: 'el-icon-Open',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
showDisabled: row => {
|
showDisabled: row => {
|
||||||
return row.createBy != adminInfo.$state.id || !(row.dataType == 0 || row.dataType == 1)
|
return row.city != adminInfo.$state.deptName || !(row.dataType == 0 || row.dataType == 1)
|
||||||
},
|
},
|
||||||
// disabled: row => {
|
// disabled: row => {
|
||||||
// return !(row.status == 0)
|
// return !(row.status == 0)
|
||||||
@@ -169,6 +169,7 @@ tableStore.table.params.city = ''
|
|||||||
tableStore.table.params.projectName = ''
|
tableStore.table.params.projectName = ''
|
||||||
tableStore.table.params.loadType = ''
|
tableStore.table.params.loadType = ''
|
||||||
tableStore.table.params.userName = ''
|
tableStore.table.params.userName = ''
|
||||||
|
tableStore.table.params.orgId = adminInfo.$state.deptId
|
||||||
tableStore.table.params.relationUserName = ''
|
tableStore.table.params.relationUserName = ''
|
||||||
tableStore.table.params.aisFileUpload = ''
|
tableStore.table.params.aisFileUpload = ''
|
||||||
const addForms = ref()
|
const addForms = ref()
|
||||||
|
|||||||
@@ -21,13 +21,16 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
<el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate">模板下载</el-button>
|
||||||
|
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
|
|
||||||
<!-- 新增弹框 -->
|
<!-- 新增弹框 -->
|
||||||
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
||||||
|
<!-- 上传模版 -->
|
||||||
|
<uploadATemplate ref="uploadATemplateRef" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, watch } from 'vue'
|
import { ref, onMounted, provide, watch } from 'vue'
|
||||||
@@ -36,10 +39,11 @@ import Table from '@/components/table/index.vue'
|
|||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
import { downloadDevTemplate } from '@/api/supervision-boot/userReport/form'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ElMessageBox } from 'element-plus/es'
|
import { ElMessageBox } from 'element-plus/es'
|
||||||
import { cancelTerminalFormData } from '@/api/supervision-boot/terminal/index'
|
import { cancelTerminalFormData } from '@/api/supervision-boot/terminal/index'
|
||||||
|
import uploadATemplate from './uploadATemplate.vue'
|
||||||
import addForm from './addForm.vue'
|
import addForm from './addForm.vue'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
@@ -51,6 +55,7 @@ const tableRef = ref()
|
|||||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
|
const uploadATemplateRef = ref()
|
||||||
const show: any = ref(false)
|
const show: any = ref(false)
|
||||||
const fileList = ref([])
|
const fileList = ref([])
|
||||||
const flag = ref(false)
|
const flag = ref(false)
|
||||||
@@ -260,23 +265,26 @@ const cancelLeave = async (row: any) => {
|
|||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}
|
}
|
||||||
const exportEvent = () => {
|
|
||||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
//导出模板
|
||||||
form.pageNum = 1
|
const exportExcelTemplate = () => {
|
||||||
form.pageSize = tableStore.table.total
|
downloadDevTemplate().then((res: any) => {
|
||||||
getLoadTypeUserList(form).then(res => {
|
let blob = new Blob([res], {
|
||||||
tableRef.value.getRef().exportData({
|
type: 'application/vnd.ms-excel'
|
||||||
filename: '未建档非线性用户', // 文件名字
|
|
||||||
sheetName: 'Sheet1',
|
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
|
||||||
useStyle: true,
|
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
|
||||||
columnFilterMethod: function (column: any) {
|
|
||||||
return !(column.$columnIndex === 0)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
const url = window.URL.createObjectURL(blob)
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.href = url
|
||||||
|
link.download = '终端入网检测模板'
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
link.remove()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//批量导入用户数据
|
||||||
|
const importUserData = () => {
|
||||||
|
uploadATemplateRef.value.open('导入终端入网检测')
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -0,0 +1,147 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
draggable
|
||||||
|
class="cn-operate-dialog"
|
||||||
|
v-model="eventDataUploadVisible"
|
||||||
|
:title="title"
|
||||||
|
style="width: 415px"
|
||||||
|
top="25vh"
|
||||||
|
>
|
||||||
|
<el-scrollbar>
|
||||||
|
<el-form :inline="false" :model="form" label-width="120px" ref="formRef">
|
||||||
|
<el-form-item label="用户数据文件">
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="fileList"
|
||||||
|
ref="uploadEventData"
|
||||||
|
action=""
|
||||||
|
:limit="1"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
|
:auto-upload="false"
|
||||||
|
:on-change="choose"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary">选择数据文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-scrollbar>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="eventDataUploadVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="submit">确认</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive, inject } from 'vue'
|
||||||
|
import TableStore from '@/utils/tableStore'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import type { UploadInstance, UploadProps, UploadRawFile, UploadUserFile } from 'element-plus'
|
||||||
|
import { genFileId } from 'element-plus'
|
||||||
|
import { deVReportImportSensitive } from '@/api/supervision-boot/userReport/form'
|
||||||
|
|
||||||
|
const fileList = ref<UploadUserFile[]>([])
|
||||||
|
|
||||||
|
const formRef = ref()
|
||||||
|
const tableStore = inject('tableStore') as TableStore
|
||||||
|
const eventDataUploadVisible = ref(false)
|
||||||
|
const title = ref('')
|
||||||
|
const uploadEventData = ref<UploadInstance>()
|
||||||
|
|
||||||
|
// 注意不要和表单ref的命名冲突
|
||||||
|
const form = reactive({
|
||||||
|
file: null
|
||||||
|
})
|
||||||
|
|
||||||
|
//弹出界面,默认选择用户的第一个生产线的第一条进线进行数据导入
|
||||||
|
const open = async (text: string) => {
|
||||||
|
title.value = text
|
||||||
|
resetForm()
|
||||||
|
form.file = null
|
||||||
|
fileList.value = []
|
||||||
|
eventDataUploadVisible.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
//重置表单内容
|
||||||
|
const resetForm = () => {
|
||||||
|
if (formRef.value) {
|
||||||
|
formRef.value.resetFields()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选择待上传文件
|
||||||
|
*/
|
||||||
|
const choose = (e: any) => {
|
||||||
|
form.file = e.raw
|
||||||
|
}
|
||||||
|
const handleExceed: UploadProps['onExceed'] = files => {
|
||||||
|
uploadEventData.value!.clearFiles()
|
||||||
|
const file = files[0] as UploadRawFile
|
||||||
|
file.uid = genFileId()
|
||||||
|
uploadEventData.value!.handleStart(file)
|
||||||
|
fileList.value = [{ name: file.name, url: '' }]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交用户表单数据
|
||||||
|
*/
|
||||||
|
const submit = async () => {
|
||||||
|
if (form.file) {
|
||||||
|
formRef.value.validate(async (valid: any) => {
|
||||||
|
if (valid) {
|
||||||
|
let data = new FormData()
|
||||||
|
data.append('file', form.file)
|
||||||
|
await deVReportImportSensitive(data)
|
||||||
|
.then(res => handleImportResponse(title.value, res))
|
||||||
|
.finally(() => {
|
||||||
|
tableStore.index()
|
||||||
|
eventDataUploadVisible.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ElMessage.error('请选择数据文件')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleImportResponse(title: any, res: any) {
|
||||||
|
if (res.type === 'application/json') {
|
||||||
|
const fileReader = new FileReader()
|
||||||
|
fileReader.onloadend = () => {
|
||||||
|
try {
|
||||||
|
const jsonData = JSON.parse(fileReader.result)
|
||||||
|
if (jsonData.code === 'A0000') {
|
||||||
|
ElMessage.success('导入成功')
|
||||||
|
} else {
|
||||||
|
ElMessage.error('导入失败,请查看下载附件!')
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fileReader.readAsText(res)
|
||||||
|
} else {
|
||||||
|
ElMessage.error('导入失败,请查看下载附件!')
|
||||||
|
let blob = new Blob([res], { type: 'application/vnd.ms-excel' })
|
||||||
|
const url = window.URL.createObjectURL(blob)
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.href = url
|
||||||
|
link.download = '终端入网检测失败列表'
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
link.remove()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({ open })
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.el-form-item__content div {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -369,6 +369,8 @@ const runTestSubmit = (type: number) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
Reference in New Issue
Block a user