技术方案库修改

This commit is contained in:
cwchen 2025-10-30 18:54:09 +08:00
parent 991428f85a
commit 22acd6baa3
5 changed files with 117 additions and 19 deletions

View File

@ -64,7 +64,7 @@ export default {
},
mounted() {
if (this.value) {
this.activeCategory = this.value
this.activeCategory = this.value;
}
},
created() {
@ -94,6 +94,7 @@ export default {
handleCategoryClick(id) {
this.activeCategory = id
this.$emit('change', id)
this.handleQuery();
},
handleCategoryCommand(command) {
if (command.type === 'edit') {

View File

@ -2,12 +2,12 @@
<!-- 技术方案列表 -->
<div class="right-table-card">
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="false" ref="technicalTableRef"
:columnsList="columnsList" :request-api="listAPI" :sendParams="{ enterpriseId }">
:columnsList="columnsList" :request-api="listAPI" :sendParams="{'technicalSolutionTypeId':value }">
<template slot="tableTitle">
<h3>数据列表</h3>
</template>
<template slot="tableActions">
<el-button @click="handleAdd" v-hasPermi="['enterpriseLibrary:technical:add']" class="add-btn"><i
<el-button @click="handleAdd" :disabled="disabled" v-hasPermi="['enterpriseLibrary:technical:add']" class="add-btn"><i
class="el-icon-plus"></i> 新增</el-button>
</template>
<template slot="technicalSolutionState">
@ -48,10 +48,10 @@ export default {
type: String,
default: '0'
},
technicalSolutionTypeId: {
type: Number,
value: {
type: [String, Number],
default: null
}
},
},
data() {
return {
@ -60,7 +60,19 @@ export default {
listAPI,
}
},
watch: {
value(newVal){
if(newVal){
this.handleQuery();
}
},
immediate: true
},
computed:{
disabled(){
return !this.value;
}
},
created() {
//
if (Array.isArray(this.formLabel)) {
@ -80,8 +92,9 @@ export default {
name: 'TechnicalAdd',
query: {
enterpriseId: encryptWithSM4(this.enterpriseId || '0'),
technicalSolutionTypeId: encryptWithSM4(this.technicalSolutionTypeId + '' || '0'),
type: encryptWithSM4('add'),
technicalSolutionTypeId: encryptWithSM4(this.value + '' || '0'),
technicalSolutionId: encryptWithSM4('0'),
type: encryptWithSM4('add')
}
})
},
@ -92,7 +105,7 @@ export default {
name: 'TechnicalEdit',
query: {
enterpriseId: encryptWithSM4(this.enterpriseId || '0'),
technicalSolutionTypeId: encryptWithSM4(this.technicalSolutionTypeId + '' || '0'),
technicalSolutionTypeId: encryptWithSM4(this.value || '0'),
type: encryptWithSM4('edit'),
technicalSolutionId: encryptWithSM4(row.technicalSolutionId + '' || '0'),
}
@ -100,11 +113,13 @@ export default {
},
/** 查看操作 */
handleDetail(row) {
console.log(row);
this.$router.push({
name: 'TechnicalDetail',
query: {
enterpriseId: encryptWithSM4(this.enterpriseId || '0'),
technicalSolutionTypeId: encryptWithSM4(this.technicalSolutionTypeId + '' || '0'),
technicalSolutionTypeId: encryptWithSM4(row.technicalSolutionTypeId + '' || '0'),
type: encryptWithSM4('detail'),
technicalSolutionId: encryptWithSM4(row.technicalSolutionId + '' || '0'),
}

View File

@ -1,11 +1,6 @@
<!-- 企业主体库表单 -->
<template>
<div class="app-container" :class="{ 'no-pointer-events': showUploadAnimation || showSaveAnimation }">
<!-- 全局上传动画 -->
<GlobalUploadAnimation v-if="showUploadAnimation" :text="animationText" subtext="正在处理文件,请稍候..." />
<!-- 保存动画 -->
<GlobalUploadAnimation v-if="showSaveAnimation" text="数据上传中" subtext="请稍后,正在保存数据..." />
<div class="app-container">
<div class="content-header">
<el-button class="reset-btn" @click="handleClose()">返回</el-button>
</div>

View File

@ -72,7 +72,7 @@ export default {
async getDetail() {
if (this.type === 'edit') {
const res = await getDetailDataAPI({ technicalSolutionTypeId: this.technicalSolutionTypeId,
technicalSolutionId: this.technicalSolutionId })
technicalSolutionId: this.technicalSolutionId,type:'edit' })
console.log('res:', res);
this.detailData = res.data;
}
@ -216,6 +216,93 @@ export default {
}
}
//
.global-upload-animation {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
//
pointer-events: auto;
.animation-mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.6); //
backdrop-filter: blur(4px);
//
pointer-events: auto;
}
.animation-content {
position: relative;
z-index: 10000;
text-align: center;
background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
padding: 40px 50px;
border-radius: 20px;
box-shadow:
0 10px 40px rgba(31, 114, 234, 0.15),
0 0 0 1px rgba(31, 114, 234, 0.1);
min-width: 280px;
animation: slideInUp 0.3s ease-out;
//
pointer-events: auto;
.spinner {
width: 60px;
height: 60px;
border: 4px solid #f3f7ff;
border-top: 4px solid #1F72EA;
border-radius: 50%;
animation: spin 1.2s linear infinite;
margin: 0 auto 20px;
position: relative;
&::after {
content: '';
position: absolute;
top: -4px;
left: -4px;
right: -4px;
bottom: -4px;
border: 4px solid transparent;
border-top: 4px solid #4A8BFF;
border-radius: 50%;
animation: spin 0.8s linear infinite reverse;
}
}
.animation-text {
font-size: 20px;
font-weight: 600;
color: #1F72EA;
margin-bottom: 8px;
background: linear-gradient(135deg, #1F72EA 0%, #4A8BFF 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.animation-subtext {
font-size: 14px;
color: #666;
opacity: 0.8;
}
}
}
.content-body {
margin-top: 20px;
}

View File

@ -13,7 +13,7 @@
@category-command="handleCategoryCommand" :enterpriseId="enterpriseId" />
</el-col>
<el-col :span="20" class="right-col">
<RightTable :technicalSolutionTypeId="activeCategory" @add-scheme="handleAddScheme" @view="handleView"
<RightTable :value="activeCategory" @add-scheme="handleAddScheme" @view="handleView"
@edit="handleEdit" @delete="handleDelete" :enterpriseId="enterpriseId" />
</el-col>
</el-row>