修改测试问题
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
:disabled="openType == 'detail'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名称:" prop="projectName">
|
||||
<el-form-item label="用户名称:" prop="projectName">
|
||||
<el-input
|
||||
v-model="form.projectName"
|
||||
autocomplete="off"
|
||||
@@ -54,7 +54,7 @@
|
||||
:disabled="openType == 'detail'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户状态:" prop="userStatus">
|
||||
<el-form-item label="用户状态:" prop="userStatus">
|
||||
<el-select v-model="form.userStatus" placeholder="请选择用户状态" :disabled="openType == 'detail'">
|
||||
<el-option
|
||||
v-for="(item, index) in userStateList"
|
||||
@@ -65,7 +65,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="变电站:" prop="substation">
|
||||
<el-form-item label="变电站:" prop="substation">
|
||||
<el-input
|
||||
v-model="form.substation"
|
||||
autocomplete="off"
|
||||
@@ -73,7 +73,7 @@
|
||||
:disabled="openType == 'detail'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.userType == '0' || form.userType == '1'" label="电压等级:" prop="voltageLevel">
|
||||
<el-form-item v-if="form.userType == '0' || form.userType == '1'" label="电压等级:" prop="voltageLevel">
|
||||
<el-select
|
||||
v-model="form.voltageLevel"
|
||||
placeholder="请选择电压等级"
|
||||
@@ -88,7 +88,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
<el-form-item
|
||||
v-if="form.userType == '0' || form.userType == '1'"
|
||||
label="预测评估单位:"
|
||||
prop="evaluationDept"
|
||||
@@ -112,11 +112,7 @@
|
||||
<el-radio :value="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="form.userReportSubstationPO"
|
||||
label="是否开展背景测试:"
|
||||
prop="backgroundTestPerformed"
|
||||
>
|
||||
<el-form-item v-if="form.userReportSubstationPO" label="是否开展背景测试:" prop="backgroundTestPerformed">
|
||||
<el-radio-group
|
||||
v-model="form.userReportSubstationPO.backgroundTestPerformed"
|
||||
:disabled="openType == 'detail'"
|
||||
@@ -143,7 +139,7 @@
|
||||
<el-form-item label="填报部门:" prop="orgId">
|
||||
<el-input v-model="form.orgId" :disabled="true" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
<el-form-item
|
||||
class="uploadFile"
|
||||
:label="bussType == 0 ? '入网设计方案审查报告:' : '治理工程验收报告:'"
|
||||
prop="goToNetReport"
|
||||
@@ -175,7 +171,7 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, defineProps, defineEmits } from 'vue'
|
||||
import type { UploadProps, UploadRawFile } from 'element-plus'
|
||||
import type { UploadProps, UploadRawFile } from 'element-plus'
|
||||
import { genFileId, ElMessage } from 'element-plus'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
@@ -191,10 +187,10 @@ const props = defineProps({
|
||||
id: {
|
||||
type: String
|
||||
},
|
||||
bussType:{
|
||||
bussType: {
|
||||
type: Number
|
||||
},
|
||||
titleButton:{
|
||||
titleButton: {
|
||||
type: String
|
||||
}
|
||||
})
|
||||
@@ -265,21 +261,21 @@ const userStateList = reactive([
|
||||
const adminInfo = useAdminInfo()
|
||||
const resetForm = () => {
|
||||
form.value = {
|
||||
reporter: '', //填报人
|
||||
reportDate: new Date(), //填报日期
|
||||
orgId: '', //填报部门
|
||||
goToNetReport:[],//报告
|
||||
userType: 0, //用户性质
|
||||
city: areaOptionList[0].name, //所属地市
|
||||
responsibleDepartment: '', //归口管理部门
|
||||
projectName: '', //用户名称
|
||||
userStatus: userStateList[0].value, //用户状态
|
||||
substation: '', //变电站
|
||||
backgroundTestPerformed: 0, //是否开展背景测试
|
||||
antiInterferenceTest: 0, //是否开展抗扰度测试
|
||||
voltageLevel: voltageLevelList[0].id, //电压等级
|
||||
evaluationDept: evaluationDeptList[0].name, //预测评估单位
|
||||
}
|
||||
reporter: '', //填报人
|
||||
reportDate: new Date(), //填报日期
|
||||
orgId: '', //填报部门
|
||||
goToNetReport: [], //报告
|
||||
userType: 0, //用户性质
|
||||
city: areaOptionList[0].name, //所属地市
|
||||
responsibleDepartment: '', //归口管理部门
|
||||
projectName: '', //用户名称
|
||||
userStatus: userStateList[0].value, //用户状态
|
||||
substation: '', //变电站
|
||||
backgroundTestPerformed: 0, //是否开展背景测试
|
||||
antiInterferenceTest: 0, //是否开展抗扰度测试
|
||||
voltageLevel: voltageLevelList[0].id, //电压等级
|
||||
evaluationDept: evaluationDeptList[0].name //预测评估单位
|
||||
}
|
||||
form.value.reporter = adminInfo.$state.name
|
||||
form.value.orgId = adminInfo.$state.deptName
|
||||
}
|
||||
@@ -301,24 +297,17 @@ const getInfo = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const open = () => {
|
||||
dialogFormVisible.value = true
|
||||
resetForm()
|
||||
getInfo()
|
||||
|
||||
}
|
||||
const close = () => {
|
||||
//重置表单内容
|
||||
resetForm()
|
||||
dialogFormVisible.value = false
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 上传报告
|
||||
const uploadRef = ref()
|
||||
const handleExceed: UploadProps['onExceed'] = files => {
|
||||
@@ -329,7 +318,7 @@ const handleExceed: UploadProps['onExceed'] = files => {
|
||||
}
|
||||
|
||||
//移除文件上传
|
||||
const removeFile = (file: any,uploadFiles:any) => {
|
||||
const removeFile = (file: any, uploadFiles: any) => {
|
||||
console.log(file, uploadFiles)
|
||||
}
|
||||
|
||||
@@ -343,29 +332,28 @@ const choose = (e: any) => {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//提交
|
||||
const confirmForm = () => {
|
||||
if(goToNetReport.value ==null ||goToNetReport.value ==''){
|
||||
if (goToNetReport.value == null || goToNetReport.value == '') {
|
||||
return ElMessage({
|
||||
message: '请上传报告',
|
||||
message: props.bussType == 0 ? '请上传入网设计方案审查报告' : '请上传治理工程验收报告',
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
let data = {
|
||||
let data = {
|
||||
type: props.bussType,
|
||||
userReportId: props.id,
|
||||
reportUrl: goToNetReport.value
|
||||
}
|
||||
submitGoNet(data).then((res:any) => {
|
||||
if(res.code==='A0000'){
|
||||
submitGoNet(data).then((res: any) => {
|
||||
if (res.code === 'A0000') {
|
||||
ElMessage({
|
||||
message: '新建流程成功',
|
||||
type: 'success'
|
||||
})
|
||||
emits("onSubmit")
|
||||
emits('onSubmit')
|
||||
close()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({ open })
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,349 +0,0 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="填报人">
|
||||
{{ detailData.reporter }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报日期">
|
||||
{{ formatDate(detailData.reportDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="填报部门">
|
||||
{{ detailData.orgName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="工程投产日期">
|
||||
{{ formatDate(detailData.expectedProductionDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属地市">
|
||||
{{ detailData.city }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="用户状态">
|
||||
{{
|
||||
userStateList.find(item => {
|
||||
return item.value == detailData.userStatus
|
||||
})?.label
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="工程名">
|
||||
{{ detailData.projectName }}
|
||||
</el-descriptions-item>
|
||||
<!--文件地址-->
|
||||
>
|
||||
<el-descriptions-item label="终端台账信息">
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
<a :href="proviteData?.preliminaryDesignDescription.url">
|
||||
{{ proviteData?.preliminaryDesignDescription.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监测点台账信息">
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
<a :href="proviteData?.predictionEvaluationReport.url">
|
||||
{{ proviteData?.predictionEvaluationReport.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="验收检验报告单">
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
<a :href="proviteData?.predictionEvaluationReviewOpinions.url">
|
||||
{{ proviteData?.predictionEvaluationReviewOpinions.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="验收检验报告">
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
<a :href="proviteData?.sensitiveDevices.url">{{ proviteData?.sensitiveDevices.name }}</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="型式实验报告">
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
<a :href="proviteData?.antiInterferenceReport.url">{{ proviteData?.antiInterferenceReport.name }}</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="出厂检验报告">
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
<a :href="proviteData?.powerQualityReport.url">{{ proviteData?.powerQualityReport.name }}</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="性能检测报告">
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
<a :href="proviteData?.antiInterferenceReport.url">{{ proviteData?.antiInterferenceReport.name }}</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="信息安全检测报告">
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
<a :href="proviteData?.powerQualityReport.url">{{ proviteData?.powerQualityReport.name }}</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="其他附件">
|
||||
<el-icon>
|
||||
<Link />
|
||||
</el-icon>
|
||||
<a :href="proviteData?.additionalAttachments.url">{{ proviteData?.additionalAttachments.name }}</a>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, reactive } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { getUserReportById } from '@/api/supervision-boot/userReport/form'
|
||||
import { getDictTreeById } from '@/api/system-boot/dictTree'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { Link } from '@element-plus/icons-vue'
|
||||
|
||||
defineOptions({ name: 'BpmUserReportDetail' })
|
||||
|
||||
const { query } = useRoute() // 查询参数
|
||||
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined)
|
||||
})
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData = ref<any>({}) // 详情数据
|
||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||
//用户性质数组
|
||||
const userTypeList = reactive([
|
||||
{
|
||||
label: '新建电网工程',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: '扩建电网工程',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '新建非线性负荷用户',
|
||||
value: '2'
|
||||
},
|
||||
{
|
||||
label: '扩建非线性负荷用户',
|
||||
value: '3'
|
||||
},
|
||||
{
|
||||
label: '新建新能源发电站',
|
||||
value: '4'
|
||||
},
|
||||
{
|
||||
label: '扩建新能源发电站',
|
||||
value: '5'
|
||||
},
|
||||
{
|
||||
label: '敏感及重要用户',
|
||||
value: '6'
|
||||
}
|
||||
])
|
||||
//用户状态数组
|
||||
const userStateList = reactive([
|
||||
{
|
||||
label: '可研',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: '建设',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '运行',
|
||||
value: '2'
|
||||
},
|
||||
{
|
||||
label: '退运',
|
||||
value: '3'
|
||||
}
|
||||
])
|
||||
const dictData = useDictData()
|
||||
//字典获取所属地市
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
//字典获取敏感电能质量指标
|
||||
const energyQualityIndexList = dictData.getBasicData('Indicator_Type')
|
||||
//字典获取行业类型
|
||||
const industryList = dictData.getBasicData('industry_type_jb')
|
||||
//字典电压等级
|
||||
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
//字典评估类型
|
||||
const evaluationTypeList = dictData.getBasicData('Evaluation_Type')
|
||||
//字典预测评估单位
|
||||
const evaluationDeptList = dictData.getBasicData('evaluation_dept')
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
await getUserReportById(props.id || queryId).then(res => {
|
||||
detailData.value = res.data
|
||||
getProviteData()
|
||||
})
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
const proviteData = ref()
|
||||
//判断userType选择取用的对象
|
||||
const getProviteData = async () => {
|
||||
if (detailData.value.userType == '0' || detailData.value.userType == '1') {
|
||||
proviteData.value = detailData.value.userReportProjectPO
|
||||
//查询非线性设备类型
|
||||
await getDictTreeById(proviteData.value.nonlinearDeviceType).then(res => {
|
||||
proviteData.value.nonlinearDeviceType = res.data?.name
|
||||
})
|
||||
} else if (
|
||||
detailData.value.userType == '2' ||
|
||||
detailData.value.userType == '3' ||
|
||||
detailData.value.userType == '4' ||
|
||||
detailData.value.userType == '5'
|
||||
) {
|
||||
proviteData.value = detailData.value.userReportSubstationPO
|
||||
//查询非线性负荷类型
|
||||
await getDictTreeById(proviteData.value.nonlinearLoadType).then(res => {
|
||||
proviteData.value.nonlinearLoadType = res.data?.name
|
||||
})
|
||||
} else {
|
||||
proviteData.value = detailData.value.userReportSensitivePO
|
||||
}
|
||||
//可研报告
|
||||
if (proviteData.value.feasibilityReport) {
|
||||
await getFileNamePath(proviteData.value.feasibilityReport, 'feasibilityReport')
|
||||
}
|
||||
//终端台账信息
|
||||
if (proviteData.value.preliminaryDesignDescription) {
|
||||
await getFileNamePath(proviteData.value.preliminaryDesignDescription, 'preliminaryDesignDescription')
|
||||
}
|
||||
//预测评估报告
|
||||
if (proviteData.value.predictionEvaluationReport) {
|
||||
await getFileNamePath(proviteData.value.predictionEvaluationReport, 'predictionEvaluationReport')
|
||||
}
|
||||
|
||||
//预测评估评审意见报告
|
||||
if (proviteData.value.predictionEvaluationReviewOpinions) {
|
||||
await getFileNamePath(
|
||||
proviteData.value.predictionEvaluationReviewOpinions,
|
||||
'predictionEvaluationReviewOpinions'
|
||||
)
|
||||
}
|
||||
//用户接入变电站主接线示意图
|
||||
if (proviteData.value.substationMainWiringDiagram) {
|
||||
await getFileNamePath(proviteData.value.substationMainWiringDiagram, 'substationMainWiringDiagram')
|
||||
}
|
||||
|
||||
//主要敏感设备清单
|
||||
if (proviteData.value.sensitiveDevices) {
|
||||
await getFileNamePath(proviteData.value.sensitiveDevices, 'sensitiveDevices')
|
||||
}
|
||||
|
||||
//抗扰度测试报告
|
||||
if (proviteData.value.antiInterferenceReport) {
|
||||
await getFileNamePath(proviteData.value.antiInterferenceReport, 'antiInterferenceReport')
|
||||
}
|
||||
|
||||
//背景电能质量测试报告
|
||||
if (proviteData.value.powerQualityReport) {
|
||||
await getFileNamePath(proviteData.value.powerQualityReport, 'powerQualityReport')
|
||||
}
|
||||
|
||||
//其他附件
|
||||
if (proviteData.value.additionalAttachments) {
|
||||
getFileNamePath(proviteData.value.additionalAttachments, 'additionalAttachments')
|
||||
}
|
||||
}
|
||||
//根据文件名请求
|
||||
const getFileNamePath = async (val: any, pathName: any) => {
|
||||
await getFileNameAndFilePath({ filePath: val }).then(res => {
|
||||
if (res.data && res.data.name && res.data.url) {
|
||||
//可研报告
|
||||
if (pathName == 'feasibilityReport' && proviteData.value.feasibilityReport) {
|
||||
proviteData.value.feasibilityReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//终端台账信息
|
||||
else if (pathName == 'preliminaryDesignDescription' && proviteData.value.preliminaryDesignDescription) {
|
||||
proviteData.value.preliminaryDesignDescription = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//预测评估报告
|
||||
else if (pathName == 'predictionEvaluationReport' && proviteData.value.predictionEvaluationReport) {
|
||||
proviteData.value.predictionEvaluationReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//预测评估评审意见报告
|
||||
else if (
|
||||
pathName == 'predictionEvaluationReviewOpinions' &&
|
||||
proviteData.value.predictionEvaluationReviewOpinions
|
||||
) {
|
||||
proviteData.value.predictionEvaluationReviewOpinions = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//用户接入变电站主接线示意图
|
||||
else if (pathName == 'substationMainWiringDiagram' && proviteData.value.substationMainWiringDiagram) {
|
||||
proviteData.value.substationMainWiringDiagram = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//主要敏感设备清单
|
||||
else if (pathName == 'sensitiveDevices' && proviteData.value.sensitiveDevices) {
|
||||
proviteData.value.sensitiveDevices = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//抗扰度测试报告
|
||||
else if (pathName == 'antiInterferenceReport' && proviteData.value.antiInterferenceReport) {
|
||||
proviteData.value.antiInterferenceReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//背景电能质量测试报告
|
||||
else if (pathName == 'powerQualityReport' && proviteData.value.powerQualityReport) {
|
||||
proviteData.value.powerQualityReport = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//其他附件
|
||||
else if (pathName == 'additionalAttachments' && proviteData.value.additionalAttachments) {
|
||||
proviteData.value.additionalAttachments = {
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.default-main {
|
||||
// height: calc(100vh - 100px);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
::v-deep.el-icon svg {
|
||||
margin: 5px !important;
|
||||
position: absolute !important;
|
||||
top: 20px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,217 +0,0 @@
|
||||
<!---终端入网检测-->
|
||||
<template>
|
||||
<TableHeader area datePicker ref="TableHeaderRef">
|
||||
<!-- <template #select>
|
||||
<el-form-item label="用户名称">
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属地市">
|
||||
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择所属地市">
|
||||
<el-option
|
||||
v-for="item in areaOptionList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template> -->
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
|
||||
<!-- 新增弹框 -->
|
||||
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
||||
</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 { useRouter } from 'vue-router'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||
import addForm from './addForm.vue'
|
||||
const dictData = useDictData()
|
||||
const { push } = useRouter()
|
||||
|
||||
const TableHeaderRef = ref()
|
||||
const tableRef = ref()
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
const ruleFormRef = ref()
|
||||
const show: any = ref(false)
|
||||
const fileList = ref([])
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/deVReport/list',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{ field: 'orgName', title: '填报部门名称' },
|
||||
{ field: 'reportDate', title: '填报日期'},
|
||||
{ field: 'reporter', title: '填报人', minWidth: 80 },
|
||||
{
|
||||
field: 'status',
|
||||
title: '审核状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{ field: 'monitoringTerminalName', title: '设备名称', minWidth: 170 },
|
||||
{ field: 'substation', title: '所属变电站', minWidth: 170 },
|
||||
// {
|
||||
// field: 'userType',
|
||||
// title: '用户性质',
|
||||
// minWidth: 150,
|
||||
// formatter: (obj: any) => {
|
||||
// const userType = obj.row.userType
|
||||
// return getUserTypeName(userType)
|
||||
// }
|
||||
// },
|
||||
|
||||
// { field: 'informationSecurityTestReport', title: '信息安全检测报告', minWidth: 170 },
|
||||
// { field: 'otherAttachments', title: '其他附件', minWidth: 170 },
|
||||
// { field: 'orgName', title: '填报部门名称'},
|
||||
// { field: 'performanceTestReport', title: '性能检测报告', minWidth: 170 },
|
||||
|
||||
// {
|
||||
// field: 'userStatus',
|
||||
// title: '用户状态',
|
||||
// minWidth: 100,
|
||||
// render: 'tag',
|
||||
// custom: {
|
||||
// 0: 'primary',
|
||||
// 1: 'primary',
|
||||
// 2: 'success',
|
||||
// 3: 'warning'
|
||||
// },
|
||||
// replaceValue: {
|
||||
// 0: '可研',
|
||||
// 1: '建设',
|
||||
// 2: '运行',
|
||||
// 3: '退运'
|
||||
// }
|
||||
// },
|
||||
// { field: 'substation', title: '变电站', minWidth: 100 },
|
||||
// { field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||
{
|
||||
title: '操作',
|
||||
minWidth: 150,
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
// tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||
}
|
||||
})
|
||||
|
||||
// tableStore.table.params.loadType = ''
|
||||
// tableStore.table.params.userName = ''
|
||||
// tableStore.table.params.fileUploadflag = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
const addForms = ref()
|
||||
const addFormModel = () => {
|
||||
setTimeout(() => {
|
||||
addForms.value.open()
|
||||
}, 0);
|
||||
|
||||
}
|
||||
|
||||
const exportEvent = () => {
|
||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||
form.pageNum = 1
|
||||
form.pageSize = tableStore.table.total
|
||||
getLoadTypeUserList(form).then(res => {
|
||||
tableRef.value.getRef().exportData({
|
||||
filename: '未建档非线性用户', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||
columnFilterMethod: function (column: any) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
id: instanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**获取用户性质*/
|
||||
const getUserTypeName = (userType: any) => {
|
||||
if (userType === 0) {
|
||||
return '新建电网工程'
|
||||
}
|
||||
if (userType === 1) {
|
||||
return '扩建电网工程'
|
||||
}
|
||||
if (userType === 2) {
|
||||
return '新建非线性负荷用户'
|
||||
}
|
||||
if (userType === 3) {
|
||||
return '扩建非线性负荷用户'
|
||||
}
|
||||
if (userType === 4) {
|
||||
return '新建新能源发电站'
|
||||
}
|
||||
if (userType === 5) {
|
||||
return '扩建新能源发电站'
|
||||
}
|
||||
if (userType === 6) {
|
||||
return '敏感及重要用户'
|
||||
}
|
||||
return '新建电网工程'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-upload-list__item) {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
::v-deep .el-input__wrapper {
|
||||
// width: 200px !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user