duy 7 місяців тому
батько
коміт
8a0de76f22

+ 11 - 2
src/views/certificate/admin.vue

@@ -1,11 +1,20 @@
 <template>
     <hc-card id-ref="hc-certificate-management" div-p="12px">
         <template #header>
-            <div class="w-100">
+            <div class="w-64">
                 <el-select v-model="searchForm.projectId" filterable clearable block placeholder="选择项目" @change="searchClick">
                     <el-option v-for="item in projectData" :key="item.id" :label="item.projectName" :value="item.id" />
                 </el-select>
             </div>
+            <div class="ml-2 w-64">
+                <el-select v-model="searchForm.certificateType" filterable clearable block placeholder="证书类型" @change="searchClick">
+                    <el-option label="个人证书" :value="1" />
+                    <el-option label="企业证书" :value="2" />
+                </el-select>
+            </div>
+            <div class="ml-2 w-64">
+                <el-input v-model="searchForm.certificateUserName" clearable block placeholder="请输入" @change="searchClick" />
+            </div>
         </template>
         <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" :is-index="false">
             <template #action="{ row }">
@@ -46,7 +55,7 @@ const getProjectData = async () => {
 }
 
 //搜索条件
-const searchForm = ref({ projectId: '', current: 1, size: 20, total: 0 })
+const searchForm = ref({ projectId: '', current: 1, size: 20, total: 0, certificateType:'', certificateUserName:'' })
 
 //搜索
 const searchClick = () => {

+ 1 - 1
src/views/desk/test-collect.vue

@@ -8,7 +8,7 @@
                 <el-link type="primary" @click="editRowClick(row)">编辑</el-link>
                 <el-link type="warning" @click="partitioningClick(row)">配置划分</el-link>
                 <el-link type="success" @click="associationList(row)">关联清表</el-link>
-                <el-link type="info" @click="dataMap(row)">数据映射配置</el-link>
+                <el-link type="primary" :disabled="!row.excelId" class="link-class" @click="dataMap(row)">数据映射配置</el-link>
                 <el-link type="danger" @click="delRowClick(row)">删除</el-link>
             </template>
         </hc-table>

+ 111 - 113
src/views/desk/test-param.vue

@@ -2,42 +2,38 @@
     <hc-tab-card :tabs="tabsData" :tab-key="tabsKey" @change="tabsChange">
         <hc-card v-if="tabsKey === '1'">
             <template #extra>
-                <el-button hc-btn type="primary" @click="addRowClick"
-                    >新增</el-button
-                >
+                <el-button hc-btn type="primary" @click="addRowClick">
+                    新增
+                </el-button>
                 <el-button
                     hc-btn
                     type="danger"
                     :disabled="tableCheckKeys.length <= 0"
                     @click="batchDelClick"
-                    >删除</el-button
-                >
-                <el-button hc-btn type="warning" @click="impotClick"
-                    >导入</el-button
                 >
+                    删除
+                </el-button>
+                <el-button hc-btn type="warning" @click="impotClick">
+                    导入
+                </el-button>
             </template>
 
             <hc-table
                 :loading="tableLoading"
                 :column="tableColumn"
                 :datas="tableData"
-                isCheck
+                is-check
                 @selection-change="tableSelectionChange"
             >
                 <template #action="{ row, index }">
-                    <el-button
-                        size="small"
-                        type="primary"
-                        @click="editRowClick(row)"
-                        >编辑</el-button
-                    >
+                    <el-link type="primary" @click="editRowClick(row)">编辑</el-link>
                 </template>
             </hc-table>
             <template #action>
                 <hc-pages :pages="searchForm" @change="pageChange" />
             </template>
         </hc-card>
-        <temperatureDensity v-else :tabsKey="tabsKey"></temperatureDensity>
+        <temperatureDensity v-else :tabs-key="tabsKey" />
 
         <!-- 新增/修改 -->
         <hc-dialog
@@ -99,8 +95,9 @@
                     type="primary"
                     :loading="submitLoading"
                     @click="dialogSubmit"
-                    >提交</el-button
                 >
+                    提交
+                </el-button>
             </template>
         </hc-dialog>
 
@@ -116,17 +113,19 @@
                 <el-button
                     size="small"
                     type="primary"
-                    @click="downLoadFile"
                     :loading="downloadLoading"
-                    >下载导入模板</el-button
+                    @click="downLoadFile"
                 >
+                    下载导入模板
+                </el-button>
                 <el-button
                     size="small"
                     type="primary"
-                    @click="importModalClick"
                     :loading="uploadsLoading"
-                    >本地上传</el-button
+                    @click="importModalClick"
                 >
+                    本地上传
+                </el-button>
                 <el-form class="mt-4" :model="formLabelAlign">
                     <el-form-item
                         label="数据覆盖:"
@@ -146,8 +145,7 @@
                             inactive-text="否"
                             active-value="1"
                             inactive-value="0"
-                        >
-                        </el-switch>
+                        />
                     </el-form-item>
                 </el-form>
             </hc-card-item>
@@ -156,143 +154,143 @@
 </template>
 
 <script setup>
-import { onMounted, ref } from "vue";
-import mainApi from "~api/desk/test-params";
-import { getArrValue, isNullES, deepClone, arrToId } from "js-fast-way";
-import temperatureDensity from "./wbs/temperature-density.vue";
-import { HcUploadFileApi, HcDelMsg } from "hc-vue3-ui";
+import { onMounted, ref } from 'vue'
+import mainApi from '~api/desk/test-params'
+import { arrToId, deepClone, getArrValue, isNullES } from 'js-fast-way'
+import temperatureDensity from './wbs/temperature-density.vue'
+import { HcDelMsg, HcUploadFileApi } from 'hc-vue3-ui'
 onMounted(() => {
-    getTableData();
-});
-const tabsKey = ref("1");
+    getTableData()
+})
+const tabsKey = ref('1')
 const tabsData = ref([
-    { key: "1", name: "压实度评标参数" },
-    { key: "2", name: "温度及密度参数" },
-]);
+    { key: '1', name: '压实度评标参数' },
+    { key: '2', name: '温度及密度参数' },
+])
 const tabsChange = (item) => {
-    console.log(item, "item");
+    console.log(item, 'item')
 
-    tabsKey.value = item.key;
-};
+    tabsKey.value = item.key
+}
 //新增、编辑
 const addRowClick = () => {
-    isDataInfoShow.value = true;
-    formModel.value = {};
-};
+    isDataInfoShow.value = true
+    formModel.value = {}
+}
 //修改
 const editRowClick = (row) => {
-    formModel.value = deepClone(row);
-    isDataInfoShow.value = true;
-};
-const isDataInfoShow = ref(false);
-const formModel = ref({});
-const formRules = {};
+    formModel.value = deepClone(row)
+    isDataInfoShow.value = true
+}
+const isDataInfoShow = ref(false)
+const formModel = ref({})
+const formRules = {}
 const dialogClose = () => {
-    isDataInfoShow.value = false;
-    formModel.value = {};
-};
-const submitLoading = ref(false);
+    isDataInfoShow.value = false
+    formModel.value = {}
+}
+const submitLoading = ref(false)
 const dialogSubmit = async () => {
-    submitLoading.value = true;
-    const { isRes } = await mainApi.submit(formModel.value);
-    submitLoading.value = false;
-    if (!isRes) return;
-    window.$message.success("操作成功");
-    dialogClose();
-    getTableData().then();
-};
-const tableCheckKeys = ref([]);
+    submitLoading.value = true
+    const { isRes } = await mainApi.submit(formModel.value)
+    submitLoading.value = false
+    if (!isRes) return
+    window.$message.success('操作成功')
+    dialogClose()
+    getTableData().then()
+}
+const tableCheckKeys = ref([])
 const batchDelClick = () => {
-    const rows = tableCheckKeys.value;
+    const rows = tableCheckKeys.value
     if (rows.length <= 0) {
-        window.$message.warning("请选择要删除的应用");
-        return false;
+        window.$message.warning('请选择要删除的应用')
+        return false
     }
-    rowRemoveApi(arrToId(rows));
-};
+    rowRemoveApi(arrToId(rows))
+}
 //删除接口
 const rowRemoveApi = (ids) => {
     HcDelMsg(async (resolve) => {
-        const { isRes } = await mainApi.remove({ ids: ids });
-        resolve(); //关闭弹窗的回调
-        if (!isRes) return;
-        window.$message.success("删除成功");
-        getTableData();
-    });
-};
+        const { isRes } = await mainApi.remove({ ids: ids })
+        resolve() //关闭弹窗的回调
+        if (!isRes) return
+        window.$message.success('删除成功')
+        getTableData()
+    })
+}
 const impotClick = () => {
-    fileModal.value = true;
-};
+    fileModal.value = true
+}
 const tableColumn = [
-    { key: "valueN", name: "N值" },
-    { key: "assuranceRateNinetyNinePercent", name: "保证率99" },
-    { key: "assuranceRateNinetyFivePercent", name: "保证率95" },
-    { key: "assuranceRateNinetyPercent", name: "保证率90" },
-    { key: "action", name: "操作", width: 100 },
-];
-const searchForm = ref({ current: 1, size: 30, total: 0 });
-const tableData = ref([]);
-const tableLoading = ref(false);
+    { key: 'valueN', name: 'N值' },
+    { key: 'assuranceRateNinetyNinePercent', name: '保证率99' },
+    { key: 'assuranceRateNinetyFivePercent', name: '保证率95' },
+    { key: 'assuranceRateNinetyPercent', name: '保证率90' },
+    { key: 'action', name: '操作', width: 100 },
+]
+const searchForm = ref({ current: 1, size: 30, total: 0 })
+const tableData = ref([])
+const tableLoading = ref(false)
 const getTableData = async () => {
-    tableLoading.value = true;
+    tableLoading.value = true
     const { code, msg, data } = await mainApi.getList({
         ...searchForm.value,
         total: null,
-    });
-    tableLoading.value = false;
+    })
+    tableLoading.value = false
     if (code === 200) {
-        tableData.value = getArrValue(data?.records);
-        searchForm.value.total = data?.total || 0;
+        tableData.value = getArrValue(data?.records)
+        searchForm.value.total = data?.total || 0
     }
