问题修改

This commit is contained in:
zhujiyan
2024-05-29 15:06:53 +08:00
parent 62e68e4434
commit 32be424616
12 changed files with 137 additions and 244 deletions

View File

@@ -43,9 +43,8 @@ import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useDictData } from '@/stores/dictData'
import { getUserReportById } from '@/api/supervision-boot/userReport/form'
import BpmUserReportDetail from '../../components/undocumented/detail.vue'
const dictData = useDictData()
const areaOptionList = dictData.getBasicData('jibei_area')
@@ -100,7 +99,7 @@ const tableStore = new TableStore({
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
open(row.id)
open(row)
}
}
]
@@ -119,7 +118,7 @@ const tableStore = new TableStore({
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
toFangAn(row.id, 0)
toFangAn(row, 0)
}
},
{
@@ -129,7 +128,7 @@ const tableStore = new TableStore({
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
toFangAn(row.id, 1)
toFangAn(row, 1)
}
}
]
@@ -149,27 +148,43 @@ tableStore.table.params.relationUserName = ''
tableStore.table.params.aisFileUpload = ''
const dialogVisible = ref(false)
const interId = ref()
provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
})
const detailsRef = ref(null)
/** 打开弹窗 */
const open = async (id: string) => {
// detailsRef.value.open()
const open = async val => {
interId.value = val.id
dialogVisible.value = true
interId.value = id
}
const needGovernance = ref()
/** 方案审查 */
const toFangAn = (id: any, typeNo: number) => {
push({
name: 'ProgramReview',
query: {
id: id,
type: typeNo
const toFangAn = (row: any, typeNo: number) => {
//查询详情拿到needGovernance
/** 获得数据 */
getUserReportById(row.id).then(res => {
if (res.data.userType == '0' || res.data.userType == '1') {
needGovernance.value = res.data.userReportProjectPO?.needGovernance
} else if (
res.data.userType == '2' ||
res.data.userType == '3' ||
res.data.userType == '4' ||
res.data.userType == '5'
) {
needGovernance.value = res.data.userReportSubstationPO?.needGovernance
} else if (res.data.userType == '6') {
needGovernance.value = res.data.userReportSensitivePO?.needGovernance
}
push({
name: 'ProgramReview',
query: {
id: row.id,
type: typeNo,
needGovernance: needGovernance.value
}
})
})
}

View File

@@ -23,7 +23,8 @@
</template>
</TableHeader> -->
<div class="header_btn">
<el-button icon="" type="primary" @click="toGoNet()">{{ titleButton }}</el-button>
<el-button v-if="bussType==0" icon="" type="primary" @click="toGoNet()">{{ titleButton }}</el-button>
<el-button v-if="bussType==1&&needGovernance!='0'" icon="" type="primary" @click="toGoNet()">{{ titleButton }}</el-button>
<el-button style="margin-left: 50px" :icon="Back" @click="go(-1)">返回</el-button>
</div>
<Table ref="tableRef" />
@@ -51,13 +52,13 @@ import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useDictData } from '@/stores/dictData'
import addForm from './addForm.vue'
import { useRouter } from 'vue-router'
import { useRouter, useRoute } from 'vue-router'
import { Back } from '@element-plus/icons-vue'
const { go, currentRoute, push } = useRouter()
const { query } = useRoute() // 查询参数
const needGovernance = query.needGovernance as unknown as string // 从 URL 传递过来的 是否需要治理
const dictData = useDictData()
const areaOptionList = dictData.getBasicData('jibei_area')
const TableHeaderRef = ref()
const tableStore = new TableStore({
url: '/supervision-boot/userReportNormal/userReportGoNetPage',
@@ -154,9 +155,9 @@ bussType.value = Number(currentRoute.value.query.type)
const titleButton = ref()
if (bussType.value === 0) {
titleButton.value = '入网设计方案审查'
titleButton.value = '入网设计方案申请'
} else {
titleButton.value = '治理工程验收'
titleButton.value = '治理工程申请'
}
provide('tableStore', tableStore)
@@ -213,9 +214,9 @@ const getUserTypeName = (userType: any) => {
width: 100%;
height: 60px;
display: flex;
padding:13px 15px;
padding: 13px 15px;
justify-content: flex-end;
align-items: center;
border:1px solid #DDDFE6;
border: 1px solid #dddfe6;
}
</style>