进度填报大屏界面基本功能
This commit is contained in:
@ -47,10 +47,27 @@
|
||||
border
|
||||
>
|
||||
<el-table-column label="" width="50" type="expand">
|
||||
<template #header>
|
||||
<el-icon
|
||||
class="cursor-pointer text-4! transform-rotate-z--90 transition-all-300"
|
||||
:class="!isExpandAll ? 'transform-rotate-z--90' : 'transform-rotate-z-90'"
|
||||
@click="handleToggleExpandAll"
|
||||
><Expand
|
||||
/></el-icon>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
<el-card class="pl-25" shadow="hover">
|
||||
<el-table :data="scope.row.children" border>
|
||||
<el-table-column label="名称" align="center" prop="name" width="150" />
|
||||
<el-table-column label="名称" align="center" prop="name" width="170">
|
||||
<template #default="{ row }">
|
||||
<el-tooltip :content="row.remark" placement="top" effect="dark" v-if="row.remark">
|
||||
<span class="flex items-center justify-center"
|
||||
><i class="iconfont icon-wenhao mr-0.5 text-3.5! text-#999"></i>{{ row.name }}</span
|
||||
>
|
||||
</el-tooltip>
|
||||
<span v-else>{{ row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status" width="100">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="progress_status" :value="row.status" />
|
||||
@ -85,7 +102,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
type="warning"
|
||||
icon="Download"
|
||||
link
|
||||
@ -94,12 +111,13 @@
|
||||
v-hasPermi="['progress:progressCategory:add']"
|
||||
>
|
||||
导入数据
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="Download"
|
||||
link
|
||||
size="small"
|
||||
v-if="scope.row.name === '光伏板'"
|
||||
@click="openDialog(scope.row, 'importTableStatus', '上传表格')"
|
||||
v-hasPermi="['progress:progressCategory:add']"
|
||||
>
|
||||
@ -254,9 +272,13 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
const getList = async () => {
|
||||
if (!queryParams.value.matrixId) {
|
||||
const res = await getProjectSquare(currentProject.value.id);
|
||||
if (!matrixValue.value) matrixValue.value = res.rows[0].id;
|
||||
matrixOptions.value = res.rows;
|
||||
queryParams.value.matrixId = res.rows[0].id;
|
||||
if (res.rows.length === 0) {
|
||||
proxy?.$modal.msgWarning('当前项目下没有方阵,请先创建方阵');
|
||||
} else {
|
||||
if (!matrixValue.value) matrixValue.value = res.rows[0].id;
|
||||
matrixOptions.value = res.rows;
|
||||
queryParams.value.matrixId = res.rows[0].id;
|
||||
}
|
||||
}
|
||||
loading.value = true;
|
||||
const res = await listProgressCategory(queryParams.value);
|
||||
@ -288,6 +310,13 @@ const reset = () => {
|
||||
progressCategoryFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
//切换项目重置方阵
|
||||
const resetMatrix = () => {
|
||||
matrixValue.value = undefined;
|
||||
queryParams.value.matrixId = undefined;
|
||||
matrixOptions.value = [];
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
getList();
|
||||
@ -384,6 +413,7 @@ const listeningProject = watch(
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
form.value.projectId = nid;
|
||||
resetMatrix();
|
||||
getList();
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user