联调 普测
This commit is contained in:
@@ -18,9 +18,9 @@ export function exportSurveyPlan(data: any) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
//删除普测计划
|
//删除普测计划
|
||||||
export function deletePlan(data: any) {
|
export function removeSurvey(data: any) {
|
||||||
return createAxios({
|
return createAxios({
|
||||||
url: '/process-boot/rGeneralSurveyPlan/deletePlan',
|
url: '/supervision-boot/generalSurvey/removeSurvey',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data,
|
data,
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ export function MultipartFile(data: any) {
|
|||||||
}
|
}
|
||||||
export function initDetpStataionTree(data: any) {
|
export function initDetpStataionTree(data: any) {
|
||||||
return createAxios({
|
return createAxios({
|
||||||
url: '/process-boot/rGeneralSurveyPlan/initDetpStataionTree',
|
url: '/supervision-boot/generalSurvey/initDetpStataionTree',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
@@ -144,3 +144,11 @@ export function submitAuditUser(data: any) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 新增普测计划
|
||||||
|
export function addSurvey(data: any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/supervision-boot/generalSurvey/addSurvey',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,18 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="point-tree">
|
<div class="point-tree">
|
||||||
<div v-if="defaultProps.disabled != 'flag'">
|
|
||||||
<el-input
|
|
||||||
v-model="input"
|
|
||||||
style="width: 240px"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入电站数"
|
|
||||||
class="mr10"
|
|
||||||
@input="handleEdit"
|
|
||||||
></el-input>
|
|
||||||
<el-button type="primary" :disabled="!input.length > 0" icon="el-icon-Operation" @click="Tick">
|
|
||||||
按配置勾选
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
<el-tree
|
<el-tree
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
style="height: 550px; overflow-y: auto; overflow-x: hidden"
|
style="height: 550px; overflow-y: auto; overflow-x: hidden"
|
||||||
@@ -69,7 +56,7 @@ const setKey = (key: any, text?: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ treeRef, setKey, loadData })
|
defineExpose({ treeRef, setKey, loadData })
|
||||||
loadData()
|
// loadData()
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.point-tree {
|
.point-tree {
|
||||||
|
|||||||
@@ -60,7 +60,9 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
|
|||||||
// config.baseURL='/hzj'
|
// config.baseURL='/hzj'
|
||||||
// }
|
// }
|
||||||
// 取消重复请求
|
// 取消重复请求
|
||||||
removePending(config)
|
|
||||||
|
if (config.url != '/system-boot/file/upload') removePending(config)
|
||||||
|
|
||||||
options.CancelDuplicateRequest && addPending(config)
|
options.CancelDuplicateRequest && addPending(config)
|
||||||
// 创建loading实例
|
// 创建loading实例
|
||||||
if (options.loading) {
|
if (options.loading) {
|
||||||
@@ -255,7 +257,7 @@ export function baseRequest(url, value = {}, method = 'post', options = {}) {
|
|||||||
}
|
}
|
||||||
// 模块内的请求, 会自动加上模块的前缀
|
// 模块内的请求, 会自动加上模块的前缀
|
||||||
export const moduleRequest =
|
export const moduleRequest =
|
||||||
(moduleUrl) =>
|
moduleUrl =>
|
||||||
(url, ...arg) => {
|
(url, ...arg) => {
|
||||||
return baseRequest(moduleUrl + url, ...arg)
|
return baseRequest(moduleUrl + url, ...arg)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
.
|
|
||||||
<template>
|
<template>
|
||||||
<el-dialog draggable :title="title" v-model="planAddition" width="950px" :before-close="cancelFn">
|
<el-dialog draggable :title="title" v-model="planAddition" width="950px" :before-close="cancelFn">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
@@ -15,6 +14,9 @@
|
|||||||
<el-form-item label="普测负责单位:">
|
<el-form-item label="普测负责单位:">
|
||||||
<Area v-model="formdata.orgNo" disabled />
|
<Area v-model="formdata.orgNo" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="计划名称:" prop="planName">
|
||||||
|
<el-input v-model="formdata.planName" placeholder="请输入计划名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="计划开始时间:" prop="planStartTime">
|
<el-form-item label="计划开始时间:" prop="planStartTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="formdata.planStartTime"
|
v-model="formdata.planStartTime"
|
||||||
@@ -31,31 +33,53 @@
|
|||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="普测计划编号:" prop="planNo">
|
<el-form-item label="实际完成时间:" prop="planComplateTime">
|
||||||
<el-input
|
<el-date-picker
|
||||||
:disabled="title == '编辑计划'"
|
v-model="formdata.planComplateTime"
|
||||||
v-model="formdata.planNo"
|
type="date"
|
||||||
placeholder="请输入普测计划编号"
|
placeholder="选择实际完成时间"
|
||||||
></el-input>
|
value-format="YYYY-MM-DD"
|
||||||
</el-form-item>
|
></el-date-picker>
|
||||||
<el-form-item label="计划名称:" prop="planName">
|
|
||||||
<el-input v-model="formdata.planName" placeholder="请输入计划名称"></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="测试负责人:" prop="leader">
|
<el-form-item label="测试负责人:" prop="leader">
|
||||||
<el-input v-model="formdata.leader" placeholder="请输入测试负责人"></el-input>
|
<el-input v-model="formdata.leader" placeholder="请输入测试负责人"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form :model="formdata">
|
||||||
|
<el-form-item label="上传文件:">
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="formdata.fileList"
|
||||||
|
v-if="title != '查看计划'"
|
||||||
|
ref="upload"
|
||||||
|
action=""
|
||||||
|
:limit="5"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
<div v-else>
|
||||||
|
<div v-for="(item, index) in aList">
|
||||||
|
<el-button type="primary" link @click="downloadFile(item.url, item.fileName)">
|
||||||
|
{{ item.fileName }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<el-divider content-position="left" style="font-size: 18px; font-weight: bolder">添加电站</el-divider>
|
<el-divider content-position="left" style="font-size: 18px; font-weight: bolder">添加电站</el-divider>
|
||||||
|
|
||||||
<generalTestTree ref="treeRef" />
|
<generalTestTree ref="treeRef" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
(title == '查看计划' || title == '计划审核') &&
|
(title == '查看计划' || title == '计划审核') &&
|
||||||
(title == '计划审核' || formdata.status == 1 || formdata.status == 2 || formdata.status == 3)
|
(title == '计划审核' || formdata.status == 1 || formdata.status == 3 || formdata.status == 4)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<el-divider content-position="left" style="font-size: 18px; font-weight: bolder">审核意见</el-divider>
|
<el-divider content-position="left" style="font-size: 18px; font-weight: bolder">审核意见</el-divider>
|
||||||
@@ -66,17 +90,10 @@
|
|||||||
v-model="formdata.checkComment"
|
v-model="formdata.checkComment"
|
||||||
></el-input>
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
<template #footer v-if="title != '查看计划' && title != '计划审核'">
|
<template #footer v-if="title != '查看计划'">
|
||||||
<div>
|
<div class="dialog-footer pd10">
|
||||||
<el-button type="primary" @click="submitFn">提交</el-button>
|
<el-button type="primary" @click="submitFn">提交</el-button>
|
||||||
<el-button type="primary" @click="cancelFn">取消</el-button>
|
<el-button @click="cancelFn">取消</el-button>
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template #footer v-if="title == '计划审核'">
|
|
||||||
<div>
|
|
||||||
<el-button type="primary" @click="pass(true)">通过</el-button>
|
|
||||||
<el-button type="primary" @click="pass(false)">不通过</el-button>
|
|
||||||
<el-button type="primary" @click="cancelFn">取消</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -84,9 +101,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import generalTestTree from '@/components/tree/pqs/generalTestTree.vue'
|
import generalTestTree from '@/components/tree/pqs/generalTestTree.vue'
|
||||||
import { ref, reactive, nextTick } from 'vue'
|
import { ref, reactive, nextTick } from 'vue'
|
||||||
import { addPlan, checkPlanAudit } from '@/api/process-boot/generalTest'
|
import { addSurvey } from '@/api/process-boot/generalTest'
|
||||||
import Area from '@/components/form/area/index.vue'
|
import Area from '@/components/form/area/index.vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage, UploadProps } from 'element-plus'
|
||||||
|
import { uploadFile, getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
const emit = defineEmits(['onsubmit'])
|
const emit = defineEmits(['onsubmit'])
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
@@ -98,21 +116,24 @@ const formdata: any = ref({
|
|||||||
orgNo: dictData.state.area[0].id,
|
orgNo: dictData.state.area[0].id,
|
||||||
planStartTime: '',
|
planStartTime: '',
|
||||||
planEndTime: '',
|
planEndTime: '',
|
||||||
planNo: '',
|
planComplateTime: '',
|
||||||
planName: '',
|
planName: '',
|
||||||
leader: '',
|
leader: '',
|
||||||
rgeneralSurveyPlanDetailAddParm: [],
|
rgeneralSurveyPlanDetailAddParm: [],
|
||||||
subCount: '',
|
subCount: '',
|
||||||
busCount: '',
|
busCount: '',
|
||||||
subIds: [],
|
subIds: [],
|
||||||
checkComment: ''
|
fileList: [],
|
||||||
|
checkComment: '',
|
||||||
|
filePath: ''
|
||||||
})
|
})
|
||||||
|
const aList: any = ref([])
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const treeRef = ref()
|
const treeRef = ref()
|
||||||
const rules = {
|
const rules = {
|
||||||
planStartTime: [{ required: true, message: '选择计划开始时间', trigger: 'change' }],
|
planStartTime: [{ required: true, message: '选择计划开始时间', trigger: 'change' }],
|
||||||
planEndTime: [{ required: true, message: '选择计划结束时间', trigger: 'change' }],
|
planEndTime: [{ required: true, message: '选择计划结束时间', trigger: 'change' }],
|
||||||
planNo: [{ required: true, message: '请输入普测计划编号', trigger: 'blur' }],
|
planComplateTime: [{ required: true, message: '选择实际完成时间 ', trigger: 'change' }],
|
||||||
planName: [{ required: true, message: '请输入计划名称', trigger: 'blur' }],
|
planName: [{ required: true, message: '请输入计划名称', trigger: 'blur' }],
|
||||||
leader: [{ required: true, message: '请输入测试负责人', trigger: 'blur' }]
|
leader: [{ required: true, message: '请输入测试负责人', trigger: 'blur' }]
|
||||||
}
|
}
|
||||||
@@ -123,29 +144,30 @@ const cancelFn = () => {
|
|||||||
}
|
}
|
||||||
// 提交
|
// 提交
|
||||||
const submitFn = () => {
|
const submitFn = () => {
|
||||||
formRef.value.validate((valid: any) => {
|
formRef.value.validate(async (valid: any) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
formdata.value.subIds = treeRef.value.treeRef.getCheckedKeys(false)
|
let filePath = ''
|
||||||
addPlan(formdata.value).then((res: any) => {
|
formdata.value.subIds = ['123', '3123'] //treeRef.value.treeRef.getCheckedKeys(false)
|
||||||
|
for (let i = 0; i < formdata.value.fileList.length; i++) {
|
||||||
|
await uploadFile(formdata.value.fileList[i].raw, 'supervision/').then(res => {
|
||||||
|
filePath = filePath + res.data.name + ','
|
||||||
|
})
|
||||||
|
if (i == formdata.value.fileList.length - 1) {
|
||||||
|
await addSurvey({ ...formdata.value, filePath: filePath }).then((res: any) => {
|
||||||
ElMessage.success('新增成功!')
|
ElMessage.success('新增成功!')
|
||||||
cancelFn()
|
cancelFn()
|
||||||
emit('onsubmit')
|
emit('onsubmit')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 通过
|
|
||||||
const pass = (flag: boolean) => {
|
// 上传文件
|
||||||
checkPlanAudit({
|
// 文件数超出提示
|
||||||
checkResult: flag ? 1 : 0,
|
const handleExceed: UploadProps['onExceed'] = (): void => {
|
||||||
planNo: formdata.value.planNo,
|
ElMessage.error(`上传文件数量不能超过5个!`)
|
||||||
checkComment: formdata.value.checkComment,
|
|
||||||
checkPerson: JSON.parse(window.localStorage.getItem('adminInfo')).loginName
|
|
||||||
}).then((res: any) => {
|
|
||||||
ElMessage.success('审核成功!')
|
|
||||||
cancelFn()
|
|
||||||
emit('onsubmit')
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const open = (text: string, row?: any) => {
|
const open = (text: string, row?: any) => {
|
||||||
@@ -154,31 +176,58 @@ const open = (text: string, row?: any) => {
|
|||||||
orgNo: dictData.state.area[0].id,
|
orgNo: dictData.state.area[0].id,
|
||||||
planStartTime: '',
|
planStartTime: '',
|
||||||
planEndTime: '',
|
planEndTime: '',
|
||||||
planNo: '',
|
planComplateTime: '',
|
||||||
planName: '',
|
planName: '',
|
||||||
leader: '',
|
leader: '',
|
||||||
rgeneralSurveyPlanDetailAddParm: [],
|
rgeneralSurveyPlanDetailAddParm: [],
|
||||||
subCount: '',
|
subCount: '',
|
||||||
busCount: '',
|
busCount: '',
|
||||||
subIds: [],
|
subIds: [],
|
||||||
checkComment: ''
|
checkComment: '',
|
||||||
|
fileList: [],
|
||||||
|
filePath: []
|
||||||
})
|
})
|
||||||
title.value = text
|
title.value = text
|
||||||
planAddition.value = true
|
planAddition.value = true
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
nextTick(() => {
|
|
||||||
treeRef.value.loadData()
|
|
||||||
})
|
|
||||||
if (row) {
|
if (row) {
|
||||||
formdata.value = JSON.parse(JSON.stringify(row))
|
formdata.value = JSON.parse(JSON.stringify(row))
|
||||||
|
nextTick(() => {
|
||||||
|
getFilePath()
|
||||||
|
treeRef.value.loadData()
|
||||||
|
treeRef.value.setKey(row.subIds || [], text)
|
||||||
|
// formdata.value.filePath.join(',')
|
||||||
|
})
|
||||||
|
} else {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
treeRef.value.loadData()
|
treeRef.value.loadData()
|
||||||
|
|
||||||
treeRef.value.setKey(row.subIds, text)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const getFilePath = () => {
|
||||||
|
aList.value = []
|
||||||
|
let arr = formdata.value.filePath.split(',')
|
||||||
|
|
||||||
|
arr.slice(0, -1).forEach((item: any) => {
|
||||||
|
getFileNameAndFilePath({ filePath: item }).then((res: any) => {
|
||||||
|
aList.value.push(res.data)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const downloadFile = (url: string, fileName: string) => {
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.href = url
|
||||||
|
link.download = fileName
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
document.body.removeChild(link)
|
||||||
|
}
|
||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped>
|
||||||
|
:deep(.el-upload-list__item-info) {
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker ref="TableHeaderRef">
|
<TableHeader area datePicker ref="TableHeaderRef">
|
||||||
<template #select>
|
|
||||||
<el-form-item label="计划状态">
|
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择计划状态">
|
|
||||||
<el-option v-for="item in list" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</template>
|
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增计划</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增计划</el-button>
|
||||||
<el-button icon="el-icon-Stamp" type="primary" @click="submit">提交审核</el-button>
|
<!-- <el-button icon="el-icon-Download" type="primary" @click="exportFn">导出</el-button> -->
|
||||||
<el-button icon="el-icon-Download" type="primary" @click="exportFn">导出</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</TableHeader ref="tableRef">
|
</TableHeader ref="tableRef">
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
@@ -44,29 +37,12 @@ import { submitAuditUser } from '@/api/process-boot/generalTest'
|
|||||||
import planAdd from './planAdd.vue'
|
import planAdd from './planAdd.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
import { queryPlan,deletePlan } from '@/api/process-boot/generalTest'
|
import { queryPlan,removeSurvey } from '@/api/process-boot/generalTest'
|
||||||
import { getUserByRoleType } from '@/api/user-boot/user'
|
import { getUserByRoleType } from '@/api/user-boot/user'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const dialogVisible=ref(false)
|
const dialogVisible=ref(false)
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const list = [
|
|
||||||
{
|
|
||||||
id: 0,
|
|
||||||
name: '新建'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
name: '待审核'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
name: '未通过'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
name: '已发布'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
const planAddRef = ref()
|
const planAddRef = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
@@ -75,35 +51,38 @@ const auditUser = ref('')
|
|||||||
|
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/process-boot/rGeneralSurveyPlan/queryPlan',
|
url: '/supervision-boot/generalSurvey/getSurvey',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ width: '60', type: 'checkbox' },
|
{ width: '60', type: 'checkbox' },
|
||||||
{ field: 'orgName', title: '责任单位' },
|
{ field: 'orgName', title: '单位' },
|
||||||
{
|
{
|
||||||
field: 'planNo',
|
field: 'planName',
|
||||||
title: '普测计划编号'
|
title: '普测计划名称'
|
||||||
},
|
},
|
||||||
{ field: 'planName', title: '普测计划名称' },
|
{ field: 'leader', title: '计划负责人' },
|
||||||
{ field: 'planStartTime', title: '开始时间' },
|
|
||||||
{ field: 'planEndTime', title: '结束时间' },
|
{ field: 'planStartTime', title: '计划开始时间' },
|
||||||
{ field: 'subCount', title: '普测变电站数量' },
|
{ field: 'planEndTime', title: '计划结束时间' },
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
title: '计划状态',
|
title: '计划状态',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: '',
|
0: 'info',
|
||||||
1: '',
|
1: 'primary',
|
||||||
2: 'warning',
|
2: 'warning',
|
||||||
3: 'success'
|
3: 'danger',
|
||||||
|
4: 'info',
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '新建',
|
0: '新建',
|
||||||
1: '待审核',
|
1: '审批中',
|
||||||
2: '未通过',
|
2: '审批通过',
|
||||||
3: '已发布'
|
3: '审批不通',
|
||||||
|
4: '已取消',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -123,41 +102,41 @@ const tableStore = new TableStore({
|
|||||||
planAddRef.value.open('查看计划', row)
|
planAddRef.value.open('查看计划', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: 'edit',
|
// name: 'edit',
|
||||||
title: '编辑',
|
// title: '编辑',
|
||||||
type: '',
|
// type: '',
|
||||||
disabled: row => {
|
// disabled: row => {
|
||||||
return !(row.status == 0 || row.status == 2)
|
// return !(row.status == 0 || row.status == 3|| row.status == 4)
|
||||||
},
|
// },
|
||||||
icon: 'el-icon-Plus',
|
// icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
// render: 'basicButton',
|
||||||
click: async row => {
|
// click: async row => {
|
||||||
planAddRef.value.open('编辑计划', row)
|
// planAddRef.value.open('编辑计划', row)
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: 'del',
|
// name: 'del',
|
||||||
title: '删除',
|
// title: '删除',
|
||||||
type: 'danger',
|
// type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
// icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
// render: 'confirmButton',
|
||||||
disabled: row => {
|
// disabled: row => {
|
||||||
return !(row.status == 0 || row.status == 2)
|
// return !(row.status == 0 || row.status == 3|| row.status == 4)
|
||||||
},
|
// },
|
||||||
popconfirm: {
|
// popconfirm: {
|
||||||
confirmButtonText: '确认',
|
// confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
// cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
// confirmButtonType: 'danger',
|
||||||
title: '确定删除吗?'
|
// title: '确定删除吗?'
|
||||||
},
|
// },
|
||||||
click: row => {
|
// click: row => {
|
||||||
deletePlan([row.planNo]).then(res => {
|
// removeSurvey([row.planNo]).then(res => {
|
||||||
ElMessage.success('删除成功')
|
// ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
// tableStore.index()
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -175,19 +154,7 @@ const add = () => {
|
|||||||
// title.value = '普测计划新增'
|
// title.value = '普测计划新增'
|
||||||
planAddRef.value.open('普测计划新增')
|
planAddRef.value.open('普测计划新增')
|
||||||
}
|
}
|
||||||
const submit = () => {
|
|
||||||
if(tableStore.table.selection.length == 0){
|
|
||||||
|
|
||||||
return ElMessage.warning('请选择计划进行审核')
|
|
||||||
}
|
|
||||||
const flag = !tableStore.table.selection.some(item => item.status !== 0 && item.status !== 2);
|
|
||||||
if (flag) {
|
|
||||||
dialogVisible.value = true
|
|
||||||
} else {
|
|
||||||
ElMessage.warning('请选择新建、未通过的计划进行审核!')
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
// 提交审核
|
// 提交审核
|
||||||
const planReviewFn = () => {
|
const planReviewFn = () => {
|
||||||
if(auditUser.value == ''){
|
if(auditUser.value == ''){
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
<el-tab-pane label="普测计划管理" name="1">
|
<el-tab-pane label="普测计划管理" name="1">
|
||||||
<planManage v-if="activeName == '1'" />
|
<planManage v-if="activeName == '1'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="普测计划审批" name="2">
|
<!-- <el-tab-pane label="普测计划审批" name="2">
|
||||||
<planAudits v-if="activeName == '2'"/>
|
<planAudits v-if="activeName == '2'"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane> -->
|
||||||
<!-- <el-tab-pane label="普测结果管理" name="3"><outcome v-if="activeName == '3'"/></el-tab-pane>
|
<!-- <el-tab-pane label="普测结果管理" name="3"><outcome v-if="activeName == '3'"/></el-tab-pane>
|
||||||
<el-tab-pane label="普测计划占比配置" name="4"><occupancy v-if="activeName == '4'"/></el-tab-pane> -->
|
<el-tab-pane label="普测计划占比配置" name="4"><occupancy v-if="activeName == '4'"/></el-tab-pane> -->
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@@ -21,7 +21,7 @@ import planAudits from './components/planAudits.vue'
|
|||||||
import planManage from './components/planManage.vue'
|
import planManage from './components/planManage.vue'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'Processsupervision/harmonicmanagement'
|
name: 'supervision/harmonicmanagement'
|
||||||
})
|
})
|
||||||
const activeName = ref('1')
|
const activeName = ref('1')
|
||||||
const Statistics = ref()
|
const Statistics = ref()
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
|||||||
import { genFileId, ElMessage } from 'element-plus'
|
import { genFileId, ElMessage } from 'element-plus'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
|
import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
|
||||||
import moment from 'moment'
|
|
||||||
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { uploadFile } from '@/api/system-boot/file'
|
import { uploadFile } from '@/api/system-boot/file'
|
||||||
|
|||||||
@@ -697,10 +697,7 @@ import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
|||||||
import { genFileId, ElMessage } from 'element-plus'
|
import { genFileId, ElMessage } from 'element-plus'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
|
import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
|
||||||
import moment from 'moment'
|
// import moment from 'moment'
|
||||||
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
|
||||||
import { uploadFile } from '@/api/system-boot/file'
|
|
||||||
import { submitFormData } from '@/api/supervise/interfere/index'
|
import { submitFormData } from '@/api/supervise/interfere/index'
|
||||||
defineProps({
|
defineProps({
|
||||||
openType: {
|
openType: {
|
||||||
@@ -713,7 +710,7 @@ const dictData = useDictData()
|
|||||||
const dialogFormVisible = ref(false)
|
const dialogFormVisible = ref(false)
|
||||||
const formLabelWidth = '120px'
|
const formLabelWidth = '120px'
|
||||||
const form:any = ref({})
|
const form:any = ref({})
|
||||||
const ruleFormRef = ref(null)
|
const ruleFormRef:any = ref(null)
|
||||||
//字典获取所属地市
|
//字典获取所属地市
|
||||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||||
//字典获取敏感电能质量指标
|
//字典获取敏感电能质量指标
|
||||||
@@ -783,7 +780,7 @@ const defaultProps = {
|
|||||||
label: 'name',
|
label: 'name',
|
||||||
key: 'id'
|
key: 'id'
|
||||||
}
|
}
|
||||||
const nonlinearDeviceTypeList = ref('')
|
const nonlinearDeviceTypeList:any = ref('')
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
@@ -872,7 +869,7 @@ const handleCheckChange = data => {
|
|||||||
form.value.nonlinearDeviceType = checkedNodes[0]
|
form.value.nonlinearDeviceType = checkedNodes[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const subForm = ref({
|
const subForm:any = ref({
|
||||||
city: '', //所属地市
|
city: '', //所属地市
|
||||||
evaluationConclusion: '', //预测评估结论
|
evaluationConclusion: '', //预测评估结论
|
||||||
evaluationDept: '', //预测评估单位
|
evaluationDept: '', //预测评估单位
|
||||||
@@ -1249,8 +1246,9 @@ watch(
|
|||||||
subForm.value[key] = val[key] // 对相同的key进行赋值
|
subForm.value[key] = val[key] // 对相同的key进行赋值
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//处理填报日期时间格式
|
//处理填报日期时间格式
|
||||||
subForm.value.reportDate = moment(form.value.reportDate).format('YYYY-MM-DD')
|
subForm.value.reportDate = window.XEUtils.toDateString(form.value.reportDate, 'yyyy-MM-dd')//moment(form.value.reportDate).format('YYYY-MM-DD')
|
||||||
//userType==0,1
|
//userType==0,1
|
||||||
if (val.userType == '0' || val.userType == '1') {
|
if (val.userType == '0' || val.userType == '1') {
|
||||||
subForm.value.userReportProjectPO = {
|
subForm.value.userReportProjectPO = {
|
||||||
|
|||||||
Reference in New Issue
Block a user