iZaiZaiA 2 years ago
parent
commit
509b749c99

+ 3 - 1
src/api/request/httpApi.js

@@ -1,4 +1,5 @@
 import request from "./index";
+import {getObjValue} from "vue-utils-plus"
 
 //封装的请求
 export const httpApi = async (obj, message= true) => {
@@ -17,6 +18,7 @@ export const httpApi = async (obj, message= true) => {
 
 //处理数据
 const getResData = (response, error = false) => {
+    const headers = getObjValue(response?.headers)
     return {
         response,
         res: response?.data,
@@ -24,7 +26,7 @@ const getResData = (response, error = false) => {
         code: response?.data?.code,
         msg: response?.data?.msg,
         status: response?.status,
-        disposition: response?.headers['content-disposition'],
+        disposition: headers['content-disposition'],
         error: error
     }
 }

+ 1 - 1
src/global/components/hc-table/index.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="hc-table-ref-box" :class="ui">
-        <el-table ref="tableRef" hc :data="tableData" height="100%" :loading="isLoading" stripe :row-key="rowKey" @selection-change="tableSelectionChange"
+        <el-table ref="tableRef" hc :data="tableData" height="100%" v-loading="isLoading" stripe :row-key="rowKey" @selection-change="tableSelectionChange"
                   @row-click="tableRowClick" @row-dblclick="tableRowDblClick" @row-contextmenu="tableRowContextmenu"
                   @cell-click="tableCellClick" @cell-dblclick="tableCellDblClick" @cell-contextmenu="tableCellContextmenu">
             <el-table-column type="selection" width="50" v-if="isCheck"/>

+ 2 - 2
src/plugins/HTableForm.js

@@ -1,7 +1,7 @@
 import {createApp} from "vue/dist/vue.esm-bundler.js";
 import {getTokenHeader} from '~src/api/request/header';
-import {ElButton,ElInput,ElDatePicker,ElUpload,ElInputNumber,ElTimePicker,ElSelect,ElOption,ElRadioGroup,ElRadio,ElCheckbox,ElCheckboxGroup} from 'element-plus'
-const components = {ElButton,ElInput, ElDatePicker, ElUpload, ElInputNumber, ElTimePicker, ElSelect, ElOption, ElRadioGroup, ElRadio, ElCheckbox, ElCheckboxGroup}
+import {ElButton,ElTooltip,ElInput,ElDatePicker,ElUpload,ElInputNumber,ElTimePicker,ElSelect,ElOption,ElRadioGroup,ElRadio,ElCheckbox,ElCheckboxGroup} from 'element-plus'
+const components = {ElButton,ElTooltip,ElInput, ElDatePicker, ElUpload, ElInputNumber, ElTimePicker, ElSelect, ElOption, ElRadioGroup, ElRadio, ElCheckbox, ElCheckboxGroup}
 
 //表单渲染
 export const HTableForm = ({template, tableForm, appId, onRight}) => {

+ 15 - 0
src/styles/app/element.scss

@@ -122,6 +122,11 @@
     }
 }
 
+.el-date-editor.el-input.block,
+.el-date-editor.block .el-input__wrapper {
+    width: 100%;
+}
+
 //个人中心项目列表
 .hc-project-menu.el-menu {
     --el-menu-level: 0;
@@ -472,3 +477,13 @@
     }
 }
 
+//表单提示样式
+.el-popper.is-customized {
+    padding: 6px 12px;
+    background: linear-gradient(90deg, rgb(159, 229, 151), rgb(204, 229, 129));
+}
+
+.el-popper.is-customized .el-popper__arrow::before {
+    background: linear-gradient(45deg, #b2e68d, #bce689);
+    right: 0;
+}

+ 297 - 0
src/views/ledger/components/construction.vue

@@ -0,0 +1,297 @@
+<template>
+    <HcCard>
+        <HcTable :column="tableConstructionColumn" :datas="tableConstructionData" :loading="tableConstructionLoading">
+            <template #action="{row}">
+                <HcTooltip keys="write_construction_edit">
+                    <el-button type="primary" plain size="small" @click="tableConstructionEdit(row)">
+                        <HcIcon name="edit"/>
+                        <span>编辑</span>
+                    </el-button>
+                </HcTooltip>
+            </template>
+        </HcTable>
+        <template #action>
+            <HcPages :pages="searchConstructionForm" @change="pageConstructionChange"/>
+        </template>
+    </HcCard>
+
+    <!--编辑施工台账-->
+    <el-dialog v-model="showConstructionEditModal" title="编辑施工台账" width="38rem" class="hc-modal-border">
+        <el-form ref="constructionFormRef" :model="constructionFormModel" :rules="constructionFormRules" label-position="top" label-width="auto" size="large">
+            <div class="flex">
+                <el-form-item class="flex-1" label="施工起始日期" prop="siteStartTime">
+                    <el-date-picker class="block" v-model="constructionFormModel.siteStartTime" type="date" placeholder="施工起始日期" format="YYYY-MM-DD" value-format="YYYY-MM-DD"/>
+                </el-form-item>
+                <el-form-item class="mx-4" label=" ">至</el-form-item>
+                <el-form-item class="flex-1" label="施工停止日期" prop="siteEndTime">
+                    <el-date-picker class="block" v-model="constructionFormModel.siteEndTime" type="date" placeholder="施工停止日期" format="YYYY-MM-DD" value-format="YYYY-MM-DD"/>
+                </el-form-item>
+            </div>
+            <div class="flex">
+                <el-form-item class="flex-1" label="检测起始日期" prop="detectionStartTime">
+                    <el-date-picker class="block" v-model="constructionFormModel.detectionStartTime" :disabled="!constructionFormModel.siteStartTime || !constructionFormModel.siteEndTime" type="date" placeholder="检测起始日期" format="YYYY-MM-DD" value-format="YYYY-MM-DD"/>
+                </el-form-item>
+                <el-form-item class="mx-4" label=" ">至</el-form-item>
+                <el-form-item class="flex-1" label="检测停止日期" prop="detectionEndTime">
+                    <el-date-picker class="block" v-model="constructionFormModel.detectionEndTime" :disabled="!constructionFormModel.siteStartTime || !constructionFormModel.siteEndTime" type="date" placeholder="检测停止日期" format="YYYY-MM-DD" value-format="YYYY-MM-DD"/>
+                </el-form-item>
+            </div>
+            <el-form-item label="设计方量" prop="designVolume">
+                <el-input v-model="constructionFormModel.designVolume" placeholder="请输入设计方量"/>
+            </el-form-item>
+            <el-form-item label="实际方量" prop="actualVolume">
+                <el-input v-model="constructionFormModel.actualVolume" placeholder="请输入实际方量"/>
+            </el-form-item>
+        </el-form>
+        <template #footer>
+            <div class="dialog-footer">
+                <el-button size="large" @click="showConstructionEditModal = false">
+                    <HcIcon name="close"/>
+                    <span>取消</span>
+                </el-button>
+                <el-button type="primary" hc-btn :loading="saveConstructionLoading" @click="saveConstructionClick">
+                    <HcIcon name="save"/>
+                    <span>提交保存</span>
+                </el-button>
+            </div>
+        </template>
+    </el-dialog>
+
+</template>
+
+<script setup>
+import {ref, nextTick, watch} from "vue";
+import {deepClone, formValidate, getArrValue} from "vue-utils-plus"
+import constructionApi from '~api/ledger/construction';
+
+//参数
+const props = defineProps({
+    projectId: {
+        type: [String,Number],
+        default: ''
+    },
+    contractId: {
+        type: [String,Number],
+        default: ''
+    },
+    treeData: {
+        type: Object,
+        default: () => ({})
+    }
+})
+
+//变量
+const projectId = ref(props.projectId);
+const contractId = ref(props.contractId);
+const nodeData = ref(props.treeData);
+
+//监听
+watch(() => [
+    props.treeData
+], ([treeData]) => {
+    nodeData.value = treeData;
+    setQueryData(treeData)
+})
+
+//渲染完成
+nextTick(() => {
+    setQueryData(props.treeData)
+})
+
+//获取相关数据
+const setQueryData = (data) => {
+    const cid = data?.contractIdRelation || ''
+    const wbsId = data['contractIdRelation'] ? data['id'] : data['primaryKeyId']
+    if (wbsId) {
+        searchConstructionForm.value.contractId = cid ? cid : contractId.value;
+        searchConstructionForm.value.contractIdRelation = data['contractIdRelation']
+        searchConstructionForm.value.wbsIds = [wbsId]
+        searchConstructionClick()
+    }
+}
+
+//搜索表单
+const searchConstructionForm = ref({current: 1, size: 20, total: 0})
+
+//搜索
+const searchConstructionClick = () => {
+    if (searchConstructionForm.value?.wbsIds) {
+        searchConstructionForm.value.current = 1;
+        getTableConstructionData()
+    } else {
+        window?.$message?.warning('请先选择一个树节点')
+    }
+}
+
+//分页被点击
+const pageConstructionChange = ({current, size}) => {
+    searchConstructionForm.value.current = current
+    searchConstructionForm.value.size = size
+    getTableConstructionData()
+}
+
+//施工台账表头
+const tableConstructionColumn = ref([
+    {key:'station', name: '施工桩号'},
+    {key:'site', name: '施工部位'},
+    {key:'siteTimeStr', name: '施工起止日期'},
+    {key:'detectionTimeStr', name: '检测日期'},
+    {key:'designVolume', name: '设计方量'},
+    {key:'actualVolume', name: '实际方量'},
+    {key:'action', name: '操作', width: 100}
+])
+const tableConstructionData = ref([])
+
+//获取数据
+const tableConstructionLoading = ref(false)
+const getTableConstructionData = async () => {
+    tableConstructionLoading.value = true
+    const {error, code, data} = await constructionApi.queryConstructionPage({
+        ...searchConstructionForm.value,
+        projectId: projectId.value,
+    })
+    //判断状态
+    tableConstructionLoading.value = false
+    if (!error && code === 200) {
+        tableConstructionData.value = getArrValue(data['records'])
+        searchConstructionForm.value.total = data['total'] || 0
+    } else {
+        tableConstructionData.value = []
+        searchConstructionForm.value.total = 0
+    }
+}
+
+//施工台账编辑
+const showConstructionEditModal = ref(false)
+const tableConstructionEdit = (row) => {
+    constructionFormModel.value = deepClone(row)
+    saveConstructionLoading.value = false
+    constructionFormRef.value?.resetFields()
+    showConstructionEditModal.value = true
+}
+
+//施工台账表单
+const constructionFormRef = ref(null)
+const constructionFormModel = ref({
+    siteStartTime: null,
+    siteEndTime: null,
+    detectionStartTime: null,
+    detectionEndTime: null,
+    designVolume: '',
+    actualVolume: ''
+})
+const constructionFormRules = ref({
+    siteStartTime: {
+        required: true,
+        validator: (rule, value, callback) => {
+            const endTime = constructionFormModel.value?.siteEndTime ?? ''
+            if (!value) {
+                callback(new Error('请选择施工起始日期'))
+            } else if (value > endTime) {
+                callback(new Error('施工停止日期 不能 小于 施工起始日期'))
+            } else if (value === endTime) {
+                callback(new Error('施工停止日期 和 施工起始日期,不能一致'))
+            } else {
+                callback()
+            }
+        },
+        trigger: "blur",
+    },
+    siteEndTime: {
+        required: true,
+        validator: (rule, value, callback) => {
+            const startTime = constructionFormModel.value?.siteStartTime ?? ''
+            if (!value) {
+                callback(new Error('请选择施工停止日期'))
+            } else if (value < startTime) {
+                callback(new Error('施工停止日期 不能 小于 施工起始日期'))
+            } else if (value === startTime) {
+                callback(new Error('施工停止日期 和 施工起始日期,不能一致'))
+            } else {
+                callback()
+            }
+        },
+        trigger: "blur",
+    },
+    detectionStartTime: {
+        required: true,
+        validator: (rule, value, callback) => {
+            const endTime = constructionFormModel.value?.siteEndTime ?? ''
+            const deteEnd = constructionFormModel.value?.detectionEndTime ?? ''
+            if (!value) {
+                callback(new Error('请选择检测起始日期'))
+            } else if (value < endTime) {
+                callback(new Error('检测起始日期 不能 小于 施工停止日期'))
+            } else if (value > deteEnd) {
+                callback(new Error('检测停止日期 不能 小于 检测起始日期'))
+            } else if (value === deteEnd) {
+                callback(new Error('检测停止日期 和 检测起始日期,不能一致'))
+            } else {
+                callback()
+            }
+        },
+        trigger: "blur",
+    },
+    detectionEndTime: {
+        required: true,
+        validator: (rule, value, callback) => {
+            const startTime = constructionFormModel.value?.detectionStartTime ?? ''
+            if (!value) {
+                callback(new Error('请选择检测停止日期'))
+            } else if (value < startTime) {
+                callback(new Error('检测停止日期 不能 小于 检测起始日期'))
+            } else if (value === startTime) {
+                callback(new Error('检测停止日期 和 检测起始日期,不能一致'))
+            } else {
+                callback()
+            }
+        },
+        trigger: "blur",
+    },
+    designVolume: {
+        required: true,
+        trigger: 'blur',
+        message: "请输入设计方量"
+    },
+    actualVolume: {
+        required: true,
+        trigger: 'blur',
+        message: "请输入实际方量"
+    },
+})
+
+//提交保存
+const saveConstructionClick = async () => {
+    const validate = await formValidate(constructionFormRef.value)
+    if (validate) {
+        const formData = constructionFormModel.value
+        const {siteStartTime,siteEndTime,detectionStartTime,detectionEndTime} = formData
+        //施工时间
+        formData.siteTimeStr = siteStartTime + '~' + siteEndTime
+        //检测时间
+        formData.detectionTimeStr = detectionStartTime + '~' + detectionEndTime
+        //请求保存
+        updateConstructionPage(formData)
+    }
+}
+//确认保存
+const saveConstructionLoading = ref(false)
+const updateConstructionPage = async (formData) => {
+    //发起请求
+    saveConstructionLoading.value = true
+    const {error, code} = await constructionApi.updateConstructionPage({
+        ...formData,
+        projectId: projectId.value,
+        contractId: contractId.value
+    },false)
+    //处理数据
+    saveConstructionLoading.value = false
+    if (!error && code === 200) {
+        window?.$message?.success('保存成功')
+        showConstructionEditModal.value = false;
+        getTableConstructionData()
+    } else {
+        window?.$message?.error('保存失败')
+    }
+}
+</script>

+ 213 - 0
src/views/ledger/components/internal.vue

@@ -0,0 +1,213 @@
+<template>
+    <HcCard>
+        <template #header>
+            <div class="w-32">
+                <el-select v-model="searchInternalForm.taskStatus" placeholder="审批状态" clearable size="large">
+                    <el-option v-for="item in InternalApproval" :key="item.value" :label="item['label']" :value="item['value']"/>
+                </el-select>
+            </div>
+            <div class="w-32 ml-2">
+                <el-select v-model="searchInternalForm.isEvaluate" placeholder="是否评定" clearable size="large">
+                    <el-option v-for="item in InternalAssess" :key="item.value" :label="item['label']" :value="item['value']"/>
+                </el-select>
+            </div>
+            <div class="w-32 ml-2">
+                <el-select v-model="searchInternalForm.reportNumber" placeholder="上报批次" clearable size="large">
+                    <el-option v-for="item in InternalReportBatch" :key="item.value" :label="item['label']" :value="item['value']"/>
+                </el-select>
+            </div>
+            <div class="w-32 ml-2">
+                <el-select v-model="searchInternalForm.isExperiment" placeholder="关联试验" clearable size="large">
+                    <el-option v-for="item in InternalAssociation" :key="item.value" :label="item['label']" :value="item['value']"/>
+                </el-select>
+            </div>
+            <div class="w-60 ml-2">
+                <el-input v-model="searchInternalForm.queryStr" placeholder="请输入名称关键词检索" size="large" clearable @keyup="searchInternalKeyUp"/>
+            </div>
+            <div class="ml-2">
+                <el-button type="primary" size="large" @click="searchInternalClick">
+                    <HcIcon name="search-2"/>
+                    <span>搜索</span>
+                </el-button>
+            </div>
+        </template>
+        <template #extra>
+            <HcTooltip keys="write_industry_download">
+                <el-button type="primary" hc-btn :disabled="tableInternalKeys.length <= 0">
+                    <HcIcon name="download"/>
+                    <span>下载</span>
+                </el-button>
+            </HcTooltip>
+            <HcTooltip keys="write_industry_print">
+                <el-button hc-btn :disabled="tableInternalKeys.length <= 0">
+                    <HcIcon name="printer"/>
+                    <span>打印</span>
+                </el-button>
+            </HcTooltip>
+        </template>
+        <HcTable ref="tableInternalRef" :column="tableInternalColumn" :datas="tableInternalData" :loading="tableInternalLoading" isCheck @selection-change="tableInternalSelection">
+            <template #taskStatus="{row}">
+                <el-tag type="success" class="mx-1" effect="dark" v-if="row['taskStatus'] === '已审批'">已审批</el-tag>
+                <el-tag type="danger" class="mx-1" effect="dark" v-if="row['taskStatus'] === '待审批'">待审批</el-tag>
+                <el-tag type="warning" class="mx-1" effect="dark" v-if="row['taskStatus'] === '未上报'">未上报</el-tag>
+            </template>
+            <template #isEvaluate="{row}">
+                <el-tag type="success" class="mx-1" effect="dark" v-if="row['isEvaluate']">是</el-tag>
+                <el-tag type="info" class="mx-1" effect="dark" v-else>否</el-tag>
+            </template>
+            <template #isExperiment="{row}">
+                <el-tag type="success" class="mx-1" effect="dark" v-if="row['isExperiment']">是</el-tag>
+                <el-tag type="info" class="mx-1" effect="dark" v-else>否</el-tag>
+            </template>
+        </HcTable>
+        <template #action>
+            <HcPages :pages="searchInternalForm" @change="pageInternalChange"/>
+        </template>
+    </HcCard>
+</template>
+
+<script setup>
+import {ref, nextTick, watch} from "vue";
+import {getArrValue} from "vue-utils-plus"
+import internalApi from '~api/ledger/internal';
+
+//参数
+const props = defineProps({
+    projectId: {
+        type: [String,Number],
+        default: ''
+    },
+    contractId: {
+        type: [String,Number],
+        default: ''
+    },
+    treeData: {
+        type: Object,
+        default: () => ({})
+    }
+})
+
+//变量
+const projectId = ref(props.projectId);
+const contractId = ref(props.contractId);
+const nodeData = ref(props.treeData);
+
+//监听
+watch(() => [
+    props.treeData
+], ([treeData]) => {
+    nodeData.value = treeData;
+    setQueryData(treeData)
+})
+
+//渲染完成
+nextTick(() => {
+    setQueryData(props.treeData)
+})
+
+//获取相关数据
+const setQueryData = (data) => {
+    const cid = data?.contractIdRelation || ''
+    const wbsId = data['contractIdRelation'] ? data['id'] : data['primaryKeyId']
+    if (wbsId) {
+        searchInternalForm.value.contractId = cid ? cid : contractId.value;
+        searchInternalForm.value.contractIdRelation = data['contractIdRelation']
+        searchInternalForm.value.wbsIds = [wbsId]
+        searchInternalClick()
+    }
+}
+
+//审批状态
+const InternalApproval = ref([
+    {label: "未上报", value: "1"},
+    {label: "待审批", value: "2"},
+    {label: "已审批", value: "3"}
+])
+//是否评定
+const InternalAssess = ref([
+    {label: "是", value: true},
+    {label: "否", value: false}
+])
+
+//上报批次
+const InternalReportBatch = ref([])
+
+//是否关联试验
+const InternalAssociation = ref([
+    {label: "是", value: true},
+    {label: "否", value: false}
+])
+
+//搜索表单
+const searchInternalForm = ref({
+    taskStatus: null, isEvaluate: null, reportNumber: null, isExperiment: null,
+    current: 1, size: 20, total: 0
+})
+
+//回车
+const searchInternalKeyUp = (e) => {
+    if (e.key === "Enter") {
+        searchInternalClick()
+    }
+}
+
+//搜索
+const searchInternalClick = () => {
+    if (searchInternalForm.value?.wbsIds) {
+        searchInternalForm.value.current = 1;
+        getTableInternalData()
+    } else {
+        window?.$message?.warning('请先选择一个树节点')
+    }
+}
+
+//分页被点击
+const pageInternalChange = ({current, size}) => {
+    searchInternalForm.value.current = current
+    searchInternalForm.value.size = size
+    getTableInternalData()
+}
+
+//内业台账表头
+const tableInternalRef = ref(null)
+const tableInternalColumn = ref([
+    {key:'unitProject', name: '单位工程'},
+    {key:'partProject', name: '分部工程'},
+    {key:'partChildProject', name: '子分部工程'},
+    {key:'subentryProject', name: '分项工程'},
+    {key:'subentryChildProject', name: '子分项工程'},
+    {key:'process', name: '工序'},
+    {key:'taskStatus', name: '审批状态', width: 120, align: 'center'},
+    {key:'reportNumber', name: '上报批次', width: 100, align: 'center'},
+    {key:'isEvaluate', name: '是否评定', width: 100, align: 'center'},
+    {key:'isExperiment', name: '关联试验', width: 100, align: 'center'},
+])
+const tableInternalData = ref([])
+
+//获取数据
+const tableInternalLoading = ref(false)
+const getTableInternalData = async () => {
+    tableInternalLoading.value = true
+    const {error, code, data} = await internalApi.queryInternalPage({
+        ...searchInternalForm.value,
+        projectId: projectId.value,
+    })
+    //判断状态
+    tableInternalLoading.value = false
+    if (!error && code === 200) {
+        tableInternalData.value = getArrValue(data['records'])
+        searchInternalForm.value.total = data['total'] || 0
+    } else {
+        tableInternalData.value = []
+        searchInternalForm.value.total = 0
+    }
+}
+
+//多选
+const tableInternalKeys = ref([]);
+const tableInternalSelection = (rows) => {
+    tableInternalKeys.value = rows.filter((item) => {
+        return (item??'') !== '';
+    })
+}
+</script>

+ 233 - 0
src/views/ledger/components/weather.vue

@@ -0,0 +1,233 @@
+<template>
+    <HcCard>
+        <template #header>
+            <div class="w-64">
+                <HcDatePicker :dates="weatherTime" size="large" clearable @change="weatherTimeUpdate"/>
+            </div>
+            <div class="ml-2">
+                <el-button type="primary" size="large" @click="searchWeatherClick">搜索</el-button>
+            </div>
+        </template>
+        <template #extra>
+            <HcTooltip keys="write_weather_print">
+                <el-button hc-btn>
+                    <HcIcon name="printer"/>
+                    <span>打印</span>
+                </el-button>
+            </HcTooltip>
+        </template>
+        <HcTable :column="tableWeatherColumn" :datas="tableWeatherData" :loading="tableWeatherLoading">
+            <template #tempLow="{row}">{{row['tempLow']}} ~ {{row['tempHigh']}}</template>
+            <template #action="{row}">
+                <HcTooltip keys="write_weather_edit">
+                    <el-button type="primary" plain size="small" @click="tableWeatherEdit(row)">
+                        <HcIcon name="edit"/>
+                        <span>编辑</span>
+                    </el-button>
+                </HcTooltip>
+            </template>
+        </HcTable>
+        <template #action>
+            <HcPages :pages="searchWeatherForm" @change="pageWeatherChange"/>
+        </template>
+    </HcCard>
+
+    <!--编辑天气台账-->
+    <el-dialog v-model="showWeatherEditModal" title="编辑天气台账" width="38rem" class="hc-modal-border">
+        <el-form ref="weatherFormRef" :model="weatherFormModel" :rules="weatherFormRules" label-width="auto" size="large">
+            <el-form-item label="日期">
+                <el-input v-model="weatherFormModel.recordTime" disabled/>
+            </el-form-item>
+            <el-form-item label="天气" prop="weather">
+                <el-input v-model="weatherFormModel.weather" placeholder="天气"/>
+            </el-form-item>
+            <el-form-item label="最低温度" prop="tempLow">
+                <el-input type="number" v-model="weatherFormModel.tempLow" placeholder="最低温度"/>
+            </el-form-item>
+            <el-form-item label="最高温度" prop="tempHigh">
+                <el-input type="number" v-model="weatherFormModel.tempHigh" placeholder="最高温度"/>
+            </el-form-item>
+            <el-form-item label="风力" prop="windLevel">
+                <el-input v-model="weatherFormModel.windLevel" placeholder="风力"/>
+            </el-form-item>
+        </el-form>
+        <template #footer>
+            <div class="dialog-footer">
+                <el-button size="large" @click="showWeatherEditModal = false">
+                    <HcIcon name="close"/>
+                    <span>取消</span>
+                </el-button>
+                <el-button type="primary" hc-btn :loading="saveWeatherLoading" @click="saveWeatherClick">
+                    <HcIcon name="save"/>
+                    <span>提交保存</span>
+                </el-button>
+            </div>
+        </template>
+    </el-dialog>
+
+</template>
+
+<script setup>
+import {ref, nextTick} from "vue";
+import {deepClone, formValidate, getArrValue} from "vue-utils-plus"
+import weatherApi from '~api/ledger/weather';
+
+//参数
+const props = defineProps({
+    projectId: {
+        type: [String,Number],
+        default: ''
+    },
+    contractId: {
+        type: [String,Number],
+        default: ''
+    }
+})
+
+//变量
+const projectId = ref(props.projectId);
+const contractId = ref(props.contractId);
+
+//渲染完成
+nextTick(() => {
+    searchWeatherClick()
+})
+
+//搜索表单
+const searchWeatherForm = ref({recordTime: '', current: 1, size: 20, total: 0})
+
+//日期时间被选择
+const weatherTime = ref(null)
+const weatherTimeUpdate = ({val,arr}) => {
+    weatherTime.value = arr
+    searchWeatherForm.value.recordTime = val['start'] + '~' + val['end']
+}
+
+//搜索
+const searchWeatherClick = () => {
+    searchWeatherForm.value.current = 1;
+    getTableWeatherData()
+}
+
+//分页被点击
+const pageWeatherChange = ({current, size}) => {
+    searchWeatherForm.value.current = current
+    searchWeatherForm.value.size = size
+    getTableWeatherData()
+}
+
+//天气台账表头
+const tableWeatherColumn = ref([
+    {key:'recordTime', name: '日期'},
+    {key:'weather', name: '天气'},
+    {key:'tempLow', name: '温度 ℃'},
+    {key:'airTemp', name: '平均温度 ℃'},
+    {key:'windLevel', name: '风力'},
+    {key:'action', name: '操作', width: 100}
+])
+const tableWeatherData = ref([])
+
+//获取数据
+const tableWeatherLoading = ref(false)
+const getTableWeatherData = async () => {
+    tableWeatherLoading.value = true
+    const {error, code, data} = await weatherApi.queryWeatherPage({
+        ...searchWeatherForm.value,
+        projectId: projectId.value,
+        contractId: contractId.value
+    })
+    //判断状态
+    tableWeatherLoading.value = false
+    if (!error && code === 200) {
+        tableWeatherData.value = getArrValue(data['records'])
+        searchWeatherForm.value.total = data['total'] || 0
+    } else {
+        tableWeatherData.value = []
+        searchWeatherForm.value.total = 0
+    }
+}
+
+//天气台账编辑
+const showWeatherEditModal = ref(false)
+const tableWeatherEdit = (row) => {
+    weatherFormModel.value = deepClone(row)
+    saveWeatherLoading.value = false
+    showWeatherEditModal.value = true
+}
+
+//天气台账表单
+const weatherFormRef = ref(null)
+const weatherFormModel = ref({recordTime: '', weather: '', tempLow: null, tempHigh: null, windLevel: ''})
+const weatherFormRules = ref({
+    weather: {
+        required: true,
+        trigger: 'blur',
+        message: "请输入天气"
+    },
+    tempLow: {
+        required: true,
+        validator: (rule, value, callback) => {
+            const tempHigh = weatherFormModel.value?.tempHigh ?? ''
+            const val = Number(value)
+            const high = Number(tempHigh);
+            if (!val) {
+                callback(new Error('请输入最低温度'))
+            } else if (val > high) {
+                callback(new Error('最低温度不能高于最高温度'))
+            } else if (val === high) {
+                callback(new Error('最低温度和最高温度,不能一致'))
+            } else {
+                callback()
+            }
+        },
+        trigger: "blur",
+    },
+    tempHigh: {
+        required: true,
+        validator: (rule, value, callback) => {
+            const tempLow = weatherFormModel.value?.tempLow ?? ''
+            const val = Number(value)
+            const low = Number(tempLow);
+            if (!val) {
+                callback(new Error('请输入最高温度'))
+            } else if (val < low) {
+                callback(new Error('最高温度不能低于最低温度'))
+            } else if (val === low) {
+                callback(new Error('最高温度和最低温度,不能一致'))
+            } else {
+                callback()
+            }
+        },
+        trigger: "blur",
+    },
+    windLevel: {
+        required: true,
+        trigger: 'blur',
+        message: "请输入风力"
+    },
+})
+
+//提交保存
+const saveWeatherLoading = ref(false)
+const saveWeatherClick = async () => {
+    const validate = await formValidate(weatherFormRef.value)
+    if (validate) {
+        //发起请求
+        saveWeatherLoading.value = true
+        const {error, code} = await weatherApi.updateWeatherById({
+            ...weatherFormModel.value,
+            projectId: projectId.value,
+            contractId: contractId.value
+        },false)
+        //处理数据
+        saveWeatherLoading.value = false
+        if (!error && code === 200) {
+            window?.$message?.success('保存成功')
+            showWeatherEditModal.value = false;
+            getTableWeatherData()
+        } else {
+            window?.$message?.error('保存失败')
+        }
+    }
+}
+</script>

+ 7 - 556
src/views/ledger/write.vue

@@ -21,194 +21,16 @@
         <div class="hc-layout-content-box">
             <HcTabsSimple :datas="sbTableData" :cur="sbTableKey" @tabClick="sbTableClick">
                 <template #tab-internal>
-                    <HcCard v-if="sbTableKey === 'internal'">
-                        <template #header>
-                            <div class="w-32">
-                                <el-select v-model="searchInternalForm.taskStatus" placeholder="审批状态" clearable size="large">
-                                    <el-option v-for="item in InternalApproval" :key="item.value" :label="item['label']" :value="item['value']"/>
-                                </el-select>
-                            </div>
-                            <div class="w-32 ml-2">
-                                <el-select v-model="searchInternalForm.isEvaluate" placeholder="是否评定" clearable size="large">
-                                    <el-option v-for="item in InternalAssess" :key="item.value" :label="item['label']" :value="item['value']"/>
-                                </el-select>
-                            </div>
-                            <div class="w-32 ml-2">
-                                <el-select v-model="searchInternalForm.reportNumber" placeholder="上报批次" clearable size="large">
-                                    <el-option v-for="item in InternalReportBatch" :key="item.value" :label="item['label']" :value="item['value']"/>
-                                </el-select>
-                            </div>
-                            <div class="w-32 ml-2">
-                                <el-select v-model="searchInternalForm.isExperiment" placeholder="关联试验" clearable size="large">
-                                    <el-option v-for="item in InternalAssociation" :key="item.value" :label="item['label']" :value="item['value']"/>
-                                </el-select>
-                            </div>
-                            <div class="w-60 ml-2">
-                                <el-input v-model="searchInternalForm.queryStr" placeholder="请输入名称关键词检索" size="large" clearable @keyup="searchInternalKeyUp"/>
-                            </div>
-                            <div class="ml-2">
-                                <el-button type="primary" size="large" @click="searchInternalClick">
-                                    <HcIcon name="search-2"/>
-                                    <span>搜索</span>
-                                </el-button>
-                            </div>
-                        </template>
-                        <template #extra>
-                            <HcTooltip keys="write_industry_download">
-                                <el-button type="primary" hc-btn :disabled="tableInternalKeys.length <= 0">
-                                    <HcIcon name="download"/>
-                                    <span>下载</span>
-                                </el-button>
-                            </HcTooltip>
-                            <HcTooltip keys="write_industry_print">
-                                <el-button hc-btn :disabled="tableInternalKeys.length <= 0">
-                                    <HcIcon name="printer"/>
-                                    <span>打印</span>
-                                </el-button>
-                            </HcTooltip>
-                        </template>
-                        <HcTable ref="tableInternalRef" :column="tableInternalColumn" :datas="tableInternalData" :loading="tableInternalLoading" isCheck @selection-change="tableInternalSelection">
-                            <template #taskStatus="{row}">
-                                <el-tag type="success" class="mx-1" effect="dark" v-if="row['taskStatus'] === '已审批'">已审批</el-tag>
-                                <el-tag type="danger" class="mx-1" effect="dark" v-if="row['taskStatus'] === '待审批'">待审批</el-tag>
-                                <el-tag type="warning" class="mx-1" effect="dark" v-if="row['taskStatus'] === '未上报'">未上报</el-tag>
-                            </template>
-                            <template #isEvaluate="{row}">
-                                <el-tag type="success" class="mx-1" effect="dark" v-if="row['isEvaluate']">是</el-tag>
-                                <el-tag type="info" class="mx-1" effect="dark" v-else>否</el-tag>
-                            </template>
-                            <template #isExperiment="{row}">
-                                <el-tag type="success" class="mx-1" effect="dark" v-if="row['isExperiment']">是</el-tag>
-                                <el-tag type="info" class="mx-1" effect="dark" v-else>否</el-tag>
-                            </template>
-                        </HcTable>
-                        <template #action>
-                            <HcPages :pages="searchInternalForm" @change="pageInternalChange"/>
-                        </template>
-                    </HcCard>
+                    <HcInternal v-if="sbTableKey === 'internal'" :projectId="projectId" :contractId="contractId" :treeData="nodeDataInfo"/>
                 </template>
                 <template #tab-construction>
-                    <HcCard v-if="sbTableKey === 'construction'">
-                        <HcTable :column="tableConstructionColumn" :datas="tableConstructionData" :loading="tableConstructionLoading">
-                            <template #action="{row}">
-                                <HcTooltip keys="write_construction_edit">
-                                    <el-button type="primary" plain size="small" @click="tableConstructionEdit(row)">
-                                        <HcIcon name="edit"/>
-                                        <span>编辑</span>
-                                    </el-button>
-                                </HcTooltip>
-                            </template>
-                        </HcTable>
-                        <template #action>
-                            <HcPages :pages="searchConstructionForm" @change="pageConstructionChange"/>
-                        </template>
-                    </HcCard>
+                    <HcConstruction v-if="sbTableKey === 'construction'" :projectId="projectId" :contractId="contractId" :treeData="nodeDataInfo"/>
                 </template>
                 <template #tab-weather>
-                    <HcCard v-if="sbTableKey === 'weather'">
-                        <template #header>
-                            <div class="w-64">
-                                <HcDatePicker :dates="weatherTime" size="large" clearable @change="weatherTimeUpdate"/>
-                            </div>
-                            <div class="ml-2">
-                                <el-button type="primary" size="large" @click="searchWeatherClick">搜索</el-button>
-                            </div>
-                        </template>
-                        <template #extra>
-                            <HcTooltip keys="write_weather_print">
-                                <el-button hc-btn>
-                                    <HcIcon name="printer"/>
-                                    <span>打印</span>
-                                </el-button>
-                            </HcTooltip>
-                        </template>
-                        <HcTable :column="tableWeatherColumn" :datas="tableWeatherData" :loading="tableWeatherLoading">
-                            <template #tempLow="{row}">{{row['tempLow']}} ~ {{row['tempHigh']}}</template>
-                            <template #action="{row}">
-                                <HcTooltip keys="write_weather_edit">
-                                    <el-button type="primary" plain size="small" @click="tableWeatherEdit(row)">
-                                        <HcIcon name="edit"/>
-                                        <span>编辑</span>
-                                    </el-button>
-                                </HcTooltip>
-                            </template>
-                        </HcTable>
-                        <template #action>
-                            <HcPages :pages="searchWeatherForm" @change="pageWeatherChange"/>
-                        </template>
-                    </HcCard>
+                    <HcWeather v-if="sbTableKey === 'weather'" :projectId="projectId" :contractId="contractId"/>
                 </template>
             </HcTabsSimple>
         </div>
-
-        <!--编辑施工台账-->
-        <el-dialog v-model="showConstructionEditModal" title="编辑施工台账" width="38rem" class="hc-modal-border">
-            <el-form ref="constructionFormRef" :model="constructionFormModel" :rules="constructionFormRules" label-width="auto" size="large">
-                el-form-item
-            </el-form>
-            <!--n-form ref="formRef" :model="formValue" :rules="rules" label-placement="left" label-width="auto" size="large">
-                <n-form-item label="施工起止日期" path="siteTimeStr">
-                    <n-date-picker class="flex-1" v-model:formatted-value="siteTime" value-format="yyyy-MM-dd" type="daterange" clearable @update:value="siteTimeUpdate"/>
-                </n-form-item>
-                <n-form-item label="检测起止日期" path="detectionTimeStr">
-                    <n-date-picker class="flex-1" v-model:formatted-value="detectionTime" value-format="yyyy-MM-dd" type="daterange" clearable @update:value="detectionTimeUpdate"/>
-                </n-form-item>
-                <div class="flex">
-                    <n-form-item class="flex-1" label="设计方量">
-                        <n-input v-model:value="formValue.designVolume" placeholder="请输入设计方量"/>
-                    </n-form-item>
-                    <n-form-item class="flex-1" label="实际方量">
-                        <n-input v-model:value="formValue.actualVolume" placeholder="请输入实际方量"/>
-                    </n-form-item>
-                </div>
-            </n-form-->
-            <template #footer>
-                <div class="dialog-footer">
-                    <el-button size="large" @click="showConstructionEditModal = false">
-                        <HcIcon name="close"/>
-                        <span>取消</span>
-                    </el-button>
-                    <el-button type="primary" hc-btn :loading="saveConstructionLoading" @click="saveConstructionClick">
-                        <HcIcon name="save"/>
-                        <span>提交保存</span>
-                    </el-button>
-                </div>
-            </template>
-        </el-dialog>
-
-        <!--编辑天气台账-->
-        <el-dialog v-model="showWeatherEditModal" title="编辑天气台账" width="38rem" class="hc-modal-border">
-            <el-form ref="weatherFormRef" :model="weatherFormModel" :rules="weatherFormRules" label-width="auto" size="large">
-                <el-form-item label="日期">
-                    <el-input v-model="weatherFormModel.recordTime" disabled/>
-                </el-form-item>
-                <el-form-item label="天气" prop="weather">
-                    <el-input v-model="weatherFormModel.weather" placeholder="天气"/>
-                </el-form-item>
-                <el-form-item label="最低温度" prop="tempLow">
-                    <el-input type="number" v-model="weatherFormModel.tempLow" placeholder="最低温度"/>
-                </el-form-item>
-                <el-form-item label="最高温度" prop="tempHigh">
-                    <el-input type="number" v-model="weatherFormModel.tempHigh" placeholder="最高温度"/>
-                </el-form-item>
-                <el-form-item label="风力" prop="windLevel">
-                    <el-input v-model="weatherFormModel.windLevel" placeholder="风力"/>
-                </el-form-item>
-            </el-form>
-            <template #footer>
-                <div class="dialog-footer">
-                    <el-button size="large" @click="showWeatherEditModal = false">
-                        <HcIcon name="close"/>
-                        <span>取消</span>
-                    </el-button>
-                    <el-button type="primary" hc-btn :loading="saveWeatherLoading" @click="saveWeatherClick">
-                        <HcIcon name="save"/>
-                        <span>提交保存</span>
-                    </el-button>
-                </div>
-            </template>
-        </el-dialog>
-
     </div>
 </template>
 
@@ -217,11 +39,10 @@ import {onMounted, ref, watch} from 'vue'
 import {useAppStore} from "~src/store";
 import {useRouter, useRoute} from 'vue-router'
 import WbsTree from "./components/WbsTree.vue"
-import weatherApi from '~api/ledger/weather';
-import internalApi from '~api/ledger/internal';
-import constructionApi from '~api/ledger/construction';
+import HcInternal from "./components/internal.vue"
+import HcWeather from "./components/weather.vue"
+import HcConstruction from "./components/construction.vue"
 import {getStoreData, setStoreData} from '~src/utils/storage'
-import {getArrValue, deepClone, formValidate} from "vue-utils-plus"
 
 //变量
 const router = useRouter()
@@ -270,11 +91,8 @@ onMounted(() => {
 
 //根据类型获取相关数据
 const getTypeData = (key) => {
-    if (key === 'weather') {
-        searchWeatherClick()
-    } else if (key === 'internal' || key === 'construction') {
+    if (key === 'internal' || key === 'construction') {
         treeAutoExpandKeys.value = getStoreData('ledgerWriteTreeKeys') || []
-        setWbsIds()
     }
 }
 
@@ -282,377 +100,10 @@ const getTypeData = (key) => {
 const nodeDataInfo = ref({})
 const nodeWbsElTreeClick = ({data, keys}) => {
     nodeDataInfo.value = data
-    //缓存节点
     setStoreData('ledgerWriteTreeKeys',keys)
     treeAutoExpandKeys.value = keys || []
-    setWbsIds()
-}
-
-const setWbsIds = () => {
-    const key = sbTableKey.value
-    const data = nodeDataInfo.value
-    const cid = data?.contractIdRelation || ''
-    const wbsId = data['contractIdRelation'] ? data['id'] : data['primaryKeyId']
-    if (wbsId && key === 'internal') {
-        searchInternalForm.value.contractId = cid ? cid : contractId.value;
-        searchInternalForm.value.contractIdRelation = data['contractIdRelation']
-        searchInternalForm.value.wbsIds = [wbsId]
-        searchInternalClick()
-    } else if (wbsId && key === 'construction') {
-        searchConstructionForm.value.contractId = cid ? cid : contractId.value;
-        searchConstructionForm.value.contractIdRelation = data['contractIdRelation']
-        searchConstructionForm.value.wbsIds = [wbsId]
-        searchConstructionClick()
-    }
-}
-
-//--------内业台账---------
-
-//审批状态
-const InternalApproval = ref([
-    {label: "未上报", value: "1"},
-    {label: "待审批", value: "2"},
-    {label: "已审批", value: "3"}
-])
-//是否评定
-const InternalAssess = ref([
-    {label: "是", value: true},
-    {label: "否", value: false}
-])
-
-//上报批次
-const InternalReportBatch = ref([])
-
-//是否关联试验
-const InternalAssociation = ref([
-    {label: "是", value: true},
-    {label: "否", value: false}
-])
-
-//搜索表单
-const searchInternalForm = ref({
-    taskStatus: null, isEvaluate: null, reportNumber: null, isExperiment: null,
-    current: 1, size: 20, total: 0
-})
-
-//回车
-const searchInternalKeyUp = (e) => {
-    if (e.key === "Enter") {
-        searchInternalClick()
-    }
-}
-
-//搜索
-const searchInternalClick = () => {
-    if (searchInternalForm.value?.wbsIds) {
-        searchInternalForm.value.current = 1;
-        getTableInternalData()
-    } else {
-        window?.$message?.warning('请先选择一个树节点')
-    }
-}
-
-//分页被点击
-const pageInternalChange = ({current, size}) => {
-    searchInternalForm.value.current = current
-    searchInternalForm.value.size = size
-    getTableInternalData()
-}
-
-//内业台账表头
-const tableInternalRef = ref(null)
-const tableInternalColumn = ref([
-    {key:'unitProject', name: '单位工程'},
-    {key:'partProject', name: '分部工程'},
-    {key:'partChildProject', name: '子分部工程'},
-    {key:'subentryProject', name: '分项工程'},
-    {key:'subentryChildProject', name: '子分项工程'},
-    {key:'process', name: '工序'},
-    {key:'taskStatus', name: '审批状态', width: 120, align: 'center'},
-    {key:'reportNumber', name: '上报批次', width: 100, align: 'center'},
-    {key:'isEvaluate', name: '是否评定', width: 100, align: 'center'},
-    {key:'isExperiment', name: '关联试验', width: 100, align: 'center'},
-])
-const tableInternalData = ref([])
-
-//获取数据
-const tableInternalLoading = ref(false)
-const getTableInternalData = async () => {
-    tableInternalLoading.value = true
-    const {error, code, data} = await internalApi.queryInternalPage({
-        ...searchInternalForm.value,
-        projectId: projectId.value,
-    })
-    //判断状态
-    tableInternalLoading.value = false
-    if (!error && code === 200) {
-        tableInternalData.value = getArrValue(data['records'])
-        searchInternalForm.value.total = data['total'] || 0
-    } else {
-        tableInternalData.value = []
-        searchInternalForm.value.total = 0
-    }
-}
-
-//多选
-const tableInternalKeys = ref([]);
-const tableInternalSelection = (rows) => {
-    tableInternalKeys.value = rows.filter((item) => {
-        return (item??'') !== '';
-    })
-}
-
-//--------内业台账 end---------
-
-//--------施工台账---------
-
-//搜索表单
-const searchConstructionForm = ref({current: 1, size: 20, total: 0})
-
-//搜索
-const searchConstructionClick = () => {
-    if (searchConstructionForm.value?.wbsIds) {
-        searchConstructionForm.value.current = 1;
-        getTableConstructionData()
-    } else {
-        window?.$message?.warning('请先选择一个树节点')
-    }
 }
 
-//分页被点击
-const pageConstructionChange = ({current, size}) => {
-    searchConstructionForm.value.current = current
-    searchConstructionForm.value.size = size
-    getTableConstructionData()
-}
-
-//施工台账表头
-const tableConstructionColumn = ref([
-    {key:'station', name: '施工桩号'},
-    {key:'site', name: '施工部位'},
-    {key:'siteTimeStr', name: '施工起止日期'},
-    {key:'detectionTimeStr', name: '检测日期'},
-    {key:'designVolume', name: '设计方量'},
-    {key:'actualVolume', name: '实际方量'},
-    {key:'action', name: '操作', width: 100}
-])
-const tableConstructionData = ref([])
-
-//获取数据
-const tableConstructionLoading = ref(false)
-const getTableConstructionData = async () => {
-    tableConstructionLoading.value = true
-    const {error, code, data} = await constructionApi.queryConstructionPage({
-        ...searchConstructionForm.value,
-        projectId: projectId.value,
-    })
-    //判断状态
-    tableConstructionLoading.value = false
-    if (!error && code === 200) {
-        tableConstructionData.value = getArrValue(data['records'])
-        searchConstructionForm.value.total = data['total'] || 0
-    } else {
-        tableConstructionData.value = []
-        searchConstructionForm.value.total = 0
-    }
-}
-
-//施工台账编辑
-const showConstructionEditModal = ref(false)
-const tableConstructionEdit = (row) => {
-    showConstructionEditModal.value = true
-}
-
-//施工台账表单
-const constructionFormRef = ref(null)
-const constructionFormModel = ref({
-    recordTime: '',
-    weather: '',
-    tempLow: null,
-    tempHigh: null,
-    windLevel: ''
-})
-const constructionFormRules = ref({
-    weather: {
-        required: true,
-        trigger: 'blur',
-        message: "请输入天气"
-    },
-    tempLow: {
-        required: true,
-        validator: (rule, value, callback) => {
-            const tempHigh = weatherFormModel.value?.tempHigh ?? ''
-            const val = Number(value)
-            const high = Number(tempHigh);
-            if (!val) {
-                callback(new Error('请输入最低温度'))
-            } else if (val > high) {
-                callback(new Error('最低温度不能高于最高温度'))
-            } else if (val === high) {
-                callback(new Error('最低温度和最高温度,不能一致'))
-            } else {
-                callback()
-            }
-        },
-        trigger: "blur",
-    },
-})
-
-//提交保存
-const saveConstructionLoading = ref(false)
-const saveConstructionClick = async () => {
-    const validate = await formValidate(constructionFormRef.value)
-    if (validate) {
-        console.log(validate)
-        //updateConstructionPage
-    }
-}
-
-//--------施工台账 end---------
-
-//--------天气台账---------
-
-//搜索表单
-const searchWeatherForm = ref({recordTime: '', current: 1, size: 20, total: 0})
-
-//日期时间被选择
-const weatherTime = ref(null)
-const weatherTimeUpdate = ({val,arr}) => {
-    weatherTime.value = arr
-    searchWeatherForm.value.recordTime = val['start'] + '~' + val['end']
-}
-
-//搜索
-const searchWeatherClick = () => {
-    searchWeatherForm.value.current = 1;
-    getTableWeatherData()
-}
-
-//分页被点击
-const pageWeatherChange = ({current, size}) => {
-    searchWeatherForm.value.current = current
-    searchWeatherForm.value.size = size
-    getTableWeatherData()
-}
-
-//天气台账表头
-const tableWeatherColumn = ref([
-    {key:'recordTime', name: '日期'},
-    {key:'weather', name: '天气'},
-    {key:'tempLow', name: '温度 ℃'},
-    {key:'airTemp', name: '平均温度 ℃'},
-    {key:'windLevel', name: '风力'},
-    {key:'action', name: '操作', width: 100}
-])
-const tableWeatherData = ref([])
-
-//获取数据
-const tableWeatherLoading = ref(false)
-const getTableWeatherData = async () => {
-    tableWeatherLoading.value = true
-    const {error, code, data} = await weatherApi.queryWeatherPage({
-        ...searchWeatherForm.value,
-        projectId: projectId.value,
-        contractId: contractId.value
-    })
-    //判断状态
-    tableWeatherLoading.value = false
-    if (!error && code === 200) {
-        tableWeatherData.value = getArrValue(data['records'])
-        searchWeatherForm.value.total = data['total'] || 0
-    } else {
-        tableWeatherData.value = []
-        searchWeatherForm.value.total = 0
-    }
-}
-
-//天气台账编辑
-const showWeatherEditModal = ref(false)
-const tableWeatherEdit = (row) => {
-    weatherFormModel.value = deepClone(row)
-    saveWeatherLoading.value = false
-    showWeatherEditModal.value = true
-}
-
-//天气台账表单
-const weatherFormRef = ref(null)
-const weatherFormModel = ref({recordTime: '', weather: '', tempLow: null, tempHigh: null, windLevel: ''})
-const weatherFormRules = ref({
-    weather: {
-        required: true,
-        trigger: 'blur',
-        message: "请输入天气"
-    },
-    tempLow: {
-        required: true,
-        validator: (rule, value, callback) => {
-            const tempHigh = weatherFormModel.value?.tempHigh ?? ''
-            const val = Number(value)
-            const high = Number(tempHigh);
-            if (!val) {
-                callback(new Error('请输入最低温度'))
-            } else if (val > high) {
-                callback(new Error('最低温度不能高于最高温度'))
-            } else if (val === high) {
-                callback(new Error('最低温度和最高温度,不能一致'))
-            } else {
-                callback()
-            }
-        },
-        trigger: "blur",
-    },
-    tempHigh: {
-        required: true,
-        validator: (rule, value, callback) => {
-            const tempLow = weatherFormModel.value?.tempLow ?? ''
-            const val = Number(value)
-            const low = Number(tempLow);
-            if (!val) {
-                callback(new Error('请输入最高温度'))
-            } else if (val < low) {
-                callback(new Error('最高温度不能低于最低温度'))
-            } else if (val === low) {
-                callback(new Error('最高温度和最低温度,不能一致'))
-            } else {
-                callback()
-            }
-        },
-        trigger: "blur",
-    },
-    windLevel: {
-        required: true,
-        trigger: 'blur',
-        message: "请输入风力"
-    },
-})
-
-//提交保存
-const saveWeatherLoading = ref(false)
-const saveWeatherClick = async () => {
-    const validate = await formValidate(weatherFormRef.value)
-    if (validate) {
-        //发起请求
-        saveWeatherLoading.value = true
-        const {error, code} = await weatherApi.updateWeatherById({
-            ...weatherFormModel.value,
-            projectId: projectId.value,
-            contractId: contractId.value
-        },false)
-        //处理数据
-        saveWeatherLoading.value = false
-        if (!error && code === 200) {
-            window?.$message?.success('保存成功')
-            showWeatherEditModal.value = false;
-            getTableWeatherData()
-        } else {
-            window?.$message?.error('保存失败')
-        }
-    }
-}
-
-//--------天气台账 end---------
-
-
 //左右拖动,改变树形结构宽度
 const leftWidth = ref(382);
 const onmousedown = () => {

+ 323 - 0
src/views/tasks/components/TableCard.vue

@@ -0,0 +1,323 @@
+<template>
+    <HcCard>
+        <template #header>
+            <div class="w-32">
+                <el-select v-model="searchForm.taskType" block clearable size="large" placeholder="任务类型">
+                    <el-option v-for="item in tasksType" :label="item.dictValue" :value="item.dictKey"/>
+                </el-select>
+            </div>
+            <div class="w-32 ml-3">
+                <el-select v-model="searchForm.taskStatus" block clearable size="large" placeholder="任务状态">
+                    <el-option v-for="item in tasksStatus" :label="item.dictValue" :value="item.dictKey"/>
+                </el-select>
+            </div>
+            <div class="w-32 ml-3">
+                <el-select v-model="searchForm.contractId" placeholder="合同段" block clearable size="large" @change="ContractIdChange">
+                    <el-option v-for="item in contractList" :label="item.name" :value="item.id"/>
+                </el-select>
+            </div>
+            <div class="w-32 ml-3">
+                <el-select v-model="searchForm.batch" block clearable size="large" placeholder="上报批次">
+                    <el-option v-for="item in reportBatch" :label="item.batch" :value="item.batch"/>
+                </el-select>
+            </div>
+            <div class="w-64 ml-3">
+                <HcDatePicker :dates="betweenTime" size="large" clearable @change="betweenTimeUpdate"/>
+            </div>
+            <div class="w-56 ml-3">
+                <el-input v-model="searchForm.queryValue" block size="large" placeholder="请输入名称关键词检索" clearable @keyup="keyUpEvent"/>
+            </div>
+            <div class="ml-2">
+                <el-button type="primary" size="large" @click="searchClick">
+                    <HcIcon name="search-2"/>
+                    <span>搜索</span>
+                </el-button>
+            </div>
+        </template>
+        <template #extra>
+            <HcTooltip keys="tasks_data_set_sign_rules">
+                <el-button hc-btn @click="setSignRulesClick">
+                    <HcIcon name="settings"/>
+                    <span>设置重签规则</span>
+                </el-button>
+            </HcTooltip>
+            <HcTooltip keys="tasks_data_batch_review" v-if="isTableKey === 'key1'">
+                <el-button hc-btn type="primary" :disabled="tableCheckedKeys.length <= 0" @click="batchApprovalTaskClick">
+                    <HcIcon name="check-double"/>
+                    <span>批量审批</span>
+                </el-button>
+            </HcTooltip>
+        </template>
+        <HcTable ref="tableListRef" :column="tableListColumn" :datas="tableListData" :loading="tableLoading" isCheck @selection-change="tableSelectionChange">
+            <template #taskName="{row}">
+                <span class="text-link" @click="rowTaskName(row)">{{row?.taskName}}</span>
+            </template>
+            <template #taskStatus="{row}">
+                <el-tag :type="`${row['taskStatus']['status'] === 2 ? 'success' : row['taskStatus']['status'] === 3 ? 'warning' : 'info'}`"
+                        class="mx-1" effect="dark" v-if="row?.taskStatus?.statusValue">{{row['taskStatus']['statusValue']}}</el-tag>
+            </template>
+            <template #waitingUserList="{row}">
+                <template v-for="item in row['waitingUserList']">
+                    <el-tag :type="`${item.status === 2 ? 'success' : item.status === 3 ? 'warning' : item.status === 999 ? 'danger' : 'info'}`"
+                            class="mx-1" effect="dark" v-if="item['waitingUserName']">{{item['waitingUserName']}}</el-tag>
+                </template>
+            </template>
+        </HcTable>
+        <template #action>
+            <div class="lr-dialog-footer">
+                <div class="left">
+                    <span class="text-success">审批人员中:</span>
+                    <el-tag type="info" class="mx-1" effect="dark">未签字</el-tag>
+                    <el-tag type="success" class="mx-1" effect="dark">已签字</el-tag>
+                    <el-tag type="warning" class="mx-1" effect="dark">已废除</el-tag>
+                    <el-tag type="danger" class="mx-1" effect="dark">签字异常</el-tag>
+                </div>
+                <div class="right">
+                    <HcPages :pages="searchForm" @change="pageChange"/>
+                </div>
+            </div>
+        </template>
+    </HcCard>
+</template>
+
+<script setup>
+import {ref, nextTick, watch} from "vue";
+import {getArrValue} from "vue-utils-plus"
+import tasksApi from '~api/tasks/data';
+
+//参数
+const props = defineProps({
+    projectId: {
+        type: [String,Number],
+        default: ''
+    },
+    contractId: {
+        type: [String,Number],
+        default: ''
+    },
+    contractList: {
+        type: Array,
+        default: () => ([])
+    },
+    tableKey: {
+        type: String,
+        default: ''
+    }
+})
+
+//变量
+const projectId = ref(props.projectId);
+const contractId = ref(props.contractId);
+const isTableKey = ref(props.tableKey);
+
+//监听
+watch(() => [
+    props.tableKey,
+], ([Key]) => {
+    isTableKey.value = Key
+    setQueryData()
+})
+
+//渲染完成
+nextTick(() => {
+    setQueryData()
+})
+
+//获取相关数据
+const setQueryData = () => {
+    queryTaskType()
+    queryTaskStatus()
+    searchClick()
+}
+
+//获取任务类型
+const tasksType = ref([])
+const queryTaskType = async () => {
+    const { error, code, data } = await tasksApi.queryTaskTypeStatus({
+        typeOrStatus: 'task_type'
+    })
+    if (!error && code === 200) {
+        tasksType.value = getArrValue(data)
+    } else {
+        tasksType.value = []
+    }
+}
+
+//获取任务状态
+const tasksStatus = ref([])
+const queryTaskStatus = async () => {
+    const { error, code, data } = await tasksApi.queryTaskTypeStatus({
+        typeOrStatus: 'task_status'
+    })
+    if (!error && code === 200) {
+        tasksStatus.value = getArrValue(data)
+    } else {
+        tasksStatus.value = []
+    }
+}
+
+//合同段
+const contractList = ref(props.contractList)
+const ContractIdChange = () => {
+    queryBatchList()
+}
+
+//获取上报批次
+const reportBatch = ref([])
+const queryBatchList = async () => {
+    const {contractId} = searchForm.value
+    const { error, code, data } = await tasksApi.queryBatchList({
+        projectId: projectId.value,
+        contractId: contractId || ''
+    })
+    if (!error && code === 200) {
+        reportBatch.value = getArrValue(data)
+    } else {
+        reportBatch.value = []
+    }
+}
+
+//搜索表单
+const searchForm = ref({
+    queryValue: null, taskType: null, taskStatus: null, batch: null, startTime: null, endTime: null,
+    current: 1, size: 20, total: 0
+})
+
+//日期时间被选择
+const betweenTime = ref(null)
+const betweenTimeUpdate = ({val,arr}) => {
+    betweenTime.value = arr
+    searchForm.value.startTime = val['start']
+    searchForm.value.endTime = val['end']
+}
+
+//回车搜索
+const keyUpEvent = (e) => {
+    if (e.key === "Enter") {
+        searchForm.value.current = 1;
+        getTableData()
+    }
+}
+
+//搜索
+const searchClick = () => {
+    searchForm.value.current = 1;
+    getTableData()
+}
+
+//分页被点击
+const pageChange = ({current, size}) => {
+    searchForm.value.current = current
+    searchForm.value.size = size
+    getTableData()
+}
+
+//获取数据
+const tableLoading = ref(false)
+const tableListColumn = ref([
+    {key:'taskName', name: '任务名称'},
+    {key:'typeValue', name: '任务类型', width: '120'},
+    {key:'taskStatus', name: '任务状态', width: '160'},
+    {key:'startTime', name: '开始时间', width: '180'},
+    {key:'endTime', name: '限定时间', width: '180'},
+    {key:'taskContent', name: '任务描述'},
+    {key:'reportUserName', name: '上报人', width: '120'},
+    {key:'waitingUserList', name: '签字人员'},
+])
+const tableListData = ref([])
+const getTableData = () => {
+    const key = isTableKey.value
+    tableListRef.value?.clearSelection()
+    tableCheckedKeys.value = []
+    if(key === 'key1') {
+        queryUserToDoTaskList()
+    } else if(key === 'key2') {
+        queryUserDoneTaskList()
+    } else if (key === 'key3') {
+        queryUserStartFlow()
+    }
+}
+
+//待办任务列表
+const queryUserToDoTaskList = async () => {
+    tableLoading.value = true
+    const { error, code, data } = await tasksApi.queryUserToDoTaskList({
+        ...searchForm.value,
+        projectId: projectId.value
+    })
+    //处理数据
+    tableLoading.value = false
+    if (!error && code === 200) {
+        tableListData.value = getArrValue(data['records'])
+        searchForm.value.total = data.total || 0
+    } else {
+        tableListData.value = []
+        searchForm.value.total = 0
+    }
+}
+//获取已办任务
+const queryUserDoneTaskList = async () => {
+    tableLoading.value = true
+    const { error, code, data } = await tasksApi.queryUserDoneTaskList({
+        ...searchForm.value,
+        projectId: projectId.value
+    })
+    //处理数据
+    tableLoading.value = false
+    if (!error && code === 200) {
+        tableListData.value = getArrValue(data['records'])
+        searchForm.value.total = data.total || 0
+    } else {
+        tableListData.value = []
+        searchForm.value.total = 0
+    }
+}
+//获取我发起的
+const queryUserStartFlow = async () => {
+    tableLoading.value = true
+    const { error, code, data } = await tasksApi.queryUserStartFlow({
+        ...searchForm.value,
+        projectId: projectId.value
+    })
+    //处理数据
+    tableLoading.value = false
+    if (!error && code === 200) {
+        tableListData.value = getArrValue(data['records'])
+        searchForm.value.total = data.total || 0
+    } else {
+        tableListData.value = []
+        searchForm.value.total = 0
+    }
+}
+
+//多选
+const tableListRef = ref(null)
+const tableCheckedKeys = ref([]);
+const tableSelectionChange = (rows) => {
+    tableCheckedKeys.value = rows.filter((item) => {
+        return (item??'') !== '';
+    })
+}
+
+//事件
+const emit = defineEmits(['rowTaskName','signRules','batchApproval'])
+
+//任务审核
+const rowTaskName = () => {
+    emit('rowTaskName', {})
+}
+
+//设置重签规则
+const setSignRulesClick = () => {
+    emit('signRules', {})
+}
+
+//批量审批
+const batchApprovalTaskClick = () => {
+    emit('batchApproval', {})
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 19 - 267
src/views/tasks/hc-data.vue

@@ -1,89 +1,21 @@
 <template>
     <div class="hc-layout-box">
-        <!--https://codepen.io/weilanwl/pen/JjLVyOd-->
-        <HcSbTable :datas="sbTableData" :cur="sbTableKey" @tabClick="sbTableClick"/>
-        <div class="hc-content-box">
-            <HcCard :scrollbar="false" actionSize="lg">
-                <template #header>
-                    <div class="w-32">
-                        <el-select v-model="searchForm.taskType" block clearable size="large" placeholder="任务类型">
-                            <el-option v-for="item in tasksType" :label="item.dictValue" :value="item.dictKey"/>
-                        </el-select>
-                    </div>
-                    <div class="w-32 ml-3">
-                        <el-select v-model="searchForm.taskStatus" block clearable size="large" placeholder="任务状态">
-                            <el-option v-for="item in tasksStatus" :label="item.dictValue" :value="item.dictKey"/>
-                        </el-select>
-                    </div>
-                    <div class="w-32 ml-3">
-                        <el-select v-model="searchForm.contractId" placeholder="合同段" block clearable size="large" @change="ContractIdChange">
-                            <el-option v-for="item in contractList" :label="item.name" :value="item.id"/>
-                        </el-select>
-                    </div>
-                    <div class="w-32 ml-3">
-                        <el-select v-model="searchForm.batch" block clearable size="large" placeholder="上报批次">
-                            <el-option v-for="item in reportBatch" :label="item.batch" :value="item.batch"/>
-                        </el-select>
-                    </div>
-                    <div class="w-64 ml-3">
-                        <HcDatePicker :dates="betweenTime" size="large" clearable @change="betweenTimeUpdate"/>
-                    </div>
-                    <div class="w-56 ml-3">
-                        <el-input v-model="searchForm.queryValue" block size="large" placeholder="请输入名称关键词检索" clearable @keyup="keyUpEvent"/>
-                    </div>
-                    <div class="ml-2">
-                        <el-button type="primary" size="large" @click="searchClick">
-                            <HcIcon name="search-2"/>
-                            <span>搜索</span>
-                        </el-button>
-                    </div>
-                </template>
-                <template #extra>
-                    <HcTooltip keys="tasks_data_set_sign_rules">
-                        <el-button hc-btn @click="setSignRulesClick">
-                            <HcIcon name="settings"/>
-                            <span>设置重签规则</span>
-                        </el-button>
-                    </HcTooltip>
-                    <HcTooltip keys="tasks_data_batch_review" v-if="sbTableKey === 'key1'">
-                        <el-button hc-btn type="primary" :disabled="tableCheckedKeys.length <= 0" @click="batchApprovalTaskClick">
-                            <HcIcon name="check-double"/>
-                            <span>批量审批</span>
-                        </el-button>
-                    </HcTooltip>
-                </template>
-                <HcTable ref="tableListRef" :column="tableListColumn" :datas="tableListData" :loading="tableLoading" isCheck @selection-change="tableSelectionChange">
-                    <template #taskName="{row}">
-                        <span class="text-link" @click="rowTaskName(row)">{{row?.taskName}}</span>
-                    </template>
-                    <template #taskStatus="{row}">
-                        <el-tag :type="`${row['taskStatus']['status'] === 2 ? 'success' : row['taskStatus']['status'] === 3 ? 'warning' : 'info'}`"
-                                class="mx-1" effect="dark" v-if="row?.taskStatus?.statusValue">{{row['taskStatus']['statusValue']}}</el-tag>
-                    </template>
-                    <template #waitingUserList="{row}">
-                        <template v-for="item in row['waitingUserList']">
-                            <el-tag :type="`${item.status === 2 ? 'success' : item.status === 3 ? 'warning' : item.status === 999 ? 'danger' : 'info'}`"
-                                    class="mx-1" effect="dark" v-if="item['waitingUserName']">{{item['waitingUserName']}}</el-tag>
-                        </template>
-                    </template>
-                </HcTable>
-                <template #action>
-                    <div class="lr-dialog-footer">
-                        <div class="left">
-                            <span class="text-success">审批人员中:</span>
-                            <el-tag type="info" class="mx-1" effect="dark">未签字</el-tag>
-                            <el-tag type="success" class="mx-1" effect="dark">已签字</el-tag>
-                            <el-tag type="warning" class="mx-1" effect="dark">已废除</el-tag>
-                            <el-tag type="danger" class="mx-1" effect="dark">签字异常</el-tag>
-                        </div>
-                        <div class="right">
-                            <HcPages :pages="searchForm" @change="pageChange"/>
-                        </div>
-                    </div>
-                </template>
-            </HcCard>
-        </div>
+        <HcTabsSimple :datas="sbTableData" :cur="sbTableKey" @tabClick="sbTableClick">
+            <template #tab-key1>
+                <TableCard v-if="sbTableKey === 'key1'" :projectId="projectId" :contractId="contractId" :contractList="contractList" :tableKey="sbTableKey"
+                           @rowTaskName="rowTaskName" @signRules="setSignRulesClick" @batchApproval="batchApprovalTaskClick"/>
+            </template>
+            <template #tab-key2>
+                <TableCard v-if="sbTableKey === 'key2'" :projectId="projectId" :contractId="contractId" :contractList="contractList" :tableKey="sbTableKey"
+                           @rowTaskName="rowTaskName" @signRules="setSignRulesClick" @batchApproval="batchApprovalTaskClick"/>
+            </template>
+            <template #tab-key3>
+                <TableCard v-if="sbTableKey === 'key3'" :projectId="projectId" :contractId="contractId" :contractList="contractList" :tableKey="sbTableKey"
+                           @rowTaskName="rowTaskName" @signRules="setSignRulesClick" @batchApproval="batchApprovalTaskClick"/>
+            </template>
+        </HcTabsSimple>
         <!--任务审核-->
+
         <!--设置重签规则-->
         <el-dialog v-model="showSetSignRulesModal" title="设置重签规则" width="38rem" class="hc-modal-border">
             <div class="text-orange mb-10">
@@ -113,16 +45,16 @@
 <script setup>
 import {ref, onMounted} from "vue";
 import {useAppStore} from "~src/store";
-import tasksApi from '~api/tasks/data';
 import {useRouter, useRoute} from 'vue-router'
-import HcSbTable from "~com/hc-sb-table/index.vue";
+import TableCard from './components/TableCard.vue';
 import {isType, formValidate, deepClone} from "vue-utils-plus"
+import tasksApi from '~api/tasks/data';
 
 //初始变量
 const router = useRouter()
 const useRoutes = useRoute()
 const useAppState = useAppStore()
-const { isObjNull, getObjValue,  getArrValue } = isType()
+const { getObjValue,  getArrValue } = isType()
 
 //路由参数
 const routerQuery = useRoutes?.query;
@@ -132,15 +64,12 @@ const activeName = routerQuery?.active || 'key1'
 const projectId = ref(useAppState.getProjectId);
 const contractId = ref(useAppState.getContractId);
 const projectInfo = ref(useAppState.getProjectInfo);
+const contractList = ref([])
 
 //渲染完成
 onMounted(() => {
     const project = getObjValue(projectInfo.value)
     contractList.value = getArrValue(project['contractInfoList'])
-    //获取下拉数据
-    queryTaskType()
-    queryTaskStatus()
-    searchClick()
 })
 
 //类型处理
@@ -156,176 +85,6 @@ const sbTableClick = (key) => {
         path: useRoutes.path,
         query: {active: key}
     })
-    searchClick()
-}
-
-//获取任务类型
-const tasksType = ref([])
-const queryTaskType = async () => {
-    const { error, code, data } = await tasksApi.queryTaskTypeStatus({
-        typeOrStatus: 'task_type'
-    })
-    if (!error && code === 200) {
-        tasksType.value = getArrValue(data)
-    } else {
-        tasksType.value = []
-    }
-}
-
-//获取任务状态
-const tasksStatus = ref([])
-const queryTaskStatus = async () => {
-    const { error, code, data } = await tasksApi.queryTaskTypeStatus({
-        typeOrStatus: 'task_status'
-    })
-    if (!error && code === 200) {
-        tasksStatus.value = getArrValue(data)
-    } else {
-        tasksStatus.value = []
-    }
-}
-
-//合同段
-const contractList = ref([])
-const ContractIdChange = () => {
-    queryBatchList()
-}
-
-//获取上报批次
-const reportBatch = ref([])
-const queryBatchList = async () => {
-    const {contractId} = searchForm.value
-    const { error, code, data } = await tasksApi.queryBatchList({
-        projectId: projectId.value,
-        contractId: contractId || ''
-    })
-    if (!error && code === 200) {
-        reportBatch.value = getArrValue(data)
-    } else {
-        reportBatch.value = []
-    }
-}
-
-//搜索表单
-const searchForm = ref({
-    queryValue: null, taskType: null, taskStatus: null, batch: null, startTime: null, endTime: null,
-    current: 1, size: 20, total: 0
-})
-
-//日期时间被选择
-const betweenTime = ref(null)
-const betweenTimeUpdate = ({val,arr}) => {
-    betweenTime.value = arr
-    searchForm.value.startTime = val['start']
-    searchForm.value.endTime = val['end']
-}
-
-//回车搜索
-const keyUpEvent = (e) => {
-    if (e.key === "Enter") {
-        searchForm.value.current = 1;
-        getTableData()
-    }
-}
-
-//搜索
-const searchClick = () => {
-    searchForm.value.current = 1;
-    getTableData()
-}
-
-//分页被点击
-const pageChange = ({current, size}) => {
-    searchForm.value.current = current
-    searchForm.value.size = size
-    getTableData()
-}
-
-//获取数据
-const tableLoading = ref(false)
-const tableListColumn = ref([
-    {key:'taskName', name: '任务名称'},
-    {key:'typeValue', name: '任务类型', width: '120'},
-    {key:'taskStatus', name: '任务状态', width: '160'},
-    {key:'startTime', name: '开始时间', width: '180'},
-    {key:'endTime', name: '限定时间', width: '180'},
-    {key:'taskContent', name: '任务描述'},
-    {key:'reportUserName', name: '上报人', width: '120'},
-    {key:'waitingUserList', name: '签字人员'},
-])
-const tableListData = ref([])
-const getTableData = () => {
-    const key = sbTableKey.value
-    tableListRef.value?.clearSelection()
-    tableCheckedKeys.value = []
-    if(key === 'key1') {
-        queryUserToDoTaskList()
-    } else if(key === 'key2') {
-        queryUserDoneTaskList()
-    } else if (key === 'key3') {
-        queryUserStartFlow()
-    }
-}
-
-//待办任务列表
-const queryUserToDoTaskList = async () => {
-    tableLoading.value = true
-    const { error, code, data } = await tasksApi.queryUserToDoTaskList({
-        ...searchForm.value,
-        projectId: projectId.value
-    })
-    //处理数据
-    tableLoading.value = false
-    if (!error && code === 200) {
-        tableListData.value = getArrValue(data['records'])
-        searchForm.value.total = data.total || 0
-    } else {
-        tableListData.value = []
-        searchForm.value.total = 0
-    }
-}
-//获取已办任务
-const queryUserDoneTaskList = async () => {
-    tableLoading.value = true
-    const { error, code, data } = await tasksApi.queryUserDoneTaskList({
-        ...searchForm.value,
-        projectId: projectId.value
-    })
-    //处理数据
-    tableLoading.value = false
-    if (!error && code === 200) {
-        tableListData.value = getArrValue(data['records'])
-        searchForm.value.total = data.total || 0
-    } else {
-        tableListData.value = []
-        searchForm.value.total = 0
-    }
-}
-//获取我发起的
-const queryUserStartFlow = async () => {
-    tableLoading.value = true
-    const { error, code, data } = await tasksApi.queryUserStartFlow({
-        ...searchForm.value,
-        projectId: projectId.value
-    })
-    //处理数据
-    tableLoading.value = false
-    if (!error && code === 200) {
-        tableListData.value = getArrValue(data['records'])
-        searchForm.value.total = data.total || 0
-    } else {
-        tableListData.value = []
-        searchForm.value.total = 0
-    }
-}
-
-//多选
-const tableListRef = ref(null)
-const tableCheckedKeys = ref([]);
-const tableSelectionChange = (rows) => {
-    tableCheckedKeys.value = rows.filter((item) => {
-        return (item??'') !== '';
-    })
 }
 
 //任务审核
@@ -333,7 +92,6 @@ const rowTaskName = () => {
 
 }
 
-
 //设置重签规则
 const showSetSignRulesModal = ref(false)
 const setPactVal = ref(true)
@@ -353,9 +111,3 @@ const batchApprovalTaskClick = () => {
 <style lang="scss" scoped>
 @import '../../styles/tasks/hc-data.scss';
 </style>
-
-<style lang="scss">
-.hc-layout-box .hc-content-box .hc-card-box.el-card {
-    border-radius: 0 var(--el-card-border-radius) var(--el-card-border-radius) var(--el-card-border-radius);
-}
-</style>