-};
+}
 //多选事件
 const tableSelectionChange = (rows) => {
-    tableCheckKeys.value = rows;
-};
+    tableCheckKeys.value = rows
+}
 //分页
 const pageChange = ({ current, size }) => {
-    searchForm.value.current = current;
-    searchForm.value.size = size;
-    getTableData();
-};
+    searchForm.value.current = current
+    searchForm.value.size = size
+    getTableData()
+}
 
 //模板导入
-const fileModal = ref(false);
-const formLabelAlign = ref({ isCovered: 0 });
+const fileModal = ref(false)
+const formLabelAlign = ref({ isCovered: 0 })
 
 const downLoadFile = () => {
     window.open(
-        "https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20221206/0fe37d67c97e9a971b45a72584b7abf0.xlsx",
-        "压实度评标参数模板"
-    );
-};
-const downloadLoading = ref(false);
+        'https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20221206/0fe37d67c97e9a971b45a72584b7abf0.xlsx',
+        '压实度评标参数模板',
+    )
+}
+const downloadLoading = ref(false)
 
 const importModalClick = () => {
     HcUploadFileApi({
         multiple: false,
-        url: "/api/blade-manager/trial/param/compaction/import-excel",
-        target: "/api/blade-manager/trial/param/compaction/import-excel",
+        url: '/api/blade-manager/trial/param/compaction/import-excel',
+        target: '/api/blade-manager/trial/param/compaction/import-excel',
         params: { isCovered: formLabelAlign.value.isCovered },
         progress: () => {
-            uploadsLoading.value = true;
+            uploadsLoading.value = true
         },
         success: (file, res) => {
-            getTableData();
+            getTableData()
         },
         error: (file) => {
-            uploadsLoading.value = false;
-            window.$message.error(`${file.name} 上传失败`);
+            uploadsLoading.value = false
+            window.$message.error(`${file.name} 上传失败`)
         },
         finish: () => {
-            uploadsLoading.value = false;
-            window.$message.success("上传完成");
-            fileModal.value = false;
-            getTableData();
+            uploadsLoading.value = false
+            window.$message.success('上传完成')
+            fileModal.value = false
+            getTableData()
         },
-    });
-};
-const uploadsLoading = ref(false);
+    })
+}
+const uploadsLoading = ref(false)
 </script>
 
 <style scoped lang="scss"></style>

