联调承载能力评估 绘制 谐波普测管理
This commit is contained in:
@@ -187,3 +187,12 @@ export function removeDev(data) {
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 模型训练
|
||||
export function modelTraining(data) {
|
||||
return createAxios({
|
||||
url: '/advance-boot/carrycapacity/modelTraining',
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<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"
|
||||
@@ -10,14 +12,15 @@
|
||||
<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"
|
||||
:data="tree"
|
||||
ref="treeRef"
|
||||
show-checkbox
|
||||
default-expand-all
|
||||
node-key="id"
|
||||
:default-expanded-keys="[2, 3]"
|
||||
:default-checked-keys="[5]"
|
||||
:props="defaultProps"
|
||||
/>
|
||||
</div>
|
||||
@@ -26,35 +29,46 @@
|
||||
<script lang="ts" setup>
|
||||
import { nextTick, onMounted, ref, useAttrs } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { initDetpStataionTree } from '@/api/process-boot/generalTest'
|
||||
|
||||
import { useConfig } from '@/stores/config'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { initDetpStataionTree, querySubStatation, addPlan } from '@/api/process-boot/generalTest'
|
||||
|
||||
const emit = defineEmits(['tactics'])
|
||||
const attrs = useAttrs()
|
||||
const defaultProps = {
|
||||
const defaultProps = ref({
|
||||
label: 'name',
|
||||
value: 'id'
|
||||
}
|
||||
value: 'id',
|
||||
disabled: 'disabled'
|
||||
})
|
||||
const dictData = useDictData()
|
||||
const config = useConfig()
|
||||
const disabled = ref(false)
|
||||
const tree = ref()
|
||||
const treeRef = ref()
|
||||
const input: any = ref('')
|
||||
|
||||
const loadData = () => {
|
||||
let nodeKey = ''
|
||||
|
||||
initDetpStataionTree({ orgId: dictData.state.area[0].id }).then(res => {
|
||||
tree.value = res.data
|
||||
})
|
||||
}
|
||||
const handleEdit = () => {}
|
||||
// 配置
|
||||
const Tick = () => {}
|
||||
const tactics = (deptId, grade) => {
|
||||
emit('tactics', deptId, grade)
|
||||
const Tick = () => {
|
||||
querySubStatation({ statetionNum: input.value }).then(res => {
|
||||
setKey(res.data.subIds)
|
||||
ElMessage.success('配置成功')
|
||||
})
|
||||
}
|
||||
// 设置多选
|
||||
const setKey = (key: any, text?: string) => {
|
||||
treeRef.value!.setCheckedKeys(key, false)
|
||||
if (text == '查看计划' || text == '计划审核') {
|
||||
defaultProps.value.disabled = 'flag'
|
||||
} else {
|
||||
defaultProps.value.disabled = 'disabled'
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ treeRef, setKey, loadData })
|
||||
loadData()
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="30" class="mb20">
|
||||
<el-col :span="8">
|
||||
<el-col :span="10">
|
||||
<el-card>
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
@@ -91,7 +91,7 @@
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-col :span="14">
|
||||
<el-card>
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
@@ -331,6 +331,10 @@ const rendering = (row: any) => {
|
||||
{
|
||||
name: '禁止接入',
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
name: '允许接入',
|
||||
value: 0
|
||||
}
|
||||
]
|
||||
outcome.value = row
|
||||
@@ -368,7 +372,7 @@ const rendering = (row: any) => {
|
||||
yAxis: {
|
||||
show: false
|
||||
},
|
||||
color: ['#77DA63', '#00BFF5', '#FFBF00', '#Ff6600', '#ff0000'],
|
||||
color: ['#77DA63', '#00BFF5', '#FFBF00', '#Ff6600', '#ff0000', '#07CCCA'],
|
||||
dataZoom: { show: false },
|
||||
series: [
|
||||
{
|
||||
@@ -419,10 +423,7 @@ onMounted(() => {
|
||||
form.value = props.rowList
|
||||
userId.value = props.rowList.userId
|
||||
selChange(props.rowList.userId)
|
||||
rendering({
|
||||
firstResult: props.rowList.firstResult,
|
||||
iresultList: props.rowList.iresultList
|
||||
})
|
||||
rendering(props.rowList)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
<el-upload action="" :show-file-list="false" :auto-upload="false" :on-change="choose">
|
||||
<el-button type="primary" class="ml10" icon="el-icon-Upload">离线导入</el-button>
|
||||
</el-upload>
|
||||
<el-button type="primary" class="ml10" icon="el-icon-Ticket">模型训练</el-button>
|
||||
<!-- <el-button type="primary" class="ml10" icon="el-icon-Ticket" @click="modelTrain">
|
||||
模型训练
|
||||
</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -156,13 +158,14 @@ import {
|
||||
queryCarryCapacityIData,
|
||||
carryCapacityCal,
|
||||
getExcelTemplate,
|
||||
getLineDetailData
|
||||
getLineDetailData,
|
||||
modelTraining
|
||||
} from '@/api/advance-boot/bearingCapacity'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const props = defineProps(['rowList'])
|
||||
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const size = ref(0)
|
||||
const size = ref(26)
|
||||
const dictData = useDictData()
|
||||
const datePickerRef = ref()
|
||||
const height = mainHeight(80).height
|
||||
@@ -299,6 +302,16 @@ const onSubmit = async () => {
|
||||
const userChange = (e: any) => {
|
||||
userData.value = e
|
||||
}
|
||||
// 模型训练
|
||||
const modelTrain = () => {
|
||||
modelTraining({
|
||||
endTime: datePickerRef.value.timeValue[1],
|
||||
lineId: dotList.value.id,
|
||||
startTime: datePickerRef.value.timeValue[0],
|
||||
time: 0,
|
||||
userId: dictData.state.area[0].id
|
||||
}).then(res => {})
|
||||
}
|
||||
|
||||
const setEChart = (val: any, data: any) => {
|
||||
let options = {
|
||||
|
||||
@@ -4,109 +4,100 @@
|
||||
<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
|
||||
:model="formdata"
|
||||
:disabled="title == '查看计划' || title == '计划审核'"
|
||||
ref="formRef"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="普测负责单位:">
|
||||
<el-input v-model="formdata.orgName" class="formW" disabled></el-input>
|
||||
<Area v-model="formdata.orgNo" disabled style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划开始时间:">
|
||||
<el-form-item label="计划开始时间:" prop="planStartTime">
|
||||
<el-date-picker
|
||||
v-model.trim="formdata.planStartTime"
|
||||
v-model="formdata.planStartTime"
|
||||
type="date"
|
||||
style="width: 240px"
|
||||
placeholder="选择计划开始时间"
|
||||
value-format="yyyy-MM-dd"
|
||||
value-format="YYYY-MM-DD"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划结束时间:">
|
||||
<el-form-item label="计划结束时间:" prop="planEndTime">
|
||||
<el-date-picker
|
||||
v-model.trim="formdata.planEndTime"
|
||||
v-model="formdata.planEndTime"
|
||||
type="date"
|
||||
style="width: 240px"
|
||||
placeholder="选择计划结束时间"
|
||||
value-format="yyyy-MM-dd"
|
||||
value-format="YYYY-MM-DD"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="普测计划编号:">
|
||||
<el-form-item label="普测计划编号:" prop="planNo">
|
||||
<el-input
|
||||
:disabled="title == '普测计划修改'"
|
||||
:disabled="title == '编辑计划'"
|
||||
v-model="formdata.planNo"
|
||||
class="formW"
|
||||
placeholder="请输入普测计划编号"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划名称:">
|
||||
<el-form-item label="计划名称:" prop="planName">
|
||||
<el-input v-model="formdata.planName" placeholder="请输入计划名称" class="formW"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="测试负责人:">
|
||||
<el-form-item label="测试负责人:" prop="leader">
|
||||
<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 />
|
||||
|
||||
<generalTestTree ref="treeRef" />
|
||||
</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"
|
||||
<div
|
||||
v-if="
|
||||
(title == '查看计划' || title == '计划审核') &&
|
||||
(title == '计划审核' || formdata.status == 1 || formdata.status == 2 || formdata.status == 3)
|
||||
"
|
||||
>
|
||||
审核意见
|
||||
</el-divider>
|
||||
<el-divider content-position="left" style="font-size: 18px; font-weight: bolder">审核意见</el-divider>
|
||||
<el-input
|
||||
v-if="title == '计划详情' && formdata.status == 2 && formdata.status == 3"
|
||||
disabled
|
||||
:disabled="title != '计划审核'"
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
v-model="textarea"
|
||||
></el-input> -->
|
||||
|
||||
<template #footer>
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
v-model="formdata.checkComment"
|
||||
></el-input>
|
||||
</div>
|
||||
<template #footer v-if="title != '查看计划' && title != '计划审核'">
|
||||
<div>
|
||||
<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>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import generalTestTree from '@/components/tree/pqs/generalTestTree.vue'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { ref, reactive, nextTick } from 'vue'
|
||||
import { addPlan, checkPlanAudit } from '@/api/process-boot/generalTest'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const emit = defineEmits(['onsubmit'])
|
||||
const dictData = useDictData()
|
||||
const title = ref('')
|
||||
const planAddition = ref(false)
|
||||
|
||||
const formdata = ref({
|
||||
const formdata: any = ref({
|
||||
orgName: '',
|
||||
orgNo: '',
|
||||
orgNo: dictData.state.area[0].id,
|
||||
planStartTime: '',
|
||||
planEndTime: '',
|
||||
planNo: '',
|
||||
@@ -114,17 +105,80 @@ const formdata = ref({
|
||||
leader: '',
|
||||
rgeneralSurveyPlanDetailAddParm: [],
|
||||
subCount: '',
|
||||
busCount: ''
|
||||
busCount: '',
|
||||
subIds: [],
|
||||
checkComment: ''
|
||||
})
|
||||
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' }],
|
||||
planName: [{ required: true, message: '请输入计划名称', trigger: 'blur' }],
|
||||
leader: [{ required: true, message: '请输入测试负责人', trigger: 'blur' }]
|
||||
}
|
||||
const cancelFn = () => {
|
||||
formRef.value.resetFields()
|
||||
treeRef.value.setKey([])
|
||||
planAddition.value = false
|
||||
}
|
||||
// 提交
|
||||
const submitFn = () => {}
|
||||
const submitFn = () => {
|
||||
formRef.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
formdata.value.subIds = treeRef.value.treeRef.getCheckedKeys(false)
|
||||
addPlan(formdata.value).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 open = (text: string) => {
|
||||
const open = (text: string, row?: any) => {
|
||||
formdata.value = Object.assign({
|
||||
orgName: '',
|
||||
orgNo: dictData.state.area[0].id,
|
||||
planStartTime: '',
|
||||
planEndTime: '',
|
||||
planNo: '',
|
||||
planName: '',
|
||||
leader: '',
|
||||
rgeneralSurveyPlanDetailAddParm: [],
|
||||
subCount: '',
|
||||
busCount: '',
|
||||
subIds: [],
|
||||
checkComment: ''
|
||||
})
|
||||
title.value = text
|
||||
planAddition.value = true
|
||||
formRef.value?.resetFields()
|
||||
nextTick(() => {
|
||||
treeRef.value.loadData()
|
||||
})
|
||||
if (row) {
|
||||
formdata.value = JSON.parse(JSON.stringify(row))
|
||||
nextTick(() => {
|
||||
treeRef.value.loadData()
|
||||
|
||||
treeRef.value.setKey(row.subIds, text)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<TableHeader area datePicker ref="TableHeaderRef">
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Stamp" type="primary">审核</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<TableHeader area datePicker ref="TableHeaderRef" />
|
||||
<Table ref="tableRef" />
|
||||
<!-- 审核 -->
|
||||
|
||||
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -14,46 +13,53 @@
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import planAdd from './planAdd.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||
|
||||
const dictData = useDictData()
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const title = ref('')
|
||||
|
||||
const ruleFormRef = ref()
|
||||
const planAddRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/system-boot/area/areaSelect',
|
||||
url: '/process-boot/rGeneralSurveyPlan/queryPlanAudit',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ width: '60', type: 'checkbox' },
|
||||
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{ field: 'planNo', title: '普测计划编号' },
|
||||
{ field: 'planName', title: '普测计划名称' },
|
||||
{ field: 'planStartTime', title: '开始时间' },
|
||||
{ field: 'planEndTime', title: '结束时间' },
|
||||
{ field: 'subCount', title: '普测变电站数量' }
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = [
|
||||
{ field: 'subCount', title: '普测变电站数量' },
|
||||
{
|
||||
status: 2
|
||||
title: '操作',
|
||||
width: '120',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '审核',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
planAddRef.value.open('计划审核', row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
],
|
||||
|
||||
tableStore.table.params.searchState = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.type = ''
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.planStartTime = tableStore.table.params.searchBeginTime
|
||||
tableStore.table.params.planEndTime = tableStore.table.params.searchEndTime
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
}
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
|
||||
@@ -1,26 +1,21 @@
|
||||
<template>
|
||||
<TableHeader area datePicker ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label=" 计划状态">
|
||||
<el-select v-model="tableStore.table.params.status" placeholder="请选择 计划状态">
|
||||
<el-option
|
||||
v-for="item in planstatus"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-form-item label="计划状态">
|
||||
<el-select v-model="tableStore.table.params.status" 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">提交审核</el-button>
|
||||
<el-button icon="el-icon-Stamp" type="primary" @click="planReviewFn">提交审核</el-button>
|
||||
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!-- 新增 -->
|
||||
<planAdd ref="planAddRef"/>
|
||||
<planAdd ref="planAddRef" @onsubmit="tableStore.index()" />
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
@@ -28,12 +23,13 @@ import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { planStatus } from '@/api/process-boot/generalTest'
|
||||
import planAdd from './planAdd.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
import { initDetpStataionTree } from '@/api/process-boot/generalTest'
|
||||
const dictData = useDictData()
|
||||
const planstatus = [
|
||||
const list = [
|
||||
{
|
||||
id: 0,
|
||||
name: '新建'
|
||||
@@ -52,7 +48,6 @@ const planstatus = [
|
||||
}
|
||||
]
|
||||
|
||||
const planAddition = ref(false)
|
||||
const planAddRef = ref()
|
||||
const TableHeaderRef = ref()
|
||||
|
||||
@@ -72,10 +67,26 @@ const tableStore = new TableStore({
|
||||
{ field: 'planStartTime', title: '开始时间' },
|
||||
{ field: 'planEndTime', title: '结束时间' },
|
||||
{ field: 'subCount', title: '普测变电站数量' },
|
||||
{ field: 'status', title: '计划状态' },
|
||||
{
|
||||
field: 'status',
|
||||
title: '计划状态',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: '',
|
||||
1: '',
|
||||
2: 'warning',
|
||||
3: 'success'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '新建',
|
||||
1: '待审核',
|
||||
2: '未通过',
|
||||
3: '已发布'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
title: '计划详情',
|
||||
title: '操作',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
@@ -86,7 +97,9 @@ const tableStore = new TableStore({
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {}
|
||||
click: row => {
|
||||
planAddRef.value.open('查看计划', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
@@ -97,7 +110,9 @@ const tableStore = new TableStore({
|
||||
},
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {}
|
||||
click: async row => {
|
||||
planAddRef.value.open('编辑计划', row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -105,8 +120,7 @@ const tableStore = new TableStore({
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||
},
|
||||
loadCallback: () => {}
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.status = ''
|
||||
@@ -116,9 +130,28 @@ provide('tableStore', tableStore)
|
||||
const add = () => {
|
||||
// title.value = '普测计划新增'
|
||||
planAddRef.value.open('普测计划新增')
|
||||
planAddition.value = true
|
||||
}
|
||||
// 提交审核
|
||||
const planReviewFn = () => {
|
||||
let planNo: any = []
|
||||
let flag = true
|
||||
tableStore.table.selection.forEach(item => {
|
||||
if (item.status == 0 || item.status == 2) {
|
||||
planNo.push(item.planNo)
|
||||
} else {
|
||||
flag = false
|
||||
}
|
||||
})
|
||||
if (flag) {
|
||||
planStatus(planNo).then(res => {
|
||||
ElMessage.success('提交成功!')
|
||||
|
||||
tableStore.index()
|
||||
})
|
||||
} else {
|
||||
ElMessage.warning('请选择新建、未通过的计划进行审核!')
|
||||
}
|
||||
}
|
||||
// 取消
|
||||
|
||||
onMounted(() => {
|
||||
@@ -126,6 +159,4 @@ onMounted(() => {
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
Reference in New Issue
Block a user