|
@@ -100,13 +100,63 @@
|
|
>
|
|
>
|
|
</template>
|
|
</template>
|
|
</hc-dialog>
|
|
</hc-dialog>
|
|
|
|
+
|
|
|
|
+ <!-- 模板导入 -->
|
|
|
|
+ <hc-dialog v-model="fileModal" title="模板导入">
|
|
|
|
+ <hc-card-item>
|
|
|
|
+ <template #header>
|
|
|
|
+ <div class="text-sm text-red">
|
|
|
|
+ 提示:必须按照系统要求的模版格式上传,否则系统识别无效
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+
|
|
|
|
+ <el-button
|
|
|
|
+ size="small"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="downLoadFile"
|
|
|
|
+ :loading="downloadLoading"
|
|
|
|
+ >下载导入模板</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button
|
|
|
|
+ size="small"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="importModalClick"
|
|
|
|
+ :loading="uploadsLoading"
|
|
|
|
+ >本地上传</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-form class="mt-4" :model="formLabelAlign">
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="数据覆盖:"
|
|
|
|
+ :rules="[
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: '请选择数据是否覆盖',
|
|
|
|
+ trigger: 'blur',
|
|
|
|
+ },
|
|
|
|
+ ]"
|
|
|
|
+ >
|
|
|
|
+ <el-switch
|
|
|
|
+ v-model="formLabelAlign.isCovered"
|
|
|
|
+ active-text="是"
|
|
|
|
+ active-color="#13ce66"
|
|
|
|
+ inactive-color="#ff4949"
|
|
|
|
+ inactive-text="否"
|
|
|
|
+ active-value="1"
|
|
|
|
+ inactive-value="0"
|
|
|
|
+ >
|
|
|
|
+ </el-switch>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </hc-card-item>
|
|
|
|
+ </hc-dialog>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import { onMounted, ref } from "vue";
|
|
import { onMounted, ref } from "vue";
|
|
import mainApi from "~api/desk/test-params";
|
|
import mainApi from "~api/desk/test-params";
|
|
-import { getArrValue, isNullES, deepClone } from "js-fast-way";
|
|
|
|
|
|
+import { getArrValue, isNullES, deepClone, arrToId } from "js-fast-way";
|
|
import temperatureDensity from "./wbs/temperature-density.vue";
|
|
import temperatureDensity from "./wbs/temperature-density.vue";
|
|
|
|
+import { HcUploadFileApi, HcDelMsg } from "hc-vue3-ui";
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
getTableData();
|
|
getTableData();
|
|
});
|
|
});
|
|
@@ -166,7 +216,9 @@ const rowRemoveApi = (ids) => {
|
|
getTableData();
|
|
getTableData();
|
|
});
|
|
});
|
|
};
|
|
};
|
|
-const impotClick = () => {};
|
|
|
|
|
|
+const impotClick = () => {
|
|
|
|
+ fileModal.value = true;
|
|
|
|
+};
|
|
const tableColumn = [
|
|
const tableColumn = [
|
|
{ key: "valueN", name: "N值" },
|
|
{ key: "valueN", name: "N值" },
|
|
{ key: "assuranceRateNinetyNinePercent", name: "保证率99" },
|
|
{ key: "assuranceRateNinetyNinePercent", name: "保证率99" },
|
|
@@ -199,6 +251,44 @@ const pageChange = ({ current, size }) => {
|
|
searchForm.value.size = size;
|
|
searchForm.value.size = size;
|
|
getTableData();
|
|
getTableData();
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+//模板导入
|
|
|
|
+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);
|
|
|
|
+
|
|
|
|
+const importModalClick = () => {
|
|
|
|
+ HcUploadFileApi({
|
|
|
|
+ multiple: false,
|
|
|
|
+ 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;
|
|
|
|
+ },
|
|
|
|
+ success: (file, res) => {
|
|
|
|
+ getTableData();
|
|
|
|
+ },
|
|
|
|
+ error: (file) => {
|
|
|
|
+ uploadsLoading.value = false;
|
|
|
|
+ window.$message.error(`${file.name} 上传失败`);
|
|
|
|
+ },
|
|
|
|
+ finish: () => {
|
|
|
|
+ uploadsLoading.value = false;
|
|
|
|
+ window.$message.success("上传完成");
|
|
|
|
+ fileModal.value = false;
|
|
|
|
+ getTableData();
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
+const uploadsLoading = ref(false);
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss"></style>
|
|
<style scoped lang="scss"></style>
|