+ 110 - 110
src/views/desk/wbs/temperature-density.vue

@@ -1,35 +1,31 @@
 <template>
     <hc-card>
         <template #extra>
-            <el-button hc-btn type="primary" @click="addRowClick"
-                >新增</el-button
-            >
+            <el-button hc-btn type="primary" @click="addRowClick">
+                新增
+            </el-button>
             <el-button
                 hc-btn
                 type="danger"
                 :disabled="tableCheckKeys.length <= 0"
                 @click="batchDelClick"
-                >删除</el-button
-            >
-            <el-button hc-btn type="warning" @click="impotClick"
-                >导入</el-button
             >
+                删除
+            </el-button>
+            <el-button hc-btn type="warning" @click="impotClick">
+                导入
+            </el-button>
         </template>
 
         <hc-table
             :loading="tableLoading"
             :column="tableColumn"
             :datas="tableData"
-            isCheck
+            is-check
             @selection-change="tableSelectionChange"
         >
             <template #action="{ row, index }">
-                <el-button
-                    size="small"
-                    type="primary"
-                    @click="editRowClick(row)"
-                    >编辑</el-button
-                >
+                <el-link type="primary" @click="editRowClick(row)">编辑</el-link>
             </template>
         </hc-table>
         <template #action>
@@ -73,8 +69,9 @@
                 type="primary"
                 :loading="submitLoading"
                 @click="dialogSubmit"
