绘制 普测计划页面
This commit is contained in:
137
src/api/process-boot/generalTest.ts
Normal file
137
src/api/process-boot/generalTest.ts
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
import createAxios from '@/utils/request'
|
||||||
|
|
||||||
|
//查询普测计划-新建页面
|
||||||
|
export function queryPlan(data:any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/process-boot/rGeneralSurveyPlan/queryPlan',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//导出普测计划信息
|
||||||
|
export function exportSurveyPlan(data:any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/process-boot/rGeneralSurveyPlan/exportSurveyPlan',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//新增
|
||||||
|
export function getGeneratrixByCondition(data:any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/device-boot/pms/generatrixWire/getGeneratrixByCondition',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取变电站名称
|
||||||
|
export function getstatationStatList(data:any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/device-boot/pms/statationStat/getstatationStatList',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 新增-修改普测计划
|
||||||
|
export function addPlan(data:any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/process-boot/rGeneralSurveyPlan/addPlan',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询普测计划-审核页面
|
||||||
|
export function queryPlanAudit(data:any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/process-boot/rGeneralSurveyPlan/queryPlanAudit',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//查询普测计划-结果页面
|
||||||
|
export function queryPlanResult(data:any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/process-boot/rGeneralSurveyPlan/queryPlanResult',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//下载普测结果报告
|
||||||
|
export function surveyResultDownload(data:any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/process-boot/rGeneralSurveyPlan/surveyResultDownload?planNo=' + data.planNo,
|
||||||
|
method: 'post'
|
||||||
|
// responseType: 'blob',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//下载
|
||||||
|
export function downLoadData(data:any) {
|
||||||
|
return createAxios({
|
||||||
|
url: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function MultipartFile(data:any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/process-boot/rGeneralSurveyPlan/surveyResultUpload',
|
||||||
|
method: 'post',
|
||||||
|
headers: { 'Content-Type': 'multipart/form-data' }, //多文件上传这一句必须加
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function initDetpStataionTree(data:any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/process-boot/rGeneralSurveyPlan/initDetpStataionTree',
|
||||||
|
method: 'post',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 普测计划-审核
|
||||||
|
export function checkPlanAudit(data:any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/process-boot/rGeneralSurveyPlan/checkPlanAudit',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 普测计划-审核
|
||||||
|
export function queryPlanConfig(data:any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/process-boot/rGeneralSurveyPlan/queryPlanConfig',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 增加普测计划参数
|
||||||
|
export function addPlanConfig(data:any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/process-boot/rGeneralSurveyPlan/addPlanConfig',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 电站勾选接口
|
||||||
|
export function querySubStatation(data:any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/process-boot/rGeneralSurveyPlan/querySubStatation',
|
||||||
|
method: 'post',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 设置普测周期
|
||||||
|
export function addPlanCycle(data:any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/process-boot/rGeneralSurveyPlan/addPlanCycle',
|
||||||
|
method: 'post',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 批量提交审核
|
||||||
|
export function planStatus(data:any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/process-boot/rGeneralSurveyPlan/planStatus',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
75
src/components/tree/pqs/generalTestTree.vue
Normal file
75
src/components/tree/pqs/generalTestTree.vue
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<template>
|
||||||
|
<div class="point-tree">
|
||||||
|
<div style="flex: 1; overflow: hidden">
|
||||||
|
<vxe-table
|
||||||
|
ref="tableRef"
|
||||||
|
:data="tree"
|
||||||
|
height="auto"
|
||||||
|
v-bind="defaultAttribute"
|
||||||
|
:tree-config="{ children: 'children', expandAll: true }"
|
||||||
|
>
|
||||||
|
<vxe-column field="name" align="left" title="部门" tree-node></vxe-column>
|
||||||
|
<vxe-column width="200" title="操作">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button type="primary" size="small" link @click="tactics(row.id, 0)">自动</el-button>
|
||||||
|
<el-button type="primary" size="small" link @click="tactics(row.id, 1)">手动</el-button>
|
||||||
|
<el-button type="primary" size="small" link @click="tactics(row.id, 2)">排除</el-button>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
</vxe-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { nextTick, onMounted, ref, useAttrs } from 'vue'
|
||||||
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
|
import { ElTree } from 'element-plus'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
import { initDetpStataionTree } from '@/api/process-boot/generalTest'
|
||||||
|
|
||||||
|
import { useConfig } from '@/stores/config'
|
||||||
|
|
||||||
|
const emit = defineEmits(['tactics'])
|
||||||
|
const attrs = useAttrs()
|
||||||
|
const defaultProps = {
|
||||||
|
label: 'name',
|
||||||
|
value: 'id'
|
||||||
|
}
|
||||||
|
const dictData = useDictData()
|
||||||
|
const config = useConfig()
|
||||||
|
const tree = ref()
|
||||||
|
const treeRef = ref()
|
||||||
|
|
||||||
|
const loadData = () => {
|
||||||
|
let nodeKey = ''
|
||||||
|
|
||||||
|
initDetpStataionTree({ orgId: dictData.state.area[0].id }).then(res => {
|
||||||
|
tree.value = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const tactics = (deptId, grade) => {
|
||||||
|
emit('tactics', deptId, grade)
|
||||||
|
}
|
||||||
|
loadData()
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.point-tree {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid var(--el-border-color);
|
||||||
|
}
|
||||||
|
.custom {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
padding-right: 20px;
|
||||||
|
// font-size: 14px;
|
||||||
|
// padding-right: 8px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
133
src/views/pqs/supervise/harmonicSurvey/components/planAdd.vue
Normal file
133
src/views/pqs/supervise/harmonicSurvey/components/planAdd.vue
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
.
|
||||||
|
<template>
|
||||||
|
<el-dialog :title="title" v-model="planAddition" width="950px" :before-close="cancelFn">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-divider content-position="left">基本信息</el-divider>
|
||||||
|
<el-form :inline="true" :model="formdata" :disabled="title == '编辑计划'" label-width="120px">
|
||||||
|
<el-form-item label="普测负责单位:">
|
||||||
|
<el-input v-model="formdata.orgName" class="formW" disabled></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="计划开始时间:">
|
||||||
|
<el-date-picker
|
||||||
|
v-model.trim="formdata.planStartTime"
|
||||||
|
type="date"
|
||||||
|
style="width: 240px"
|
||||||
|
placeholder="选择计划开始时间"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="计划结束时间:">
|
||||||
|
<el-date-picker
|
||||||
|
v-model.trim="formdata.planEndTime"
|
||||||
|
type="date"
|
||||||
|
style="width: 240px"
|
||||||
|
placeholder="选择计划结束时间"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="普测计划编号:">
|
||||||
|
<el-input
|
||||||
|
:disabled="title == '普测计划修改'"
|
||||||
|
v-model="formdata.planNo"
|
||||||
|
class="formW"
|
||||||
|
placeholder="请输入普测计划编号"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="计划名称:">
|
||||||
|
<el-input v-model="formdata.planName" placeholder="请输入计划名称" class="formW"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="测试负责人:">
|
||||||
|
<el-input v-model="formdata.leader" placeholder="请输入测试负责人" class="formW"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="14">
|
||||||
|
<el-divider content-position="left" style="font-size: 18px; font-weight: bolder">添加电站</el-divider>
|
||||||
|
<!-- <div class="mb10" style="display: flex" v-if="!viewDetails">
|
||||||
|
<el-input
|
||||||
|
v-model="input"
|
||||||
|
placeholder="请输入电站数"
|
||||||
|
class="formW"
|
||||||
|
@input="handleEdit"
|
||||||
|
class="mr10"
|
||||||
|
></el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
:disabled="!input.length > 0"
|
||||||
|
icon="el-icon-circle-check"
|
||||||
|
size="small"
|
||||||
|
@click="Tick"
|
||||||
|
>
|
||||||
|
按配置勾选
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<el-tree
|
||||||
|
:data="treeData"
|
||||||
|
show-checkbox
|
||||||
|
node-key="id"
|
||||||
|
style="overflow-y: auto; height: 490px"
|
||||||
|
default-expand-all
|
||||||
|
:props="defaultProps"
|
||||||
|
:check-strictly="true"
|
||||||
|
ref="tree"
|
||||||
|
></el-tree> -->
|
||||||
|
<generalTestTree />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<!-- <el-divider
|
||||||
|
v-if="title == '计划详情' && formdata.status == 2 && formdata.status == 3"
|
||||||
|
content-position="left"
|
||||||
|
style="font-size: 18px; font-weight: bolder"
|
||||||
|
>
|
||||||
|
审核意见
|
||||||
|
</el-divider>
|
||||||
|
<el-input
|
||||||
|
v-if="title == '计划详情' && formdata.status == 2 && formdata.status == 3"
|
||||||
|
disabled
|
||||||
|
type="textarea"
|
||||||
|
:rows="2"
|
||||||
|
v-model="textarea"
|
||||||
|
></el-input> -->
|
||||||
|
<div slot="footer" style="display: flex; justify-content: center">
|
||||||
|
<el-button type="primary" size="small" class="ml20" @click="submitFn">提交</el-button>
|
||||||
|
<el-button type="primary" size="small" class="ml20" @click="cancelFn">取消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import generalTestTree from '@/components/tree/pqs/generalTestTree.vue'
|
||||||
|
import { ref, reactive } from 'vue'
|
||||||
|
const title = ref('')
|
||||||
|
const planAddition = ref(false)
|
||||||
|
|
||||||
|
const formdata = ref({
|
||||||
|
orgName: '',
|
||||||
|
orgNo: '',
|
||||||
|
planStartTime: '',
|
||||||
|
planEndTime: '',
|
||||||
|
planNo: '',
|
||||||
|
planName: '',
|
||||||
|
leader: '',
|
||||||
|
rgeneralSurveyPlanDetailAddParm: [],
|
||||||
|
subCount: '',
|
||||||
|
busCount: ''
|
||||||
|
})
|
||||||
|
const cancelFn = () => {
|
||||||
|
planAddition.value = false
|
||||||
|
}
|
||||||
|
// 提交
|
||||||
|
const submitFn = () => {}
|
||||||
|
|
||||||
|
const open = (text: string) => {
|
||||||
|
title.value = text
|
||||||
|
planAddition.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({ open })
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.formW {
|
||||||
|
width: 240px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<TableHeader area datePicker ref="TableHeaderRef">
|
<TableHeader area datePicker ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label=" 计划状态">
|
<el-form-item label=" 计划状态">
|
||||||
<el-select v-model="tableStore.table.params.searchState" placeholder="请选择 计划状态">
|
<el-select v-model="tableStore.table.params.status" placeholder="请选择 计划状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in planstatus"
|
v-for="item in planstatus"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -19,100 +19,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<!-- 新增弹窗 -->
|
<!-- 新增 -->
|
||||||
<el-dialog :title="title" v-model="planAddition" width="950px" :before-close="cancelFn">
|
<planAdd ref="planAddRef"/>
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="10">
|
|
||||||
<el-divider content-position="left">基本信息</el-divider>
|
|
||||||
<el-form :inline="true" :model="formdata" :disabled="viewDetails" label-width="120px">
|
|
||||||
<el-form-item label="普测负责单位:">
|
|
||||||
<el-input v-model="formdata.orgName" class="formW" disabled></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="计划开始时间:">
|
|
||||||
<el-date-picker
|
|
||||||
v-model.trim="formdata.planStartTime"
|
|
||||||
type="date"
|
|
||||||
style="width: 240px"
|
|
||||||
placeholder="选择计划开始时间"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
></el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="计划结束时间:">
|
|
||||||
<el-date-picker
|
|
||||||
v-model.trim="formdata.planEndTime"
|
|
||||||
type="date"
|
|
||||||
style="width: 240px"
|
|
||||||
placeholder="选择计划结束时间"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
></el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="普测计划编号:">
|
|
||||||
<el-input
|
|
||||||
:disabled="title == '普测计划修改'"
|
|
||||||
v-model="formdata.planNo"
|
|
||||||
class="formW"
|
|
||||||
placeholder="请输入普测计划编号"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="计划名称:">
|
|
||||||
<el-input v-model="formdata.planName" placeholder="请输入计划名称" class="formW"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="测试负责人:">
|
|
||||||
<el-input v-model="formdata.leader" placeholder="请输入测试负责人" class="formW"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="14">
|
|
||||||
<el-divider content-position="left" style="font-size: 18px; font-weight: bolder">添加电站</el-divider>
|
|
||||||
<!-- <div class="mb10" style="display: flex" v-if="!viewDetails">
|
|
||||||
<el-input
|
|
||||||
v-model="input"
|
|
||||||
placeholder="请输入电站数"
|
|
||||||
class="formW"
|
|
||||||
@input="handleEdit"
|
|
||||||
class="mr10"
|
|
||||||
></el-input>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
:disabled="!input.length > 0"
|
|
||||||
icon="el-icon-circle-check"
|
|
||||||
size="small"
|
|
||||||
@click="Tick"
|
|
||||||
>
|
|
||||||
按配置勾选
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
<el-tree
|
|
||||||
:data="treeData"
|
|
||||||
show-checkbox
|
|
||||||
node-key="id"
|
|
||||||
style="overflow-y: auto; height: 490px"
|
|
||||||
default-expand-all
|
|
||||||
:props="defaultProps"
|
|
||||||
:check-strictly="true"
|
|
||||||
ref="tree"
|
|
||||||
></el-tree> -->
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<!-- <el-divider
|
|
||||||
v-if="title == '计划详情' && formdata.status == 2 && formdata.status == 3"
|
|
||||||
content-position="left"
|
|
||||||
style="font-size: 18px; font-weight: bolder"
|
|
||||||
>
|
|
||||||
审核意见
|
|
||||||
</el-divider>
|
|
||||||
<el-input
|
|
||||||
v-if="title == '计划详情' && formdata.status == 2 && formdata.status == 3"
|
|
||||||
disabled
|
|
||||||
type="textarea"
|
|
||||||
:rows="2"
|
|
||||||
v-model="textarea"
|
|
||||||
></el-input> -->
|
|
||||||
<div slot="footer" style="display: flex; justify-content: center" v-if="!viewDetails">
|
|
||||||
<el-button type="primary" size="small" class="ml20" @click="submitFn">提交</el-button>
|
|
||||||
<el-button type="primary" size="small" class="ml20" @click="cancelFn">取消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
@@ -120,54 +28,37 @@ import TableStore from '@/utils/tableStore'
|
|||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import planAdd from './planAdd.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
|
||||||
|
|
||||||
|
import { initDetpStataionTree } from '@/api/process-boot/generalTest'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const planstatus = [
|
const planstatus = [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
value: '选项1',
|
name: '新建'
|
||||||
label: '新建'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
value: '选项1',
|
name: '待审核'
|
||||||
label: '待审核'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
value: '选项1',
|
name: '未通过'
|
||||||
label: '未通过'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
value: '选项1',
|
name: '已发布'
|
||||||
label: '已发布'
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const formdata = ref({
|
|
||||||
orgName: '',
|
|
||||||
orgNo: '',
|
|
||||||
planStartTime: '',
|
|
||||||
planEndTime: '',
|
|
||||||
planNo: '',
|
|
||||||
planName: '',
|
|
||||||
leader: '',
|
|
||||||
rgeneralSurveyPlanDetailAddParm: [],
|
|
||||||
subCount: '',
|
|
||||||
busCount: ''
|
|
||||||
})
|
|
||||||
|
|
||||||
const planAddition = ref(false)
|
const planAddition = ref(false)
|
||||||
const viewDetails = ref(false)
|
const planAddRef = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const title = ref('')
|
|
||||||
|
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/system-boot/area/areaSelect',
|
url: '/process-boot/rGeneralSurveyPlan/queryPlan',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
@@ -211,33 +102,24 @@ const tableStore = new TableStore({
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
beforeSearchFun: () => {
|
||||||
loadCallback: () => {
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.data = [
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
{
|
},
|
||||||
status: 2
|
loadCallback: () => {}
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.searchState = ''
|
tableStore.table.params.status = ''
|
||||||
tableStore.table.params.searchValue = ''
|
|
||||||
tableStore.table.params.type = ''
|
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
// 新增计划
|
// 新增计划
|
||||||
const add = () => {
|
const add = () => {
|
||||||
title.value = '普测计划新增'
|
// title.value = '普测计划新增'
|
||||||
|
planAddRef.value.open('普测计划新增')
|
||||||
planAddition.value = true
|
planAddition.value = true
|
||||||
}
|
}
|
||||||
// 提交
|
|
||||||
const submitFn = () => {}
|
|
||||||
// 取消
|
// 取消
|
||||||
const cancelFn = () => {
|
|
||||||
planAddition.value = false
|
|
||||||
viewDetails.value = false
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
@@ -245,7 +127,5 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.formW {
|
|
||||||
width: 240px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -68,8 +68,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<!-- 上传检测报告 -->
|
<!-- 上传检测报告 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="上传检测报告__支持批量上传"
|
title="上传检测报告__支持批量上传"
|
||||||
v-model="showBatchUpload"
|
v-model="showBatchUpload"
|
||||||
width="30%"
|
width="30%"
|
||||||
@@ -87,7 +87,9 @@
|
|||||||
ref="upload"
|
ref="upload"
|
||||||
>
|
>
|
||||||
<el-button type="primary" icon="el-icon-Upload">选择文件</el-button>
|
<el-button type="primary" icon="el-icon-Upload">选择文件</el-button>
|
||||||
<span :style="`color:#f58003`"> (*传入的检测报告文件格式(终端编号-检测报告(yyyy-MM-dd).docx))</span>
|
<span :style="`color:#f58003`">
|
||||||
|
(*传入的检测报告文件格式(终端编号-检测报告(yyyy-MM-dd).docx))
|
||||||
|
</span>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="handleClose">取 消</el-button>
|
<el-button @click="handleClose">取 消</el-button>
|
||||||
@@ -103,7 +105,7 @@ import TableStore from '@/utils/tableStore'
|
|||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { DownloadExport, reportDownload, batchTerminal, delTerminal ,importReport} from '@/api/process-boot/terminal'
|
import { DownloadExport, reportDownload, batchTerminal, importReport } from '@/api/process-boot/terminal'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
@@ -121,7 +123,6 @@ const testResultsList = [
|
|||||||
|
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const showBatchUpload = ref(false)
|
const showBatchUpload = ref(false)
|
||||||
const ruleFormRef = ref()
|
|
||||||
const fileList: any = ref([])
|
const fileList: any = ref([])
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/process-boot/process/pmsTerminalDetection/getTerminalPage',
|
url: '/process-boot/process/pmsTerminalDetection/getTerminalPage',
|
||||||
@@ -138,7 +139,13 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
{ field: 'installPlace', title: '安装位置' },
|
{ field: 'installPlace', title: '安装位置' },
|
||||||
{ field: 'inspectionUnit', title: '送检单位' },
|
{ field: 'inspectionUnit', title: '送检单位' },
|
||||||
{ field: 'testResults', title: '检测结果' },
|
{
|
||||||
|
field: 'testResults',
|
||||||
|
title: '检测结果',
|
||||||
|
formatter(row: any) {
|
||||||
|
return row.cellValue == 0 ? '未展开' : '已展开'
|
||||||
|
}
|
||||||
|
},
|
||||||
{ field: 'nextInspectionTime', title: '下次检测时间' },
|
{ field: 'nextInspectionTime', title: '下次检测时间' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
@@ -146,32 +153,6 @@ const tableStore = new TableStore({
|
|||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
|
||||||
name: 'edit',
|
|
||||||
title: '编辑',
|
|
||||||
type: 'primary',
|
|
||||||
icon: 'el-icon-EditPen',
|
|
||||||
render: 'basicButton',
|
|
||||||
click: row => {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '删除',
|
|
||||||
type: 'danger',
|
|
||||||
icon: 'el-icon-Delete',
|
|
||||||
render: 'confirmButton',
|
|
||||||
popconfirm: {
|
|
||||||
confirmButtonText: '确认',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
confirmButtonType: 'danger',
|
|
||||||
title: '确定删除吗?'
|
|
||||||
},
|
|
||||||
click: row => {
|
|
||||||
delTerminal([row.id]).then(() => {
|
|
||||||
ElMessage.success('删除成功')
|
|
||||||
tableStore.index()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '下载原始数据报告',
|
title: '下载原始数据报告',
|
||||||
@@ -215,7 +196,7 @@ provide('tableStore', tableStore)
|
|||||||
const onsubmit = () => {}
|
const onsubmit = () => {}
|
||||||
// 下载模版
|
// 下载模版
|
||||||
const Export = () => {
|
const Export = () => {
|
||||||
DownloadExport().then(res => {
|
DownloadExport().then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
@@ -233,7 +214,7 @@ const download = (row: any, type: number) => {
|
|||||||
reportDownload({
|
reportDownload({
|
||||||
id: row.id,
|
id: row.id,
|
||||||
type: type
|
type: type
|
||||||
}).then(res => {
|
}).then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||||
})
|
})
|
||||||
@@ -273,12 +254,12 @@ const UploadOriginal = () => {
|
|||||||
// 上传
|
// 上传
|
||||||
const BatchUpload = () => {
|
const BatchUpload = () => {
|
||||||
let form = new FormData()
|
let form = new FormData()
|
||||||
form.append('type', 1)
|
form.append('type', '1')
|
||||||
fileList.value.forEach(item => {
|
fileList.value.forEach((item: any) => {
|
||||||
form.append('files', item.raw)
|
form.append('files', item.raw)
|
||||||
})
|
})
|
||||||
importReport(form)
|
importReport(form)
|
||||||
.then(res => {
|
.then((res: any) => {
|
||||||
if (res.type == 'application/json') {
|
if (res.type == 'application/json') {
|
||||||
ElMessage.success('上传成功!')
|
ElMessage.success('上传成功!')
|
||||||
handleClose()
|
handleClose()
|
||||||
@@ -296,7 +277,7 @@ const chooseBatch = (e: any) => {
|
|||||||
fileList.value.push(e)
|
fileList.value.push(e)
|
||||||
}
|
}
|
||||||
const handleRemove = (e: any) => {
|
const handleRemove = (e: any) => {
|
||||||
fileList.value = fileList.value.filter(item => item.uid !== e.uid)
|
fileList.value = fileList.value.filter((item: any) => item.uid !== e.uid)
|
||||||
}
|
}
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
fileList.value = []
|
fileList.value = []
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ const tableStore = new TableStore({
|
|||||||
data: ['日检测终端数量']
|
data: ['日检测终端数量']
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
data: tableStore.table.data.dateStatistics.map(item => item.statisticsDate)
|
data: tableStore.table.data.dateStatistics.map((item:any) => item.statisticsDate)
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: '台'
|
name: '台'
|
||||||
@@ -38,7 +38,7 @@ const tableStore = new TableStore({
|
|||||||
name: '日检测终端数量',
|
name: '日检测终端数量',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
|
|
||||||
data: tableStore.table.data.dateStatistics.map(item => item.count)
|
data: tableStore.table.data.dateStatistics.map((item:any) => item.count)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,7 @@ const tableStore = new TableStore({
|
|||||||
data: ['检测终端数量']
|
data: ['检测终端数量']
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
data: tableStore.table.data.orgStatistics.map(item => item.orgName)
|
data: tableStore.table.data.orgStatistics.map((item:any) => item.orgName)
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: '台'
|
name: '台'
|
||||||
@@ -57,7 +57,7 @@ const tableStore = new TableStore({
|
|||||||
name: '检测终端数量',
|
name: '检测终端数量',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
|
|
||||||
data: tableStore.table.data.orgStatistics.map(item => item.count)
|
data: tableStore.table.data.orgStatistics.map((item:any) => item.count)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ const add = () => {
|
|||||||
|
|
||||||
// 下载模版
|
// 下载模版
|
||||||
const Export = () => {
|
const Export = () => {
|
||||||
DownloadExport().then(res => {
|
DownloadExport().then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
@@ -269,7 +269,7 @@ const download = (row: any, type: number) => {
|
|||||||
reportDownload({
|
reportDownload({
|
||||||
id: row.id,
|
id: row.id,
|
||||||
type: type
|
type: type
|
||||||
}).then(res => {
|
}).then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||||
})
|
})
|
||||||
@@ -327,12 +327,12 @@ const UploadOriginal = () => {
|
|||||||
// 上传
|
// 上传
|
||||||
const BatchUpload = () => {
|
const BatchUpload = () => {
|
||||||
let form = new FormData()
|
let form = new FormData()
|
||||||
form.append('type', 0)
|
form.append('type', '0')
|
||||||
fileList.value.forEach(item => {
|
fileList.value.forEach((item: any) => {
|
||||||
form.append('files', item.raw)
|
form.append('files', item.raw)
|
||||||
})
|
})
|
||||||
importReport(form)
|
importReport(form)
|
||||||
.then(res => {
|
.then((res: any) => {
|
||||||
if (res.type == 'application/json') {
|
if (res.type == 'application/json') {
|
||||||
ElMessage.success('上传成功!')
|
ElMessage.success('上传成功!')
|
||||||
handleClose()
|
handleClose()
|
||||||
@@ -350,7 +350,7 @@ const chooseBatch = (e: any) => {
|
|||||||
fileList.value.push(e)
|
fileList.value.push(e)
|
||||||
}
|
}
|
||||||
const handleRemove = (e: any) => {
|
const handleRemove = (e: any) => {
|
||||||
fileList.value = fileList.value.filter(item => item.uid !== e.uid)
|
fileList.value = fileList.value.filter((item: any) => item.uid !== e.uid)
|
||||||
}
|
}
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
fileList.value = []
|
fileList.value = []
|
||||||
|
|||||||
Reference in New Issue
Block a user