Merge branch 'fs' of http://192.168.110.2:3000/taoge/mk_system into ljj
This commit is contained in:
BIN
public/billOfQuantities.xlsx
Normal file
BIN
public/billOfQuantities.xlsx
Normal file
Binary file not shown.
BIN
public/materialsEquipment.xlsx
Normal file
BIN
public/materialsEquipment.xlsx
Normal file
Binary file not shown.
@ -47,9 +47,9 @@
|
|||||||
<el-row :gutter="8" class="mb-3 font-medium text-gray-700 whitespace-nowrap">
|
<el-row :gutter="8" class="mb-3 font-medium text-gray-700 whitespace-nowrap">
|
||||||
<el-col :span="4">专业</el-col>
|
<el-col :span="4">专业</el-col>
|
||||||
<el-col :span="5">设计人员(可多选)</el-col>
|
<el-col :span="5">设计人员(可多选)</el-col>
|
||||||
<el-col :span="5">校审人员(可多选)</el-col>
|
<el-col :span="5">校审人员</el-col>
|
||||||
<el-col :span="5">审定人员(可多选)</el-col>
|
<el-col :span="5">审定人员</el-col>
|
||||||
<el-col :span="4">审核人员(可多选)</el-col>
|
<el-col :span="4">审核人员</el-col>
|
||||||
<el-col :span="3"></el-col>
|
<el-col :span="3"></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@ -65,7 +65,7 @@
|
|||||||
>
|
>
|
||||||
<el-row :gutter="8" class="items-top">
|
<el-row :gutter="8" class="items-top">
|
||||||
<!-- 1. 专业选择(核心:统一所有角色的专业来源) -->
|
<!-- 1. 专业选择(核心:统一所有角色的专业来源) -->
|
||||||
<el-col :span="3" class="mb-4 sm:mb-0 pl-4">
|
<el-col :span="3" class="mb-4 sm:mb-0 pl-4" style="margin-top:8px;">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:prop="`designers.${configIndex}.userMajor`"
|
:prop="`designers.${configIndex}.userMajor`"
|
||||||
:rules="[
|
:rules="[
|
||||||
@ -174,7 +174,7 @@
|
|||||||
<el-option v-for="item in userList" :key="`user-${item.userId}`" :label="item.nickName" :value="item.userId" />
|
<el-option v-for="item in userList" :key="`user-${item.userId}`" :label="item.nickName" :value="item.userId" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="flex gap-1">
|
<!-- <div class="flex gap-1">
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
size="small"
|
size="small"
|
||||||
@ -193,7 +193,7 @@
|
|||||||
>
|
>
|
||||||
<el-icon :size="14"><Plus /></el-icon>
|
<el-icon :size="14"><Plus /></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@ -230,7 +230,7 @@
|
|||||||
<el-option v-for="item in userList" :key="`user-${item.userId}`" :label="item.nickName" :value="item.userId" />
|
<el-option v-for="item in userList" :key="`user-${item.userId}`" :label="item.nickName" :value="item.userId" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="flex gap-1">
|
<!-- <div class="flex gap-1">
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
size="small"
|
size="small"
|
||||||
@ -249,7 +249,7 @@
|
|||||||
>
|
>
|
||||||
<el-icon :size="14"><Plus /></el-icon>
|
<el-icon :size="14"><Plus /></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@ -286,7 +286,7 @@
|
|||||||
<el-option v-for="item in userList" :key="`user-${item.userId}`" :label="item.nickName" :value="item.userId" />
|
<el-option v-for="item in userList" :key="`user-${item.userId}`" :label="item.nickName" :value="item.userId" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="flex gap-1">
|
<!-- <div class="flex gap-1">
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
size="small"
|
size="small"
|
||||||
@ -305,7 +305,7 @@
|
|||||||
>
|
>
|
||||||
<el-icon :size="14"><Plus /></el-icon>
|
<el-icon :size="14"><Plus /></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
@ -16,10 +16,10 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="openTable(true, index)">一键展开</el-button>
|
<el-button type="primary" @click="openTable(index)">{{ isExpandAll ? '一键收起' : '一键展开' }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="openTable(false, index)">一键收起</el-button>
|
<el-button type="success" @click="downloadTemplate(1)">下载模板</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-upload ref="uploadRef" class="upload-demo" :http-request="importExcel" :show-file-list="false">
|
<el-upload ref="uploadRef" class="upload-demo" :http-request="importExcel" :show-file-list="false">
|
||||||
@ -51,15 +51,21 @@
|
|||||||
<el-option v-for="item in state.options" :key="item.versions" :label="item.versions" :value="item.versions" />
|
<el-option v-for="item in state.options" :key="item.versions" :label="item.versions" :value="item.versions" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="success" @click="downloadTemplate(2)">下载模板</el-button>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-upload ref="uploadRef" class="upload-demo" :http-request="importExcel" :show-file-list="false" style="margin-right: 10px">
|
<el-upload ref="uploadRef" class="upload-demo" :http-request="importExcel" :show-file-list="false" style="margin-right: 10px">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button type="primary">导入excel</el-button>
|
<el-button type="primary">导入excel</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-button v-if="state.versionsData.status == 'draft'" type="primary" con="edit" @click="clickApprovalSheet()">审核</el-button>
|
</el-form-item>
|
||||||
|
<el-form-item v-if="state.versionsData.status == 'draft'">
|
||||||
|
<el-button type="primary" con="edit" @click="clickApprovalSheet()">审核</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="state.versionsData.status == 'waiting' || state.versionsData.status == 'finish'">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="state.versionsData.status == 'waiting' || state.versionsData.status == 'finish'"
|
|
||||||
icon="view"
|
icon="view"
|
||||||
@click="lookApprovalFlow()"
|
@click="lookApprovalFlow()"
|
||||||
type="warning"
|
type="warning"
|
||||||
@ -117,6 +123,7 @@ const { proxy } = getCurrentInstance();
|
|||||||
const { work_order_type } = toRefs(proxy?.useDict('work_order_type'));
|
const { work_order_type } = toRefs(proxy?.useDict('work_order_type'));
|
||||||
const tableRef = ref({});
|
const tableRef = ref({});
|
||||||
console.log(work_order_type);
|
console.log(work_order_type);
|
||||||
|
const isExpandAll = ref(true);
|
||||||
|
|
||||||
// tableData
|
// tableData
|
||||||
// 版本号
|
// 版本号
|
||||||
@ -146,6 +153,7 @@ const state = reactive({
|
|||||||
});
|
});
|
||||||
// tab切换
|
// tab切换
|
||||||
const handleTabChange = (tab) => {
|
const handleTabChange = (tab) => {
|
||||||
|
isExpandAll.value = true;
|
||||||
console.log('tab', tab);
|
console.log('tab', tab);
|
||||||
state.tableData = [];
|
state.tableData = [];
|
||||||
state.options = [];
|
state.options = [];
|
||||||
@ -305,13 +313,14 @@ function handleChangeVersion(versions) {
|
|||||||
handleQueryList();
|
handleQueryList();
|
||||||
}
|
}
|
||||||
// 在 openTable 方法中通过索引获取对应的表格实例
|
// 在 openTable 方法中通过索引获取对应的表格实例
|
||||||
function openTable(flag, index) {
|
function openTable( index) {
|
||||||
|
isExpandAll.value = !isExpandAll.value;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
// 通过索引获取当前标签页的表格实例
|
// 通过索引获取当前标签页的表格实例
|
||||||
const currentTable = tableRef.value[index];
|
const currentTable = tableRef.value[index];
|
||||||
console.log(currentTable, index);
|
console.log(currentTable, index);
|
||||||
if (currentTable) {
|
if (currentTable) {
|
||||||
handleArr(state.tableData, flag, currentTable);
|
handleArr(state.tableData, isExpandAll.value, currentTable);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -345,6 +354,34 @@ function lookApprovalFlow(row) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 下载模板
|
||||||
|
const downloadTemplate = (type) => {
|
||||||
|
// 导出模版文件
|
||||||
|
try {
|
||||||
|
let linkurl = '';
|
||||||
|
let name = '';
|
||||||
|
if (type==1) {
|
||||||
|
linkurl = '/billOfQuantities.xlsx';
|
||||||
|
name = '工程量清单模板.xlsx';
|
||||||
|
}else{
|
||||||
|
linkurl = '/materialsEquipment.xlsx';
|
||||||
|
name = '物资设备清单模板.xlsx';
|
||||||
|
}
|
||||||
|
// 创建a标签
|
||||||
|
const link = document.createElement('a');
|
||||||
|
// 设置PDF文件路径 - 相对于public目录
|
||||||
|
link.href = linkurl;
|
||||||
|
// 设置下载后的文件名
|
||||||
|
link.download = name;
|
||||||
|
// 触发点击
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
// 清理
|
||||||
|
document.body.removeChild(link);
|
||||||
|
} catch (error) {
|
||||||
|
alert('下载失败,请重试');
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.billof-quantities {
|
.billof-quantities {
|
||||||
|
Reference in New Issue
Block a user