-                >提交</el-button
             >
+                提交
+            </el-button>
         </template>
     </hc-dialog>
     <!-- 模板导入 -->
@@ -89,17 +86,19 @@
             <el-button
                 size="small"
                 type="primary"
-                @click="downLoadFile"
                 :loading="downloadLoading"
-                >下载导入模板</el-button
+                @click="downLoadFile"
             >
+                下载导入模板
+            </el-button>
             <el-button
                 size="small"
                 type="primary"
-                @click="importModalClick"
                 :loading="uploadsLoading"
-                >本地上传</el-button
+                @click="importModalClick"
             >
+                本地上传
+            </el-button>
             <el-form class="mt-4" :model="formLabelAlign">
                 <el-form-item
                     label="数据覆盖:"
@@ -119,163 +118,164 @@
                         inactive-text="否"
                         active-value="1"
                         inactive-value="0"
-                    >
-                    </el-switch>
+                    />
                 </el-form-item>
             </el-form>
         </hc-card-item>
     </hc-dialog>
 </template>
+
 <script setup>
-import { ref, watch } from "vue";
-import { HcDelMsg, HcUploadFileApi } from "hc-vue3-ui";
-import { arrToId, deepClone, getArrValue, isNullES } from "js-fast-way";
-import mainApi from "~api/desk/temperture-density";
+import { ref, watch } from 'vue'
+import { HcDelMsg, HcUploadFileApi } from 'hc-vue3-ui'
+import { arrToId, deepClone, getArrValue, isNullES } from 'js-fast-way'
+import mainApi from '~api/desk/temperture-density'
 
 const props = defineProps({
     tabsKey: {
         type: String,
-        default: "",
+        default: '',
     },
-});
+})
 
-const tabsKey = ref(props.tabsKey);
+const tabsKey = ref(props.tabsKey)
 //监听数据
 watch(
     () => [props.tabsKey],
     ([key]) => {
-        tabsKey.value = key;
+        tabsKey.value = key
     },
-    { deep: true }
-);
+    { deep: true },
+)
 
 //新增、编辑
 const addRowClick = () => {
-    isDataInfoShow.value = true;
-    formModel.value = {};
-};
+    isDataInfoShow.value = true
+    formModel.value = {}
+}
 //修改
 const editRowClick = (row) => {
-    formModel.value = deepClone(row);
-    isDataInfoShow.value = true;
-};
-const isDataInfoShow = ref(false);
-const formModel = ref({});
-const formRules = {};
+    formModel.value = deepClone(row)
+    isDataInfoShow.value = true
+}
+const isDataInfoShow = ref(false)
+const formModel = ref({})
+const formRules = {}
 const dialogClose = () => {
-    isDataInfoShow.value = false;
-    formModel.value = {};
-};
-const submitLoading = ref(false);
+    isDataInfoShow.value = false
+    formModel.value = {}
+}
+const submitLoading = ref(false)
 const dialogSubmit = async () => {
-    submitLoading.value = true;
-    const { isRes } = await mainApi.submit(formModel.value);
-    submitLoading.value = false;
-    if (!isRes) return;
-    window.$message.success("操作成功");
-    dialogClose();
-    getTableData().then();
-};
-const tableCheckKeys = ref([]);
+    submitLoading.value = true
+    const { isRes } = await mainApi.submit(formModel.value)
+    submitLoading.value = false
+    if (!isRes) return
+    window.$message.success('操作成功')
+    dialogClose()
+    getTableData().then()
+}
+const tableCheckKeys = ref([])
 const batchDelClick = () => {
-    const rows = tableCheckKeys.value;
+    const rows = tableCheckKeys.value
     if (rows.length <= 0) {
-        window.$message.warning("请选择要删除的应用");
-        return false;
+        window.$message.warning('请选择要删除的应用')
+        return false
     }
-    rowRemoveApi(arrToId(rows));
-};
+    rowRemoveApi(arrToId(rows))
+}
 //删除接口
 const rowRemoveApi = (ids) => {
     HcDelMsg(async (resolve) => {
-        const { isRes } = await mainApi.remove({ ids: ids });
-        resolve(); //关闭弹窗的回调
-        if (!isRes) return;
-        window.$message.success("删除成功");
-        getTableData();
-    });
-};
+        const { isRes } = await mainApi.remove({ ids: ids })
+        resolve() //关闭弹窗的回调
+        if (!isRes) return
+        window.$message.success('删除成功')
+        getTableData()
+    })
+}
 const impotClick = () => {
-    fileModal.value = true;
-};
+    fileModal.value = true
+}
 const tableColumn = [
-    { key: "temperature", name: "温度" },
-    { key: "waterDensity", name: "密度" },
+    { key: 'temperature', name: '温度' },
+    { key: 'waterDensity', name: '密度' },
 
-    { key: "action", name: "操作", width: 100 },
-];
-const searchForm = ref({ current: 1, size: 30, total: 0 });
-const tableData = ref([]);
-const tableLoading = ref(false);
+    { key: 'action', name: '操作', width: 100 },
+]
+const searchForm = ref({ current: 1, size: 30, total: 0 })
+const tableData = ref([])
+const tableLoading = ref(false)
 const getTableData = async () => {
-    tableLoading.value = true;
+    tableLoading.value = true
     const { code, msg, data } = await mainApi.getList({
         ...searchForm.value,
         total: null,
-    });
-    tableLoading.value = false;
+    })
+    tableLoading.value = false
     if (code === 200) {
-        tableData.value = getArrValue(data?.records);
-        searchForm.value.total = data?.total || 0;
+        tableData.value = getArrValue(data?.records)
+        searchForm.value.total = data?.total || 0
     }
