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