|
@@ -2,28 +2,28 @@
|
|
|
<div class="basic-info-container">
|
|
<div class="basic-info-container">
|
|
|
<el-card class="box-card search-card">
|
|
<el-card class="box-card search-card">
|
|
|
<div class="search-header">
|
|
<div class="search-header">
|
|
|
- <span class="title">{{ pageTitle }}</span>
|
|
|
|
|
- <el-button type="primary" :icon="Plus" @click="handleAdd">新增{{ moduleName }}</el-button>
|
|
|
|
|
|
|
+ <span class="title">施工标准规范管理</span>
|
|
|
|
|
+ <el-button type="primary" :icon="Plus" @click="handleAdd">新增施工标准规范</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<el-form :model="searchForm" label-width="80px" class="search-form" label-position="top">
|
|
<el-form :model="searchForm" label-width="80px" class="search-form" label-position="top">
|
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
|
<!-- 共通字段: 名称 -->
|
|
<!-- 共通字段: 名称 -->
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
- <el-form-item :label="titleLabel">
|
|
|
|
|
- <el-input v-model="searchForm.title" :placeholder="'请输入' + titleLabel" clearable />
|
|
|
|
|
|
|
+ <el-form-item label="文档名称">
|
|
|
|
|
+ <el-input v-model="searchForm.title" placeholder="请输入文档名称" clearable @keyup.enter="handleSearch" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <!-- Basis 专用: 标准编号 -->
|
|
|
|
|
- <el-col :span="6" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <!-- Standard 专用: 标准编号 -->
|
|
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="标准编号">
|
|
<el-form-item label="标准编号">
|
|
|
- <el-input v-model="searchForm.standard_no" placeholder="请输入标准编号" clearable />
|
|
|
|
|
|
|
+ <el-input v-model="searchForm.standard_no" placeholder="请输入标准编号" clearable @keyup.enter="handleSearch" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <!-- Basis/Job 专用: 文件类型 -->
|
|
|
|
|
- <el-col :span="6" v-if="infoType === 'basis' || infoType === 'job'">
|
|
|
|
|
|
|
+ <!-- Standard 专用: 文件类型 -->
|
|
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="文件类型">
|
|
<el-form-item label="文件类型">
|
|
|
<el-select v-model="searchForm.document_type" placeholder="请选择文件类型" clearable style="width: 100%">
|
|
<el-select v-model="searchForm.document_type" placeholder="请选择文件类型" clearable style="width: 100%">
|
|
|
<el-option v-for="item in documentTypeOptions" :key="item" :label="item" :value="item" />
|
|
<el-option v-for="item in documentTypeOptions" :key="item" :label="item" :value="item" />
|
|
@@ -31,8 +31,8 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <!-- Basis 专用: 专业领域 -->
|
|
|
|
|
- <el-col :span="6" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <!-- Standard 专用: 专业领域 -->
|
|
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="专业领域">
|
|
<el-form-item label="专业领域">
|
|
|
<el-select v-model="searchForm.professional_field" placeholder="请选择专业领域" clearable style="width: 100%">
|
|
<el-select v-model="searchForm.professional_field" placeholder="请选择专业领域" clearable style="width: 100%">
|
|
|
<el-option v-for="item in professionalFieldOptions" :key="item" :label="item" :value="item" />
|
|
<el-option v-for="item in professionalFieldOptions" :key="item" :label="item" :value="item" />
|
|
@@ -41,8 +41,8 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
<!-- Row 2 -->
|
|
<!-- Row 2 -->
|
|
|
- <!-- Basis 专用: 时效性 -->
|
|
|
|
|
- <el-col :span="6" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <!-- Standard 专用: 时效性 -->
|
|
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="时效性">
|
|
<el-form-item label="时效性">
|
|
|
<el-select v-model="searchForm.validity" placeholder="请选择时效性" clearable style="width: 100%">
|
|
<el-select v-model="searchForm.validity" placeholder="请选择时效性" clearable style="width: 100%">
|
|
|
<el-option label="现行" value="现行" />
|
|
<el-option label="现行" value="现行" />
|
|
@@ -52,48 +52,10 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <el-col :span="6" v-if="infoType === 'work'">
|
|
|
|
|
- <el-form-item label="方案类别">
|
|
|
|
|
- <el-select v-model="searchForm.plan_category" placeholder="请选择方案类别" clearable style="width: 100%">
|
|
|
|
|
- <el-option v-for="item in planCategoryOptions" :key="item" :label="item" :value="item" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
-
|
|
|
|
|
- <el-col :span="6" v-if="infoType === 'work'">
|
|
|
|
|
- <el-form-item label="一级分类">
|
|
|
|
|
- <el-input v-model="searchForm.level_1_classification" placeholder="请输入一级分类" clearable />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
-
|
|
|
|
|
- <el-col :span="6" v-if="infoType === 'work'">
|
|
|
|
|
- <el-form-item label="二级分类">
|
|
|
|
|
- <el-select v-model="searchForm.level_2_classification" placeholder="请选择二级分类" clearable style="width: 100%">
|
|
|
|
|
- <el-option v-for="item in level2Options" :key="item" :label="item" :value="item" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
-
|
|
|
|
|
- <el-col :span="6" v-if="infoType === 'work'">
|
|
|
|
|
- <el-form-item label="三级分类">
|
|
|
|
|
- <el-select v-model="searchForm.level_3_classification" placeholder="请选择三级分类" clearable style="width: 100%">
|
|
|
|
|
- <el-option v-for="item in level3Options" :key="item" :label="item" :value="item" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
-
|
|
|
|
|
- <el-col :span="6" v-if="infoType === 'work'">
|
|
|
|
|
- <el-form-item label="四级分类">
|
|
|
|
|
- <el-select v-model="searchForm.level_4_classification" placeholder="请选择四级分类" clearable style="width: 100%">
|
|
|
|
|
- <el-option v-for="item in level4Options" :key="item" :label="item" :value="item" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 共通字段: 发布单位/编制单位/发布部门 -->
|
|
|
|
|
|
|
+ <!-- 共通字段: 发布单位 -->
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
- <el-form-item :label="authorityLabel">
|
|
|
|
|
- <el-input v-model="searchForm.issuing_authority" :placeholder="'请输入' + authorityLabel" clearable />
|
|
|
|
|
|
|
+ <el-form-item label="发布单位">
|
|
|
|
|
+ <el-input v-model="searchForm.issuing_authority" placeholder="请输入发布单位" clearable @keyup.enter="handleSearch" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
@@ -131,22 +93,25 @@
|
|
|
|
|
|
|
|
<el-card class="box-card table-card">
|
|
<el-card class="box-card table-card">
|
|
|
<el-table :data="tableData" v-loading="loading" style="width: 100%" border stripe>
|
|
<el-table :data="tableData" v-loading="loading" style="width: 100%" border stripe>
|
|
|
- <el-table-column prop="title" :label="titleLabel" min-width="200" show-overflow-tooltip />
|
|
|
|
|
- <el-table-column prop="standard_no" label="标准编号" width="150" show-overflow-tooltip v-if="infoType === 'basis'" />
|
|
|
|
|
- <el-table-column prop="issuing_authority" :label="authorityLabel" width="180" show-overflow-tooltip />
|
|
|
|
|
- <el-table-column prop="release_date" :label="dateLabel" width="120">
|
|
|
|
|
|
|
+ <el-table-column prop="title" label="文档名称" min-width="200" show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column prop="kb_name" label="所属知识库" width="150" show-overflow-tooltip>
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <span v-if="scope.row.kb_name" class="kb-name-tag">
|
|
|
|
|
+ <el-icon><Tickets /></el-icon> {{ scope.row.kb_name }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span v-else>-</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="standard_no" label="标准编号" width="150" show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column prop="issuing_authority" label="发布单位" width="180" show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column prop="release_date" label="发布日期" width="120">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
{{ formatDate(scope.row.release_date) }}
|
|
{{ formatDate(scope.row.release_date) }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="document_type" label="文档类型" width="120" v-if="infoType === 'basis' || infoType === 'job'" />
|
|
|
|
|
- <el-table-column prop="plan_category" label="方案类别" width="120" v-if="infoType === 'work'" />
|
|
|
|
|
- <el-table-column prop="level_1_classification" label="一级分类" width="120" v-if="infoType === 'work'" />
|
|
|
|
|
- <el-table-column prop="level_2_classification" label="二级分类" width="120" v-if="infoType === 'work'" />
|
|
|
|
|
- <el-table-column prop="level_3_classification" label="三级分类" width="120" v-if="infoType === 'work'" />
|
|
|
|
|
- <el-table-column prop="level_4_classification" label="四级分类" width="120" v-if="infoType === 'work'" />
|
|
|
|
|
- <el-table-column prop="professional_field" label="专业领域" width="120" v-if="infoType === 'basis'" />
|
|
|
|
|
- <el-table-column label="参编单位" min-width="150" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <el-table-column prop="document_type" label="文档类型" width="120" />
|
|
|
|
|
+ <el-table-column prop="professional_field" label="专业领域" width="120" />
|
|
|
|
|
+ <el-table-column label="参编单位" min-width="150">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<template v-if="scope.row.participating_units">
|
|
<template v-if="scope.row.participating_units">
|
|
|
<el-popover
|
|
<el-popover
|
|
@@ -185,7 +150,7 @@
|
|
|
<span v-else>-</span>
|
|
<span v-else>-</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="参考依据" min-width="150" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <el-table-column label="引用标准" min-width="150">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<template v-if="scope.row.reference_basis">
|
|
<template v-if="scope.row.reference_basis">
|
|
|
<el-popover
|
|
<el-popover
|
|
@@ -197,13 +162,13 @@
|
|
|
<template #reference>
|
|
<template #reference>
|
|
|
<div class="tag-group">
|
|
<div class="tag-group">
|
|
|
<el-tag
|
|
<el-tag
|
|
|
- v-for="(basis, idx) in scope.row.reference_basis.split(';').slice(0, 2)"
|
|
|
|
|
|
|
+ v-for="(std, idx) in scope.row.reference_basis.split(';').slice(0, 2)"
|
|
|
:key="idx"
|
|
:key="idx"
|
|
|
size="small"
|
|
size="small"
|
|
|
type="info"
|
|
type="info"
|
|
|
class="info-tag"
|
|
class="info-tag"
|
|
|
>
|
|
>
|
|
|
- {{ basis }}
|
|
|
|
|
|
|
+ {{ std }}
|
|
|
</el-tag>
|
|
</el-tag>
|
|
|
<el-tag v-if="scope.row.reference_basis.split(';').length > 2" size="small" type="info" class="info-tag">
|
|
<el-tag v-if="scope.row.reference_basis.split(';').length > 2" size="small" type="info" class="info-tag">
|
|
|
+{{ scope.row.reference_basis.split(';').length - 2 }}
|
|
+{{ scope.row.reference_basis.split(';').length - 2 }}
|
|
@@ -212,13 +177,13 @@
|
|
|
</template>
|
|
</template>
|
|
|
<div class="popover-tag-list">
|
|
<div class="popover-tag-list">
|
|
|
<el-tag
|
|
<el-tag
|
|
|
- v-for="(basis, idx) in scope.row.reference_basis.split(';')"
|
|
|
|
|
|
|
+ v-for="(std, idx) in scope.row.reference_basis.split(';')"
|
|
|
:key="idx"
|
|
:key="idx"
|
|
|
size="small"
|
|
size="small"
|
|
|
type="info"
|
|
type="info"
|
|
|
class="popover-info-tag"
|
|
class="popover-info-tag"
|
|
|
>
|
|
>
|
|
|
- {{ basis }}
|
|
|
|
|
|
|
+ {{ std }}
|
|
|
</el-tag>
|
|
</el-tag>
|
|
|
</div>
|
|
</div>
|
|
|
</el-popover>
|
|
</el-popover>
|
|
@@ -226,7 +191,7 @@
|
|
|
<span v-else>-</span>
|
|
<span v-else>-</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="validity" label="时效性" width="100" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <el-table-column prop="validity" label="时效性" width="100">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-tag :type="getValidityType(scope.row.validity)">
|
|
<el-tag :type="getValidityType(scope.row.validity)">
|
|
|
{{ scope.row.validity || '现行' }}
|
|
{{ scope.row.validity || '现行' }}
|
|
@@ -273,6 +238,11 @@
|
|
|
<el-icon><Delete /></el-icon>
|
|
<el-icon><Delete /></el-icon>
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
|
|
+ <el-tooltip content="入库" placement="top">
|
|
|
|
|
+ <el-button link type="warning" @click="handleAction('ingest', scope.row)">
|
|
|
|
|
+ <el-icon><Document /></el-icon>
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -296,42 +266,54 @@
|
|
|
<el-form :model="editForm" label-width="110px">
|
|
<el-form :model="editForm" label-width="110px">
|
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item :label="titleLabel" required>
|
|
|
|
|
- <el-input v-model="editForm.title" :placeholder="'请输入' + titleLabel" />
|
|
|
|
|
|
|
+ <el-form-item label="目标知识库">
|
|
|
|
|
+ <el-select v-model="editForm.kb_id" placeholder="请选择目标知识库" clearable style="width: 100%">
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in knowledgeBases"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ :label="item.name"
|
|
|
|
|
+ :value="item.id"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="文档名称" required>
|
|
|
|
|
+ <el-input v-model="editForm.title" placeholder="请输入文档名称" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <el-col :span="12" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
<el-form-item label="英文名称">
|
|
<el-form-item label="英文名称">
|
|
|
<el-input v-model="editForm.english_name" placeholder="请输入英文名称" />
|
|
<el-input v-model="editForm.english_name" placeholder="请输入英文名称" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <el-col :span="12" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
<el-form-item label="标准编号">
|
|
<el-form-item label="标准编号">
|
|
|
<el-input v-model="editForm.standard_no" placeholder="请输入标准编号" />
|
|
<el-input v-model="editForm.standard_no" placeholder="请输入标准编号" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item :label="authorityLabel">
|
|
|
|
|
- <el-input v-model="editForm.issuing_authority" :placeholder="'请输入' + authorityLabel" />
|
|
|
|
|
|
|
+ <el-form-item label="发布单位">
|
|
|
|
|
+ <el-input v-model="editForm.issuing_authority" placeholder="请输入发布单位" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item :label="dateLabel">
|
|
|
|
|
|
|
+ <el-form-item label="发布日期">
|
|
|
<el-date-picker v-model="editForm.release_date" type="date" placeholder="选择日期" value-format="YYYY-MM-DD" style="width: 100%" />
|
|
<el-date-picker v-model="editForm.release_date" type="date" placeholder="选择日期" value-format="YYYY-MM-DD" style="width: 100%" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <el-col :span="12" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
<el-form-item label="实施日期">
|
|
<el-form-item label="实施日期">
|
|
|
<el-date-picker v-model="editForm.implementation_date" type="date" placeholder="选择实施日期" value-format="YYYY-MM-DD" style="width: 100%" />
|
|
<el-date-picker v-model="editForm.implementation_date" type="date" placeholder="选择实施日期" value-format="YYYY-MM-DD" style="width: 100%" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <el-col :span="12" v-if="infoType === 'basis' || infoType === 'job'">
|
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
<el-form-item label="文件类型">
|
|
<el-form-item label="文件类型">
|
|
|
<el-select v-model="editForm.document_type" placeholder="请选择文件类型" style="width: 100%">
|
|
<el-select v-model="editForm.document_type" placeholder="请选择文件类型" style="width: 100%">
|
|
|
<el-option v-for="item in documentTypeOptions" :key="item" :label="item" :value="item" />
|
|
<el-option v-for="item in documentTypeOptions" :key="item" :label="item" :value="item" />
|
|
@@ -339,7 +321,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <el-col :span="12" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
<el-form-item label="专业领域">
|
|
<el-form-item label="专业领域">
|
|
|
<el-select v-model="editForm.professional_field" placeholder="请选择专业领域" style="width: 100%">
|
|
<el-select v-model="editForm.professional_field" placeholder="请选择专业领域" style="width: 100%">
|
|
|
<el-option v-for="item in professionalFieldOptions" :key="item" :label="item" :value="item" />
|
|
<el-option v-for="item in professionalFieldOptions" :key="item" :label="item" :value="item" />
|
|
@@ -347,7 +329,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <el-col :span="12" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
<el-form-item label="时效性">
|
|
<el-form-item label="时效性">
|
|
|
<el-select v-model="editForm.validity" placeholder="请选择时效性" style="width: 100%">
|
|
<el-select v-model="editForm.validity" placeholder="请选择时效性" style="width: 100%">
|
|
|
<el-option label="现行" value="现行" />
|
|
<el-option label="现行" value="现行" />
|
|
@@ -357,129 +339,54 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <el-col :span="12" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
<el-form-item label="起草单位">
|
|
<el-form-item label="起草单位">
|
|
|
<el-input v-model="editForm.drafting_unit" placeholder="请输入起草单位" />
|
|
<el-input v-model="editForm.drafting_unit" placeholder="请输入起草单位" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <el-col :span="12" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
<el-form-item label="批准部门">
|
|
<el-form-item label="批准部门">
|
|
|
<el-input v-model="editForm.approving_department" placeholder="请输入批准部门" />
|
|
<el-input v-model="editForm.approving_department" placeholder="请输入批准部门" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <el-col :span="24" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <el-col :span="24">
|
|
|
<el-form-item label="参编单位">
|
|
<el-form-item label="参编单位">
|
|
|
<div v-for="(unit, index) in participatingUnitsList" :key="index" class="dynamic-input-row">
|
|
<div v-for="(unit, index) in participatingUnitsList" :key="index" class="dynamic-input-row">
|
|
|
<el-input v-model="participatingUnitsList[index]" placeholder="请输入参编单位" />
|
|
<el-input v-model="participatingUnitsList[index]" placeholder="请输入参编单位" />
|
|
|
<div class="row-actions">
|
|
<div class="row-actions">
|
|
|
<el-button :icon="Plus" circle size="small" @click="addListItem(participatingUnitsList)" />
|
|
<el-button :icon="Plus" circle size="small" @click="addListItem(participatingUnitsList)" />
|
|
|
- <el-button :icon="Minus" circle size="small" type="danger" @click="removeListItem(participatingUnitsList, index)" />
|
|
|
|
|
|
|
+ <el-button :icon="Minus" circle size="small" type="danger" @click="removeListItem(participatingUnitsList, index)" v-if="participatingUnitsList.length > 1" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <el-col :span="12" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
<el-form-item label="工程阶段">
|
|
<el-form-item label="工程阶段">
|
|
|
<el-input v-model="editForm.engineering_phase" placeholder="请输入工程阶段" />
|
|
<el-input v-model="editForm.engineering_phase" placeholder="请输入工程阶段" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <el-col :span="24" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <el-col :span="24">
|
|
|
<el-form-item label="引用依据">
|
|
<el-form-item label="引用依据">
|
|
|
- <div v-for="(basis, index) in referenceBasisList" :key="index" class="dynamic-input-row">
|
|
|
|
|
|
|
+ <div v-for="(std, index) in referenceBasisList" :key="index" class="dynamic-input-row">
|
|
|
<el-input v-model="referenceBasisList[index]" placeholder="请输入引用依据" />
|
|
<el-input v-model="referenceBasisList[index]" placeholder="请输入引用依据" />
|
|
|
<div class="row-actions">
|
|
<div class="row-actions">
|
|
|
<el-button :icon="Plus" circle size="small" @click="addListItem(referenceBasisList)" />
|
|
<el-button :icon="Plus" circle size="small" @click="addListItem(referenceBasisList)" />
|
|
|
- <el-button :icon="Minus" circle size="small" type="danger" @click="removeListItem(referenceBasisList, index)" />
|
|
|
|
|
|
|
+ <el-button :icon="Minus" circle size="small" type="danger" @click="removeListItem(referenceBasisList, index)" v-if="referenceBasisList.length > 1" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <el-col :span="12" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
<el-form-item label="来源链接">
|
|
<el-form-item label="来源链接">
|
|
|
<el-input v-model="editForm.source_url" placeholder="请输入来源链接" />
|
|
<el-input v-model="editForm.source_url" placeholder="请输入来源链接" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <template v-if="infoType === 'work'">
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
- <el-form-item label="项目名称">
|
|
|
|
|
- <el-input v-model="editForm.project_name" placeholder="请输入项目名称" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
- <el-form-item label="项目标段">
|
|
|
|
|
- <el-input v-model="editForm.project_section" placeholder="请输入项目标段" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
- <el-form-item label="方案类别">
|
|
|
|
|
- <el-select v-model="editForm.plan_category" placeholder="请选择方案类别" style="width: 100%">
|
|
|
|
|
- <el-option v-for="item in planCategoryOptions" :key="item" :label="item" :value="item" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
- <el-form-item label="一级分类">
|
|
|
|
|
- <el-input v-model="editForm.level_1_classification" disabled />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
- <el-form-item label="二级分类">
|
|
|
|
|
- <el-select v-model="editForm.level_2_classification" placeholder="请选择二级分类" style="width: 100%">
|
|
|
|
|
- <el-option v-for="item in level2Options" :key="item" :label="item" :value="item" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
- <el-form-item label="三级分类">
|
|
|
|
|
- <el-select v-model="editForm.level_3_classification" placeholder="请选择三级分类" style="width: 100%">
|
|
|
|
|
- <el-option v-for="item in level3Options" :key="item" :label="item" :value="item" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
- <el-form-item label="四级分类">
|
|
|
|
|
- <el-select v-model="editForm.level_4_classification" placeholder="请选择四级分类" style="width: 100%">
|
|
|
|
|
- <el-option v-for="item in level4Options" :key="item" :label="item" :value="item" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="24">
|
|
|
|
|
- <el-form-item label="方案摘要">
|
|
|
|
|
- <el-input v-model="editForm.plan_summary" type="textarea" :rows="3" placeholder="请输入方案摘要" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="24">
|
|
|
|
|
- <el-form-item label="施工标准规范">
|
|
|
|
|
- <div v-for="(basis, index) in compilationBasisList" :key="index" class="dynamic-input-row">
|
|
|
|
|
- <el-input v-model="compilationBasisList[index]" placeholder="请输入施工标准规范" />
|
|
|
|
|
- <div class="row-actions">
|
|
|
|
|
- <el-button :icon="Plus" circle size="small" @click="addListItem(compilationBasisList)" />
|
|
|
|
|
- <el-button :icon="Minus" circle size="small" type="danger" @click="removeListItem(compilationBasisList, index)" />
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
- <template v-if="infoType === 'job'">
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
- <el-form-item label="生效日期">
|
|
|
|
|
- <el-date-picker v-model="editForm.effective_start_date" type="date" placeholder="选择生效日期" value-format="YYYY-MM-DD" style="width: 100%" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
- <el-form-item label="失效日期">
|
|
|
|
|
- <el-date-picker v-model="editForm.effective_end_date" type="date" placeholder="选择失效日期" value-format="YYYY-MM-DD" style="width: 100%" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
<el-form-item label="备注">
|
|
<el-form-item label="备注">
|
|
|
<el-input v-model="editForm.note" type="textarea" :rows="2" placeholder="请输入备注" />
|
|
<el-input v-model="editForm.note" type="textarea" :rows="2" placeholder="请输入备注" />
|
|
@@ -487,8 +394,31 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="文件预览链接" v-if="false">
|
|
|
|
|
- <el-input v-model="editForm.file_url" placeholder="请输入文件预览链接 (URL)" />
|
|
|
|
|
|
|
+ <el-form-item label="上传文件" :required="!editForm.id">
|
|
|
|
|
+ <el-upload
|
|
|
|
|
+ v-if="!editForm.id"
|
|
|
|
|
+ class="upload-demo"
|
|
|
|
|
+ action="#"
|
|
|
|
|
+ :auto-upload="false"
|
|
|
|
|
+ :on-change="handleFileChange"
|
|
|
|
|
+ :on-remove="handleFileRemove"
|
|
|
|
|
+ :file-list="fileList"
|
|
|
|
|
+ :limit="1"
|
|
|
|
|
+ accept=".pdf,.doc,.docx,.ppt,.pptx,.png,.jpg,.jpeg,.txt"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button type="primary">选择文件</el-button>
|
|
|
|
|
+ <template #tip>
|
|
|
|
|
+ <div class="el-upload__tip">
|
|
|
|
|
+ 支持 PDF, Word, PPT, 图片, TXT 等格式
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-upload>
|
|
|
|
|
+ <div v-else class="file-info-edit">
|
|
|
|
|
+ <el-tag type="info" size="large" class="file-tag">
|
|
|
|
|
+ <el-icon><Document /></el-icon>
|
|
|
|
|
+ <span>文件已锁定(编辑模式不可更改)</span>
|
|
|
|
|
+ </el-tag>
|
|
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
@@ -502,43 +432,32 @@
|
|
|
<!-- 查看详情对话框 -->
|
|
<!-- 查看详情对话框 -->
|
|
|
<el-dialog v-model="detailDialogVisible" title="详情信息" width="600px">
|
|
<el-dialog v-model="detailDialogVisible" title="详情信息" width="600px">
|
|
|
<el-descriptions :column="1" border>
|
|
<el-descriptions :column="1" border>
|
|
|
- <el-descriptions-item :label="titleLabel">{{ currentItem?.title }}</el-descriptions-item>
|
|
|
|
|
- <el-descriptions-item label="标准编号" v-if="infoType === 'basis'">{{ currentItem?.standard_no || '-' }}</el-descriptions-item>
|
|
|
|
|
- <el-descriptions-item :label="authorityLabel">{{ currentItem?.issuing_authority || '-' }}</el-descriptions-item>
|
|
|
|
|
- <el-descriptions-item :label="dateLabel">{{ formatDate(currentItem?.release_date) }}</el-descriptions-item>
|
|
|
|
|
- <el-descriptions-item label="文档类型" v-if="infoType === 'basis' || infoType === 'job'">{{ currentItem?.document_type || '-' }}</el-descriptions-item>
|
|
|
|
|
- <el-descriptions-item label="专业领域" v-if="infoType === 'basis'">{{ currentItem?.professional_field || '-' }}</el-descriptions-item>
|
|
|
|
|
- <el-descriptions-item label="参编单位" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <el-descriptions-item label="文档名称">{{ currentItem?.title }}</el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="所属知识库" v-if="currentItem?.kb_name">
|
|
|
|
|
+ <span class="kb-name-tag">
|
|
|
|
|
+ <el-icon><Tickets /></el-icon> {{ currentItem.kb_name }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="标准编号">{{ currentItem?.standard_no || '-' }}</el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="发布单位">{{ currentItem?.issuing_authority || '-' }}</el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="发布日期">{{ formatDate(currentItem?.release_date) }}</el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="文档类型">{{ currentItem?.document_type || '-' }}</el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="专业领域">{{ currentItem?.professional_field || '-' }}</el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="参编单位">
|
|
|
<div v-if="currentItem?.participating_units">
|
|
<div v-if="currentItem?.participating_units">
|
|
|
<div v-for="(unit, idx) in currentItem.participating_units.split(';')" :key="idx">{{ unit }}</div>
|
|
<div v-for="(unit, idx) in currentItem.participating_units.split(';')" :key="idx">{{ unit }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<span v-else>-</span>
|
|
<span v-else>-</span>
|
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
|
- <el-descriptions-item label="引用依据" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <el-descriptions-item label="引用依据">
|
|
|
<div v-if="currentItem?.reference_basis">
|
|
<div v-if="currentItem?.reference_basis">
|
|
|
- <div v-for="(basis, idx) in currentItem.reference_basis.split(';')" :key="idx">{{ basis }}</div>
|
|
|
|
|
|
|
+ <div v-for="(std, idx) in currentItem.reference_basis.split(';')" :key="idx">{{ std }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<span v-else>-</span>
|
|
<span v-else>-</span>
|
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
|
- <el-descriptions-item label="时效性" v-if="infoType === 'basis'">
|
|
|
|
|
|
|
+ <el-descriptions-item label="时效性">
|
|
|
<el-tag :type="getValidityType(currentItem?.validity)">{{ currentItem?.validity || '现行' }}</el-tag>
|
|
<el-tag :type="getValidityType(currentItem?.validity)">{{ currentItem?.validity || '现行' }}</el-tag>
|
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
|
- <template v-if="infoType === 'work'">
|
|
|
|
|
- <el-descriptions-item label="项目名称">{{ currentItem?.project_name || '-' }}</el-descriptions-item>
|
|
|
|
|
- <el-descriptions-item label="项目标段">{{ currentItem?.project_section || '-' }}</el-descriptions-item>
|
|
|
|
|
- <el-descriptions-item label="方案类别">{{ currentItem?.plan_category || '-' }}</el-descriptions-item>
|
|
|
|
|
- <el-descriptions-item label="一级分类">{{ currentItem?.level_1_classification || '-' }}</el-descriptions-item>
|
|
|
|
|
- <el-descriptions-item label="二级分类">{{ currentItem?.level_2_classification || '-' }}</el-descriptions-item>
|
|
|
|
|
- <el-descriptions-item label="三级分类">{{ currentItem?.level_3_classification || '-' }}</el-descriptions-item>
|
|
|
|
|
- <el-descriptions-item label="四级分类">{{ currentItem?.level_4_classification || '-' }}</el-descriptions-item>
|
|
|
|
|
- <el-descriptions-item label="方案摘要">{{ currentItem?.plan_summary || '-' }}</el-descriptions-item>
|
|
|
|
|
- <el-descriptions-item label="施工标准规范">
|
|
|
|
|
- <div v-if="currentItem?.compilation_basis">
|
|
|
|
|
- <div v-for="(basis, idx) in currentItem.compilation_basis.split(';')" :key="idx">{{ basis }}</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <span v-else>-</span>
|
|
|
|
|
- </el-descriptions-item>
|
|
|
|
|
- </template>
|
|
|
|
|
<el-descriptions-item label="创建人">{{ currentItem?.creator_name || '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="创建人">{{ currentItem?.creator_name || '-' }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="创建时间">{{ formatDateTime(currentItem?.created_time) }}</el-descriptions-item>
|
|
<el-descriptions-item label="创建时间">{{ formatDateTime(currentItem?.created_time) }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="修改人">{{ currentItem?.updater_name || '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="修改人">{{ currentItem?.updater_name || '-' }}</el-descriptions-item>
|
|
@@ -577,13 +496,39 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 入库确认对话框 -->
|
|
|
|
|
+ <el-dialog v-model="ingestDialogVisible" title="文档入库" width="450px">
|
|
|
|
|
+ <el-form :model="ingestForm" label-width="100px">
|
|
|
|
|
+ <el-form-item label="选择知识库" required>
|
|
|
|
|
+ <el-select v-model="ingestForm.kb_id" placeholder="请选择知识库" style="width: 100%">
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in knowledgeBases"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ :label="item.name"
|
|
|
|
|
+ :value="item.id"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="切分方式" required>
|
|
|
|
|
+ <el-radio-group v-model="ingestForm.kb_method">
|
|
|
|
|
+ <el-radio label="length">按长度切分</el-radio>
|
|
|
|
|
+ <el-radio label="symbol">按符号切分</el-radio>
|
|
|
|
|
+ <el-radio label="parent_child">父子段切分</el-radio>
|
|
|
|
|
+ </el-radio-group>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <el-button @click="ingestDialogVisible = false">取消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="confirmIngest" :loading="ingesting">确认入库</el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { ref, onMounted, computed, watch, reactive } from 'vue'
|
|
|
|
|
-import { useRoute } from 'vue-router'
|
|
|
|
|
-import { Search, View, Monitor, Download, Edit, Delete, Refresh, Plus, Minus, Document } from '@element-plus/icons-vue'
|
|
|
|
|
|
|
+import { ref, onMounted, computed, reactive } from 'vue'
|
|
|
|
|
+import { Search, View, Monitor, Download, Edit, Delete, Refresh, Plus, Minus, Document, Tickets } from '@element-plus/icons-vue'
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import request from '@/api/request'
|
|
import request from '@/api/request'
|
|
|
import type { ApiResponse } from '@/types/auth'
|
|
import type { ApiResponse } from '@/types/auth'
|
|
@@ -592,7 +537,6 @@ import { downloadFile } from '@/utils/download'
|
|
|
import { getFileExtension } from '@/utils/file'
|
|
import { getFileExtension } from '@/utils/file'
|
|
|
import { useAuthStore } from '@/stores/auth'
|
|
import { useAuthStore } from '@/stores/auth'
|
|
|
|
|
|
|
|
-const route = useRoute()
|
|
|
|
|
const authStore = useAuthStore()
|
|
const authStore = useAuthStore()
|
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
|
const submitting = ref(false)
|
|
const submitting = ref(false)
|
|
@@ -609,10 +553,34 @@ const previewLoading = ref(false)
|
|
|
const previewUrl = ref('')
|
|
const previewUrl = ref('')
|
|
|
const previewTitle = ref('')
|
|
const previewTitle = ref('')
|
|
|
|
|
|
|
|
|
|
+// 入库相关状态
|
|
|
|
|
+const ingestDialogVisible = ref(false)
|
|
|
|
|
+const ingesting = ref(false)
|
|
|
|
|
+const knowledgeBases = ref<any[]>([])
|
|
|
|
|
+const ingestForm = reactive({
|
|
|
|
|
+ kb_id: '',
|
|
|
|
|
+ kb_method: 'length'
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
// 动态列表字段存储
|
|
// 动态列表字段存储
|
|
|
const participatingUnitsList = ref<string[]>([''])
|
|
const participatingUnitsList = ref<string[]>([''])
|
|
|
const referenceBasisList = ref<string[]>([''])
|
|
const referenceBasisList = ref<string[]>([''])
|
|
|
-const compilationBasisList = ref<string[]>([''])
|
|
|
|
|
|
|
+const fileList = ref<any[]>([])
|
|
|
|
|
+
|
|
|
|
|
+const handleFileChange = (file: any, files: any[]) => {
|
|
|
|
|
+ fileList.value = files
|
|
|
|
|
+ if (file.name && !editForm.title) {
|
|
|
|
|
+ const nameParts = file.name.split('.')
|
|
|
|
|
+ if (nameParts.length > 1) {
|
|
|
|
|
+ nameParts.pop()
|
|
|
|
|
+ }
|
|
|
|
|
+ editForm.title = nameParts.join('.')
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const handleFileRemove = () => {
|
|
|
|
|
+ fileList.value = []
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
const addListItem = (list: string[]) => {
|
|
const addListItem = (list: string[]) => {
|
|
|
list.push('')
|
|
list.push('')
|
|
@@ -637,11 +605,8 @@ const editForm = reactive<any>({
|
|
|
document_type: '',
|
|
document_type: '',
|
|
|
professional_field: '',
|
|
professional_field: '',
|
|
|
validity: '现行',
|
|
validity: '现行',
|
|
|
- project_name: '',
|
|
|
|
|
- project_section: '',
|
|
|
|
|
note: '',
|
|
note: '',
|
|
|
file_url: '',
|
|
file_url: '',
|
|
|
- // 新增字段 - Basis
|
|
|
|
|
english_name: '',
|
|
english_name: '',
|
|
|
implementation_date: '',
|
|
implementation_date: '',
|
|
|
drafting_unit: '',
|
|
drafting_unit: '',
|
|
@@ -650,41 +615,13 @@ const editForm = reactive<any>({
|
|
|
engineering_phase: '',
|
|
engineering_phase: '',
|
|
|
reference_basis: '',
|
|
reference_basis: '',
|
|
|
source_url: '',
|
|
source_url: '',
|
|
|
- // 新增字段 - Work
|
|
|
|
|
- plan_summary: '',
|
|
|
|
|
- compilation_basis: '',
|
|
|
|
|
- plan_category: '',
|
|
|
|
|
- level_1_classification: '施工方案',
|
|
|
|
|
- level_2_classification: '',
|
|
|
|
|
- level_3_classification: '',
|
|
|
|
|
- level_4_classification: '',
|
|
|
|
|
- // 新增字段 - Job
|
|
|
|
|
- effective_start_date: '',
|
|
|
|
|
- effective_end_date: ''
|
|
|
|
|
|
|
+ kb_id: ''
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-const formTitle = computed(() => editForm.id ? `编辑${moduleName.value}` : `新增${moduleName.value}`)
|
|
|
|
|
-
|
|
|
|
|
-// 检索表单接口
|
|
|
|
|
-interface SearchForm {
|
|
|
|
|
- title: string
|
|
|
|
|
- standard_no: string
|
|
|
|
|
- document_type: string
|
|
|
|
|
- professional_field: string
|
|
|
|
|
- validity: string
|
|
|
|
|
- issuing_authority: string
|
|
|
|
|
- release_date_start: string
|
|
|
|
|
- release_date_end: string
|
|
|
|
|
- plan_category: string
|
|
|
|
|
- level_1_classification: string
|
|
|
|
|
- level_2_classification: string
|
|
|
|
|
- level_3_classification: string
|
|
|
|
|
- level_4_classification: string
|
|
|
|
|
- [key: string]: string
|
|
|
|
|
-}
|
|
|
|
|
|
|
+const formTitle = computed(() => editForm.id ? '编辑施工标准规范' : '新增施工标准规范')
|
|
|
|
|
|
|
|
// 检索表单
|
|
// 检索表单
|
|
|
-const searchForm = reactive<SearchForm>({
|
|
|
|
|
|
|
+const searchForm = reactive<any>({
|
|
|
title: '',
|
|
title: '',
|
|
|
standard_no: '',
|
|
standard_no: '',
|
|
|
document_type: '',
|
|
document_type: '',
|
|
@@ -692,75 +629,12 @@ const searchForm = reactive<SearchForm>({
|
|
|
validity: '',
|
|
validity: '',
|
|
|
issuing_authority: '',
|
|
issuing_authority: '',
|
|
|
release_date_start: '',
|
|
release_date_start: '',
|
|
|
- release_date_end: '',
|
|
|
|
|
- plan_category: '',
|
|
|
|
|
- level_1_classification: '',
|
|
|
|
|
- level_2_classification: '',
|
|
|
|
|
- level_3_classification: '',
|
|
|
|
|
- level_4_classification: ''
|
|
|
|
|
|
|
+ release_date_end: ''
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
// 选项配置
|
|
// 选项配置
|
|
|
const documentTypeOptions = ['国家标准', '行业标准', '企业标准', '地方标准', '管理制度', '技术规范']
|
|
const documentTypeOptions = ['国家标准', '行业标准', '企业标准', '地方标准', '管理制度', '技术规范']
|
|
|
const professionalFieldOptions = ['建筑工程', '市政工程', '机电安装', '路桥工程', '装饰装修', '其他']
|
|
const professionalFieldOptions = ['建筑工程', '市政工程', '机电安装', '路桥工程', '装饰装修', '其他']
|
|
|
-const planCategoryOptions = ['超危大方案', '超危大方案较大II级', '超危大方案特大IV级', '超危大方案一般I级', '超危大方案重大III级', '危大方案', '一般方案']
|
|
|
|
|
-const level2Options = ['临建工程', '路基工程', '其他', '桥梁工程', '隧道工程']
|
|
|
|
|
-const level3Options = ['/', 'TBM施工', '拌和站安、拆施工', '不良地质隧道施工', '常规桥梁', '挡土墙工程类', '辅助坑道施工', '复杂洞口工程施工', '钢筋加工场安、拆', '钢栈桥施工', '拱桥', '涵洞工程类', '滑坡体处理类', '路堤', '路堑', '其他', '深基坑', '隧道总体施工', '特殊结构隧道', '斜拉桥', '悬索桥']
|
|
|
|
|
-const level4Options = ['/', '挡土墙', '顶管', '断层破碎带及软弱围岩', '钢筋砼箱涵', '高填路堤', '抗滑桩', '其他', '软岩大变形隧道', '上部结构', '深基坑开挖与支护', '深挖路堑', '隧道TBM', '隧道进洞', '隧道竖井', '隧道斜井', '特种设备', '瓦斯隧道', '下部结构', '小净距隧道', '岩爆隧道', '岩溶隧道', '涌水突泥隧道', '桩基础']
|
|
|
|
|
-
|
|
|
|
|
-// 根据路由路径判断类型
|
|
|
|
|
-const infoType = computed(() => {
|
|
|
|
|
- const path = route.path
|
|
|
|
|
- if (path.includes('/basis')) return 'basis'
|
|
|
|
|
- if (path.includes('/work')) return 'work'
|
|
|
|
|
- if (path.includes('/job')) return 'job'
|
|
|
|
|
- return 'basis'
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
-const pageTitle = computed(() => {
|
|
|
|
|
- switch (infoType.value) {
|
|
|
|
|
- case 'basis': return '施工标准规范管理'
|
|
|
|
|
- case 'work': return '施工方案管理'
|
|
|
|
|
- case 'job': return '办公制度管理'
|
|
|
|
|
- default: return '基本信息管理'
|
|
|
|
|
- }
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
-const moduleName = computed(() => {
|
|
|
|
|
- switch (infoType.value) {
|
|
|
|
|
- case 'basis': return '施工标准规范'
|
|
|
|
|
- case 'work': return '施工方案'
|
|
|
|
|
- case 'job': return '办公制度'
|
|
|
|
|
- default: return ''
|
|
|
|
|
- }
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
-const titleLabel = computed(() => {
|
|
|
|
|
- switch (infoType.value) {
|
|
|
|
|
- case 'basis': return '文档名称'
|
|
|
|
|
- case 'work': return '方案名称'
|
|
|
|
|
- case 'job': return '文件名称'
|
|
|
|
|
- default: return '名称'
|
|
|
|
|
- }
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
-const authorityLabel = computed(() => {
|
|
|
|
|
- switch (infoType.value) {
|
|
|
|
|
- case 'basis': return '发布单位'
|
|
|
|
|
- case 'work': return '编制单位'
|
|
|
|
|
- case 'job': return '发布部门'
|
|
|
|
|
- default: return '单位'
|
|
|
|
|
- }
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
-const dateLabel = computed(() => {
|
|
|
|
|
- switch (infoType.value) {
|
|
|
|
|
- case 'basis': return '发布日期'
|
|
|
|
|
- case 'work': return '编制日期'
|
|
|
|
|
- case 'job': return '发布日期'
|
|
|
|
|
- default: return '日期'
|
|
|
|
|
- }
|
|
|
|
|
-})
|
|
|
|
|
|
|
|
|
|
// 获取列表数据
|
|
// 获取列表数据
|
|
|
const loadData = async () => {
|
|
const loadData = async () => {
|
|
@@ -773,15 +647,13 @@ const loadData = async () => {
|
|
|
size: number
|
|
size: number
|
|
|
}>>('/api/v1/sample/basic-info/list', {
|
|
}>>('/api/v1/sample/basic-info/list', {
|
|
|
params: {
|
|
params: {
|
|
|
- type: infoType.value,
|
|
|
|
|
|
|
+ type: 'standard',
|
|
|
page: currentPage.value,
|
|
page: currentPage.value,
|
|
|
size: pageSize.value,
|
|
size: pageSize.value,
|
|
|
...searchForm
|
|
...searchForm
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- // axios 返回的是 AxiosResponse,但在拦截器中我们返回了 response.data
|
|
|
|
|
- // 如果 TS 还是报错,可以显式转换
|
|
|
|
|
const resData = (response as unknown) as ApiResponse<{
|
|
const resData = (response as unknown) as ApiResponse<{
|
|
|
items: any[]
|
|
items: any[]
|
|
|
total: number
|
|
total: number
|
|
@@ -846,7 +718,6 @@ const getValidityType = (validity: string) => {
|
|
|
|
|
|
|
|
const proxyPreviewUrl = computed(() => {
|
|
const proxyPreviewUrl = computed(() => {
|
|
|
if (!previewUrl.value) return ''
|
|
if (!previewUrl.value) return ''
|
|
|
- // 使用后端代理接口查看外部网页,附加 token 以通过认证
|
|
|
|
|
let baseUrl = import.meta.env.VITE_API_BASE_URL || 'http://localhost:8000'
|
|
let baseUrl = import.meta.env.VITE_API_BASE_URL || 'http://localhost:8000'
|
|
|
if (baseUrl.includes('localhost') && window.location.hostname !== 'localhost' && window.location.hostname !== '127.0.0.1') {
|
|
if (baseUrl.includes('localhost') && window.location.hostname !== 'localhost' && window.location.hostname !== '127.0.0.1') {
|
|
|
baseUrl = baseUrl.replace('localhost', window.location.hostname)
|
|
baseUrl = baseUrl.replace('localhost', window.location.hostname)
|
|
@@ -859,13 +730,11 @@ const handleAction = async (action: string, row: any) => {
|
|
|
switch (action) {
|
|
switch (action) {
|
|
|
case 'view':
|
|
case 'view':
|
|
|
if (row.file_url) {
|
|
if (row.file_url) {
|
|
|
- // 如果有文件链接,直接进入预览
|
|
|
|
|
previewTitle.value = row.title
|
|
previewTitle.value = row.title
|
|
|
previewUrl.value = row.file_url
|
|
previewUrl.value = row.file_url
|
|
|
previewVisible.value = true
|
|
previewVisible.value = true
|
|
|
previewLoading.value = true
|
|
previewLoading.value = true
|
|
|
} else {
|
|
} else {
|
|
|
- // 否则进入详情对话框
|
|
|
|
|
detailDialogVisible.value = true
|
|
detailDialogVisible.value = true
|
|
|
}
|
|
}
|
|
|
break
|
|
break
|
|
@@ -889,15 +758,14 @@ const handleAction = async (action: string, row: any) => {
|
|
|
}
|
|
}
|
|
|
break
|
|
break
|
|
|
case 'edit':
|
|
case 'edit':
|
|
|
|
|
+ loadKnowledgeBases()
|
|
|
Object.keys(editForm).forEach(key => {
|
|
Object.keys(editForm).forEach(key => {
|
|
|
editForm[key] = row[key] || ''
|
|
editForm[key] = row[key] || ''
|
|
|
})
|
|
})
|
|
|
- // 处理动态列表字段
|
|
|
|
|
participatingUnitsList.value = row.participating_units ? row.participating_units.split(';') : ['']
|
|
participatingUnitsList.value = row.participating_units ? row.participating_units.split(';') : ['']
|
|
|
referenceBasisList.value = row.reference_basis ? row.reference_basis.split(';') : ['']
|
|
referenceBasisList.value = row.reference_basis ? row.reference_basis.split(';') : ['']
|
|
|
- compilationBasisList.value = row.compilation_basis ? row.compilation_basis.split(';') : ['']
|
|
|
|
|
-
|
|
|
|
|
editForm.id = row.id
|
|
editForm.id = row.id
|
|
|
|
|
+ fileList.value = []
|
|
|
formDialogVisible.value = true
|
|
formDialogVisible.value = true
|
|
|
break
|
|
break
|
|
|
case 'delete':
|
|
case 'delete':
|
|
@@ -905,87 +773,154 @@ const handleAction = async (action: string, row: any) => {
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
|
}).then(async () => {
|
|
}).then(async () => {
|
|
|
try {
|
|
try {
|
|
|
- const res = await request.post<ApiResponse>(`/api/v1/sample/basic-info/delete?type=${infoType.value}&id=${row.id}`)
|
|
|
|
|
- const resData = (res as unknown) as ApiResponse
|
|
|
|
|
- if (resData.code === 0) {
|
|
|
|
|
|
|
+ const res = await request.post<ApiResponse>(`/api/v1/sample/basic-info/delete?type=standard&id=${row.id}`)
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
ElMessage.success('删除成功')
|
|
ElMessage.success('删除成功')
|
|
|
loadData()
|
|
loadData()
|
|
|
} else {
|
|
} else {
|
|
|
- ElMessage.error(resData.message || '删除失败')
|
|
|
|
|
|
|
+ ElMessage.error(res.message || '删除失败')
|
|
|
}
|
|
}
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.error('删除失败:', error)
|
|
console.error('删除失败:', error)
|
|
|
- ElMessage.error('网络错误')
|
|
|
|
|
|
|
+ ElMessage.error('网络错误,请稍后重试')
|
|
|
}
|
|
}
|
|
|
}).catch(() => {})
|
|
}).catch(() => {})
|
|
|
break
|
|
break
|
|
|
|
|
+ case 'ingest':
|
|
|
|
|
+ currentItem.value = row
|
|
|
|
|
+ loadKnowledgeBases()
|
|
|
|
|
+ ingestDialogVisible.value = true
|
|
|
|
|
+ break
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const handleAdd = () => {
|
|
|
|
|
- Object.keys(editForm).forEach(key => {
|
|
|
|
|
- if (key === 'validity') {
|
|
|
|
|
- editForm[key] = '现行'
|
|
|
|
|
- } else if (key === 'level_1_classification') {
|
|
|
|
|
- editForm[key] = '施工方案'
|
|
|
|
|
|
|
+const loadKnowledgeBases = async () => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await request.get<ApiResponse<any[]>>('/api/v1/sample/knowledge-base/list', {
|
|
|
|
|
+ params: {
|
|
|
|
|
+ page: 1,
|
|
|
|
|
+ page_size: 1000
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ knowledgeBases.value = res.data
|
|
|
|
|
+ if (knowledgeBases.value.length > 0 && !ingestForm.kb_id) {
|
|
|
|
|
+ ingestForm.kb_id = knowledgeBases.value[0].id
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error('获取知识库失败:', error)
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const confirmIngest = async () => {
|
|
|
|
|
+ if (!ingestForm.kb_id) {
|
|
|
|
|
+ ElMessage.warning('请选择知识库')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!currentItem.value || !currentItem.value.id) {
|
|
|
|
|
+ ElMessage.warning('未选中有效文档')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ ingesting.value = true
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await request.post<ApiResponse>('/api/v1/sample/documents/batch-enter', {
|
|
|
|
|
+ ids: [currentItem.value.id],
|
|
|
|
|
+ table_type: 'standard',
|
|
|
|
|
+ kb_id: ingestForm.kb_id,
|
|
|
|
|
+ kb_method: ingestForm.kb_method
|
|
|
|
|
+ })
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ ElMessage.success(res.message || '已加入入库队列')
|
|
|
|
|
+ ingestDialogVisible.value = false
|
|
|
|
|
+ loadData()
|
|
|
} else {
|
|
} else {
|
|
|
- editForm[key] = ''
|
|
|
|
|
|
|
+ ElMessage.error(res.message || '入库失败')
|
|
|
}
|
|
}
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error('入库失败:', error)
|
|
|
|
|
+ ElMessage.error('网络错误,请稍后重试')
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ ingesting.value = false
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const handleAdd = () => {
|
|
|
|
|
+ loadKnowledgeBases()
|
|
|
|
|
+ Object.keys(editForm).forEach(key => {
|
|
|
|
|
+ editForm[key] = ''
|
|
|
})
|
|
})
|
|
|
- // 初始化动态列表字段
|
|
|
|
|
- participatingUnitsList.value = ['']
|
|
|
|
|
- referenceBasisList.value = ['']
|
|
|
|
|
- compilationBasisList.value = ['']
|
|
|
|
|
-
|
|
|
|
|
editForm.id = null
|
|
editForm.id = null
|
|
|
|
|
+ editForm.validity = '现行'
|
|
|
|
|
+ participatingUnitsList.value = ['']
|
|
|
|
|
+ referenceBasisList.value = ['']
|
|
|
|
|
+ fileList.value = []
|
|
|
formDialogVisible.value = true
|
|
formDialogVisible.value = true
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const submitForm = async () => {
|
|
const submitForm = async () => {
|
|
|
if (!editForm.title) {
|
|
if (!editForm.title) {
|
|
|
- return ElMessage.warning('请输入名称')
|
|
|
|
|
|
|
+ ElMessage.warning('请输入标题')
|
|
|
|
|
+ return
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- // 提交前合并动态列表字段,过滤掉空行并用分号连接
|
|
|
|
|
- editForm.participating_units = participatingUnitsList.value.filter(item => item.trim() !== '').join(';')
|
|
|
|
|
- editForm.reference_basis = referenceBasisList.value.filter(item => item.trim() !== '').join(';')
|
|
|
|
|
- editForm.compilation_basis = compilationBasisList.value.filter(item => item.trim() !== '').join(';')
|
|
|
|
|
-
|
|
|
|
|
submitting.value = true
|
|
submitting.value = true
|
|
|
try {
|
|
try {
|
|
|
- const isEdit = !!editForm.id
|
|
|
|
|
- const url = isEdit ? `/api/v1/sample/basic-info/edit?type=${infoType.value}&id=${editForm.id}` : `/api/v1/sample/basic-info/add?type=${infoType.value}`
|
|
|
|
|
|
|
+ if (fileList.value.length > 0 && fileList.value[0].raw) {
|
|
|
|
|
+ const file = fileList.value[0].raw
|
|
|
|
|
+ const urlRes = await request.post<ApiResponse<any>>('/api/v1/sample/documents/upload-url', {
|
|
|
|
|
+ filename: file.name,
|
|
|
|
|
+ content_type: file.type,
|
|
|
|
|
+ prefix: 'basic-info/standard'
|
|
|
|
|
+ })
|
|
|
|
|
+ if (urlRes.code === 0) {
|
|
|
|
|
+ const { upload_url, file_url } = urlRes.data
|
|
|
|
|
+ await fetch(upload_url, {
|
|
|
|
|
+ method: 'PUT',
|
|
|
|
|
+ body: file,
|
|
|
|
|
+ headers: {
|
|
|
|
|
+ 'Content-Type': file.type
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ editForm.file_url = file_url
|
|
|
|
|
+ } else {
|
|
|
|
|
+ throw new Error(urlRes.message || '获取上传链接失败')
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if (!editForm.id && fileList.value.length === 0) {
|
|
|
|
|
+ ElMessage.warning('请选择要上传的文件')
|
|
|
|
|
+ submitting.value = false
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ editForm.participating_units = participatingUnitsList.value.filter(item => item.trim() !== '').join(';')
|
|
|
|
|
+ editForm.reference_basis = referenceBasisList.value.filter(item => item.trim() !== '').join(';')
|
|
|
|
|
|
|
|
- const res = await request.post<ApiResponse>(url, editForm)
|
|
|
|
|
- const resData = (res as unknown) as ApiResponse
|
|
|
|
|
|
|
+ const url = editForm.id
|
|
|
|
|
+ ? `/api/v1/sample/basic-info/edit?type=standard&id=${editForm.id}`
|
|
|
|
|
+ : '/api/v1/sample/basic-info/add?type=standard'
|
|
|
|
|
|
|
|
- if (resData.code === 0) {
|
|
|
|
|
- ElMessage.success(isEdit ? '更新成功' : '新增成功')
|
|
|
|
|
|
|
+ const res = await request.post<ApiResponse>(url, editForm)
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ ElMessage.success(editForm.id ? '修改成功' : '新增成功')
|
|
|
formDialogVisible.value = false
|
|
formDialogVisible.value = false
|
|
|
|
|
+ fileList.value = []
|
|
|
loadData()
|
|
loadData()
|
|
|
} else {
|
|
} else {
|
|
|
- ElMessage.error(resData.message || '操作失败')
|
|
|
|
|
|
|
+ ElMessage.error(res.message || '提交失败')
|
|
|
}
|
|
}
|
|
|
- } catch (error) {
|
|
|
|
|
- console.error('操作失败:', error)
|
|
|
|
|
- ElMessage.error('网络错误')
|
|
|
|
|
|
|
+ } catch (error: any) {
|
|
|
|
|
+ console.error('提交失败:', error)
|
|
|
|
|
+ ElMessage.error(error.message || '网络错误,请稍后重试')
|
|
|
} finally {
|
|
} finally {
|
|
|
submitting.value = false
|
|
submitting.value = false
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const openInNewWindow = () => {
|
|
const openInNewWindow = () => {
|
|
|
- if (proxyPreviewUrl.value) {
|
|
|
|
|
|
|
+ if (previewUrl.value) {
|
|
|
window.open(proxyPreviewUrl.value, '_blank')
|
|
window.open(proxyPreviewUrl.value, '_blank')
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 监听路由变化,切换类型时重新加载数据
|
|
|
|
|
-watch(() => route.path, () => {
|
|
|
|
|
- currentPage.value = 1
|
|
|
|
|
- resetSearch()
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
loadData()
|
|
loadData()
|
|
|
})
|
|
})
|
|
@@ -994,141 +929,108 @@ onMounted(() => {
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
.basic-info-container {
|
|
.basic-info-container {
|
|
|
padding: 20px;
|
|
padding: 20px;
|
|
|
- background-color: #f5f7fa;
|
|
|
|
|
- min-height: calc(100vh - 84px);
|
|
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
.search-card {
|
|
.search-card {
|
|
|
margin-bottom: 20px;
|
|
margin-bottom: 20px;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
.search-header {
|
|
.search-header {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
margin-bottom: 20px;
|
|
margin-bottom: 20px;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
.search-header .title {
|
|
.search-header .title {
|
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
.search-form {
|
|
.search-form {
|
|
|
- padding: 0 10px;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-:deep(.el-form-item__label) {
|
|
|
|
|
- font-weight: normal;
|
|
|
|
|
- color: #606266;
|
|
|
|
|
- padding-bottom: 4px;
|
|
|
|
|
|
|
+ margin-bottom: 0;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
.search-buttons {
|
|
.search-buttons {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
justify-content: flex-end;
|
|
|
- gap: 10px;
|
|
|
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+.table-card {
|
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
|
+}
|
|
|
|
|
+.pagination-container {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
|
+ margin-top: 20px;
|
|
|
|
|
+}
|
|
|
|
|
+.action-buttons {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ gap: 5px;
|
|
|
|
|
+}
|
|
|
|
|
+.file-info-edit {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ gap: 8px;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+}
|
|
|
|
|
+.file-tag {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 5px;
|
|
|
|
|
+ width: fit-content;
|
|
|
|
|
+}
|
|
|
.dynamic-input-row {
|
|
.dynamic-input-row {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
margin-bottom: 8px;
|
|
margin-bottom: 8px;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+.dynamic-input-row :deep(.el-input) {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+}
|
|
|
.dynamic-input-row:last-child {
|
|
.dynamic-input-row:last-child {
|
|
|
margin-bottom: 0;
|
|
margin-bottom: 0;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
.row-actions {
|
|
.row-actions {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
gap: 5px;
|
|
gap: 5px;
|
|
|
margin-left: 10px;
|
|
margin-left: 10px;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-.table-card {
|
|
|
|
|
- padding: 10px;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.pagination-container {
|
|
|
|
|
- margin-top: 20px;
|
|
|
|
|
|
|
+.tag-group {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- justify-content: flex-end;
|
|
|
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
|
+ gap: 4px;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
.info-tag {
|
|
.info-tag {
|
|
|
- margin-right: 4px;
|
|
|
|
|
- margin-bottom: 2px;
|
|
|
|
|
max-width: 120px;
|
|
max-width: 120px;
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
text-overflow: ellipsis;
|
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-.tag-group {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-wrap: wrap;
|
|
|
|
|
- gap: 4px;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.action-buttons {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: center;
|
|
|
|
|
- gap: 4px;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.action-buttons .el-button {
|
|
|
|
|
- padding: 4px;
|
|
|
|
|
- margin: 0;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
.popover-tag-list {
|
|
.popover-tag-list {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- flex-direction: column;
|
|
|
|
|
|
|
+ flex-wrap: wrap;
|
|
|
gap: 8px;
|
|
gap: 8px;
|
|
|
- padding: 4px 0;
|
|
|
|
|
|
|
+ padding: 4px;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
.popover-info-tag {
|
|
.popover-info-tag {
|
|
|
- width: 100%;
|
|
|
|
|
- justify-content: flex-start;
|
|
|
|
|
- height: auto;
|
|
|
|
|
- padding: 4px 8px;
|
|
|
|
|
- white-space: normal;
|
|
|
|
|
- word-break: break-all;
|
|
|
|
|
- line-height: 1.4;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-:deep(.el-table .cell) {
|
|
|
|
|
- white-space: nowrap;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.preview-content {
|
|
|
|
|
- border: 1px solid #dcdfe6;
|
|
|
|
|
- border-radius: 4px;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
|
|
+ margin-bottom: 4px;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-.no-preview {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: center;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- height: 100%;
|
|
|
|
|
- background-color: #f5f7fa;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
.dialog-header-custom {
|
|
.dialog-header-custom {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
- width: 100%;
|
|
|
|
|
padding-right: 30px;
|
|
padding-right: 30px;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
.header-actions {
|
|
.header-actions {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- gap: 10px;
|
|
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+}
|
|
|
|
|
+.no-preview {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+}
|
|
|
|
|
+:deep(.preview-dialog .el-dialog__body) {
|
|
|
|
|
+ padding: 0;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|