-};
+}
 //监听显示
 watch(
     tabsKey,
     (val) => {
-        if (val === "2") {
-            getTableData();
+        if (val === '2') {
+            getTableData()
         }
     },
-    { immediate: true }
-);
+    { immediate: true },
+)
 //多选事件
 const tableSelectionChange = (rows) => {
-    tableCheckKeys.value = rows;
-};
+    tableCheckKeys.value = rows
+}
 //分页
 const pageChange = ({ current, size }) => {
-    searchForm.value.current = current;
-    searchForm.value.size = size;
-    getTableData();
-};
+    searchForm.value.current = current
+    searchForm.value.size = size
+    getTableData()
+}
 
 //模板导入
-const fileModal = ref(false);
-const formLabelAlign = ref({ isCovered: 0 });
+const fileModal = ref(false)
+const formLabelAlign = ref({ isCovered: 0 })
 
 const downLoadFile = () => {
     window.open(
-        "https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20221206/0fe37d67c97e9a971b45a72584b7abf0.xlsx",
-        "压实度评标参数模板"
-    );
-};
-const downloadLoading = ref(false);
+        'https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20221206/0fe37d67c97e9a971b45a72584b7abf0.xlsx',
+        '压实度评标参数模板',
+    )
+}
+const downloadLoading = ref(false)
 
 const importModalClick = () => {
     HcUploadFileApi({
         multiple: false,
-        url: "/api/blade-manager/trial/param/temperature-density/import-excel",
-        target: "/api/blade-manager/trial/param/temperature-density/import-excel",
+        url: '/api/blade-manager/trial/param/temperature-density/import-excel',
+        target: '/api/blade-manager/trial/param/temperature-density/import-excel',
         params: { isCovered: formLabelAlign.value.isCovered },
         progress: () => {
-            uploadsLoading.value = true;
+            uploadsLoading.value = true
         },
         success: (file, res) => {
-            getTableData();
+            getTableData()
         },
         error: (file) => {
-            uploadsLoading.value = false;
-            window.$message.error(`${file.name} 上传失败`);
+            uploadsLoading.value = false
+            window.$message.error(`${file.name} 上传失败`)
         },
         finish: () => {
-            uploadsLoading.value = false;
-            window.$message.success("上传完成");
-            fileModal.value = false;
-            getTableData();
+            uploadsLoading.value = false
+            window.$message.success('上传完成')
+            fileModal.value = false
+            getTableData()
         },
-    });
-};
-const uploadsLoading = ref(false);
+    })
+}
+const uploadsLoading = ref(false)
 </script>
+
 <style lang="css" scoped></style>