.
<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>
