完成承载能力评估联调

This commit is contained in:
GGJ
2024-03-21 20:13:25 +08:00
parent e6deaa3fb1
commit 2532bd0851
13 changed files with 500 additions and 327 deletions

View File

@@ -4,11 +4,7 @@
<TableHeader datePicker ref="TableHeaderRef">
<template #select>
<el-form-item label="用户类型">
<el-select
v-model="tableStore.table.params.userType"
clearable
placeholder="请选择用户类型"
>
<el-select v-model="tableStore.table.params.userType" clearable placeholder="请选择用户类型">
<el-option v-for="item in uesrList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
@@ -24,12 +20,7 @@
<el-input v-model="form.userName" clearable placeholder="请输入用户名称" />
</el-form-item>
<el-form-item label="用户类型:" prop="userType">
<el-select
v-model="form.userType"
clearable
placeholder="请选择用户类型"
@change="useChange"
>
<el-select v-model="form.userType" clearable placeholder="请选择用户类型" @change="useChange">
<el-option v-for="item in uesrList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
@@ -73,6 +64,8 @@
</template>
</el-dialog>
</div>
<!-- 设备 -->
<equipment ref="equipmentRef" />
</div>
</template>
<script setup lang="ts">
@@ -83,6 +76,7 @@ import TableHeader from '@/components/table/header/index.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { mainHeight } from '@/utils/layout'
import { useDictData } from '@/stores/dictData'
import equipment from './equipment.vue'
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
defineOptions({
name: 'estimate/photovoltaic'
@@ -93,6 +87,7 @@ const uesrList = dictData.getBasicData('CARRY_CAPCITY_USER_TYPE')
const dialogVisible = ref(false)
const disabled = ref(false)
const TableHeaderRef = ref()
const equipmentRef = ref()
const title = ref('')
const areaList: any = dictData.areaSelect()
const userShow: any = ref('Power_Station_Users')
@@ -129,7 +124,7 @@ const rules = {
}
const props = { label: 'name', value: 'id' }
const ruleFormRef = ref()
const tableStore = new TableStore({
const tableStore: any = new TableStore({
url: '/advance-boot/carrycapacityuser/queyDetailUser',
// url: '/hzj/carrycapacityuser/queyDetailUser',
method: 'POST',
@@ -187,6 +182,16 @@ const tableStore = new TableStore({
width: '180',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '设备 ',
type: 'primary',
icon: 'el-icon-Plus',
render: 'basicButton',
click: row => {
equipmentRef.value.open(row)
}
},
{
name: 'edit',
title: '查看',
@@ -206,7 +211,7 @@ const tableStore = new TableStore({
{
name: 'edit',
title: '编辑',
type: '',
type: 'primary',
icon: 'el-icon-Plus',
render: 'basicButton',
click: async row => {
@@ -242,8 +247,7 @@ const tableStore = new TableStore({
],
loadCallback: () => {
console.log(tableStore.table.data);
console.log(tableStore.table.data)
}
})
@@ -251,14 +255,7 @@ tableStore.table.params.userType = ''
provide('tableStore', tableStore)
onMounted(() => {
TableHeaderRef.value.setDatePicker([{ label: '周', value: 4 }])
TableHeaderRef.value.setInterval(4)
setTimeout(() => {
tableStore.table.params.startTime = TableHeaderRef.value.datePickerRef.timeValue[0]
tableStore.table.params.endTime = TableHeaderRef.value.datePickerRef.timeValue[1]
tableStore.index()
}, 100)
tableStore.index()
})
const useChange = (e: string) => {
userShow.value = uesrList.filter(item => item.id == e)[0].code