This commit is contained in:
LHD_HY 2025-10-31 09:04:19 +08:00
commit 2997b9f1a9
16 changed files with 670 additions and 110 deletions

View File

@ -1,45 +1,83 @@
import request from '@/utils/request'
// 人员库->查询列表
export function listAPI(params) {
// 技术方案库->查询类别列表
export function typeListAPI(params) {
return request({
url: '/smartBid/mainDatabase/personnel/getList',
url: '/smartBid/mainDatabase/technical/getTypeList',
method: 'GET',
params
})
}
/* 人员库->新增人员库 */
/* 技术方案库->新增技术方案类别库 */
export function addTypeDataAPI(data) {
return request({
url: '/smartBid/mainDatabase/technical/addTypeData',
method: 'POST',
data
})
}
/* 技术方案库->修改技术方案类别库 */
export function editTypeDataAPI(data) {
return request({
url: '/smartBid/mainDatabase/technical/editTypeData',
method: 'POST',
data
})
}
/* 技术方案库->删除技术方案类别库 */
export function delTypeDataAPI(data) {
return request({
url: '/smartBid/mainDatabase/technical/delTypeData',
method: 'POST',
data
})
}
// 技术方案库->查询列表
export function listAPI(params) {
return request({
url: '/smartBid/mainDatabase/technical/getDataList',
method: 'GET',
params
})
}
/* 技术方案库->新增技术方案库 */
export function addDataAPI(data) {
return request({
url: '/smartBid/mainDatabase/personnel/addData',
url: '/smartBid/mainDatabase/technical/addData',
method: 'POST',
data
})
}
/* 人员库->修改人员库 */
/* 技术方案库->修改技术方案库 */
export function editDataAPI(data) {
return request({
url: '/smartBid/mainDatabase/personnel/editData',
url: '/smartBid/mainDatabase/technical/editData',
method: 'POST',
data
})
}
/* 人员库->删除人员库 */
/* 技术方案库->删除技术方案库 */
export function delDataAPI(data) {
return request({
url: '/smartBid/mainDatabase/personnel/delData',
url: '/smartBid/mainDatabase/technical/delData',
method: 'POST',
data
})
}
/* 人员库->查询详情 */
/* 技术方案库->查询详情 */
export function getDetailDataAPI(params) {
return request({
url: '/smartBid/mainDatabase/personnel/getDetailData',
url: '/smartBid/mainDatabase/technical/detailData',
method: 'GET',
params
})

View File

@ -0,0 +1,46 @@
import request from '@/utils/request'
// 工器具库->查询列表
export function listAPI(params) {
return request({
url: '/smartBid/mainDatabase/tool/getList',
method: 'GET',
params
})
}
/* 工器具库->新增工器具 */
export function addDataAPI(data) {
return request({
url: '/smartBid/mainDatabase/tool/addData',
method: 'POST',
data
})
}
/* 工器具库->修改工器具 */
export function editDataAPI(data) {
return request({
url: '/smartBid/mainDatabase/tool/editData',
method: 'POST',
data
})
}
/* 工器具库->删除工器具 */
export function delDataAPI(data) {
return request({
url: '/smartBid/mainDatabase/tool/delData',
method: 'POST',
data
})
}
/* 工器具库->查询详情 */
export function getDetailDataAPI(params) {
return request({
url: '/smartBid/mainDatabase/tool/getDetailData',
method: 'GET',
params
})
}

View File

@ -271,7 +271,7 @@ export default {
//
dynamicWidth: 0,
//
handleColWidth: 260,
handleColWidth: 200,
// id
idCount: 1,
//

View File

@ -312,7 +312,7 @@ export const dynamicRoutes = [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/technical/components/TechnicalForm'),
name: 'TechnicalAdd',
name: 'TechnicalEdit',
meta: { title: '修改方案', activeMenu: '/enterpriseLibrary/enterprise', noCache: true }
}
]
@ -325,8 +325,8 @@ export const dynamicRoutes = [
children: [
{
path: 'index',
component: () => import('@/views/enterpriseLibrary/technical/components/TechnicalForm'),
name: 'TechnicalAdd',
component: () => import('@/views/enterpriseLibrary/technical/components/TechnicalDetail'),
name: 'TechnicalDetail',
meta: { title: '方案详情', activeMenu: '/enterpriseLibrary/enterprise', noCache: true }
}
]

View File

@ -3,7 +3,7 @@
<el-upload ref="upload" class="upload-demo" drag action="#" multiple :show-file-list="true"
:before-upload="beforeUpload" :on-remove="handleRemove" :on-change="handleFileChange"
:on-exceed="handleExceed" :file-list="files" :accept="accept" :limit="limitUploadNum"
:auto-upload="autoUpload" :http-request="customUpload">
:auto-upload="autoUpload" :http-request="customUpload" :disabled="disabled">
<div class="upload-content">
<!-- 默认上传区域 -->
@ -59,6 +59,10 @@ export default {
type: String,
default: '',
},
disabled: {
type: Boolean,
default: false,
},
},
data() {
return {

View File

@ -4,8 +4,9 @@
+ 添加
</div>
<div class="category-list">
<div v-for="item in categoryList" :key="item.id" class="category-item"
:class="{ active: activeCategory === item.id }" @click="handleCategoryClick(item.id)">
<div v-for="item in categoryList" :key="item.technicalSolutionTypeId" class="category-item"
:class="{ active: activeCategory === item.technicalSolutionTypeId }"
@click="handleCategoryClick(item.technicalSolutionTypeId)">
<i class="el-icon-folder" style="margin-right: 8px; color: #666;"></i>
<span class="category-name">{{ item.technicalSolutionName }}</span>
<el-dropdown trigger="click" @command="handleCategoryCommand">
@ -27,6 +28,7 @@
</template>
<script>
import TypeForm from './TypeForm.vue'
import { typeListAPI,delTypeDataAPI } from '@/api/enterpriseLibrary/technical/technical'
export default {
name: 'LeftTypeTechnical',
components: {
@ -34,23 +36,18 @@ export default {
},
props: {
value: {
type: String,
default: ''
type: [String, Number],
default: null
},
enterpriseId: {
type: String,
type: [String, Number],
default: '0'
}
},
data() {
return {
activeCategory: 'dev',
categoryList: [
{ id: 'substation', technicalSolutionName: '变电站' },
{ id: 'swapping', technicalSolutionName: '换电站' },
{ id: 'line', technicalSolutionName: '线路' },
{ id: 'commitment', technicalSolutionName: '对招标人项目通过评价审核验收的承诺' },
],
activeCategory: null,
categoryList: [],
title: "",
isflag: false,
isAdd: '',
@ -62,30 +59,48 @@ export default {
if (newVal) {
this.activeCategory = newVal
}
}
},
immediate: true
},
mounted() {
if (this.value) {
this.activeCategory = this.value
this.activeCategory = this.value;
}
},
created() {
this.getList()
},
methods: {
//
getList() {
typeListAPI({
enterpriseId: this.enterpriseId
}).then(res => {
this.categoryList = res.data;
if (res.data.length > 0 && !this.activeCategory) {
const technicalSolutionTypeId = res.data[0].technicalSolutionTypeId;
this.activeCategory = technicalSolutionTypeId
this.$emit('change', technicalSolutionTypeId)
}
})
},
/**新增方案类型 */
handleAddCategory() {
this.title = "新增方案类型";
this.isAdd = 'add';
this.row = {};
this.row = { enterpriseId: this.enterpriseId };
this.isflag = true;
},
handleCategoryClick(id) {
this.activeCategory = id
this.$emit('change', id)
this.handleQuery();
},
handleCategoryCommand(command) {
if (command.type === 'edit') {
this.handleEditCategory(command.raw)
} else if (command.type === 'delete') {
this.$emit('category-command', command)
this.handleDeleteCategory(command.raw);
}
},
/**编辑方案类型 */
@ -93,14 +108,36 @@ export default {
console.log(raw);
this.title = "编辑方案类型";
this.isAdd = 'edit';
this.row = { ...raw };
this.row = { ...raw, enterpriseId: this.enterpriseId };
this.isflag = true;
},
/**删除方案类型 */
handleDeleteCategory(raw) {
this.$confirm(`确定要删除方案类型"${raw.technicalSolutionName}"吗?删除后将无法恢复!`, '操作提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true,
customClass: 'delete-confirm-dialog'
}).then(() => {
delTypeDataAPI({ technicalSolutionTypeId: raw.technicalSolutionTypeId,enterpriseId: this.enterpriseId }).then(res => {
if (res.code === 200) {
this.$message.success('删除成功');
this.activeCategory = null;
this.handleQuery();
} else {
this.$message.error(res.msg || '删除失败');
}
}).catch(error => {
console.error('删除失败:', error);
});
})
},
closeDialog() {
this.isflag = false;
},
handleQuery() {
// this.$refs.dataClassTableRef.getTableList()
this.getList();
},
}
}

View File

@ -1,21 +1,21 @@
<template>
<!-- 技术方案列表 -->
<div class="right-table-card">
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="false" ref="userTableRef"
:columnsList="columnsList" :request-api="listUser">
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="false" ref="technicalTableRef"
: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="deptName" slot-scope="{ data }">
<span>{{ data.dept.deptName || '--' }}</span>
<template slot="technicalSolutionState">
<span>可引用</span>
</template>
<template slot="handle" slot-scope="{ data }">
<el-button type="text" v-hasPermi="['enterpriseLibrary:technical:detail']" class="action-btn"
@click="handleUpdate(data)">
@click="handleDetail(data)">
查看
</el-button>
<el-button type="text" v-hasPermi="['enterpriseLibrary:technical:edit']" class="action-btn"
@ -34,10 +34,7 @@
<script>
import TableModel from '@/components/TableModel2'
import { columnsList, formLabel } from './config'
import {
listUser,
delUser,
} from '@/api/system/user'
import { listAPI,delDataAPI } from '@/api/enterpriseLibrary/technical/technical'
import { encryptWithSM4 } from '@/utils/sm'
export default {
@ -50,16 +47,32 @@ export default {
enterpriseId: {
type: String,
default: '0'
}
},
value: {
type: [String, Number],
default: null
},
},
data() {
return {
formLabel,
columnsList,
listUser,
listAPI,
}
},
watch: {
value(newVal){
if(newVal){
this.handleQuery();
}
},
immediate: true
},
computed:{
disabled(){
return !this.value;
}
},
created() {
//
if (Array.isArray(this.formLabel)) {
@ -78,21 +91,43 @@ export default {
this.$router.push({
name: 'TechnicalAdd',
query: {
enterpriseId: encryptWithSM4(this.enterpriseId || '0')
enterpriseId: encryptWithSM4(this.enterpriseId || '0'),
technicalSolutionTypeId: encryptWithSM4(this.value + '' || '0'),
technicalSolutionId: encryptWithSM4('0'),
type: encryptWithSM4('add')
}
})
},
/** 修改操作 */
handleUpdate(row) {
this.title = "修改";
this.isAdd = 'edit';
this.row = row;
this.isflag = true;
this.$router.push({
name: 'TechnicalEdit',
query: {
enterpriseId: encryptWithSM4(this.enterpriseId || '0'),
technicalSolutionTypeId: encryptWithSM4(this.value || '0'),
type: encryptWithSM4('edit'),
technicalSolutionId: encryptWithSM4(row.technicalSolutionId + '' || '0'),
}
})
},
/** 查看操作 */
handleDetail(row) {
console.log(row);
this.$router.push({
name: 'TechnicalDetail',
query: {
enterpriseId: encryptWithSM4(this.enterpriseId || '0'),
technicalSolutionTypeId: encryptWithSM4(row.technicalSolutionTypeId + '' || '0'),
type: encryptWithSM4('detail'),
technicalSolutionId: encryptWithSM4(row.technicalSolutionId + '' || '0'),
}
})
},
/* 搜索操作 */
handleQuery() {
this.$refs.userTableRef.getTableList()
this.$refs.technicalTableRef.getTableList()
},
/** 删除操作 */
handleDelete(row) {

View File

@ -0,0 +1,186 @@
<!-- 企业主体库表单 -->
<template>
<div class="app-container">
<div class="content-header">
<el-button class="reset-btn" @click="handleClose()">返回</el-button>
</div>
<div class="content-body">
<el-row :gutter="24" class="content-row">
<!-- 基础信息 -->
<el-col :span="6" class="pane-left">
<BasicInfoDetail ref="basicInfo" :detailData="detailData" />
</el-col>
<!-- 文件上传 -->
<el-col :span="6" class="pane-center">
<FileInfoDetail ref="fileInfo" :detailData="detailData" />
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import { encryptWithSM4,decryptWithSM4 } from '@/utils/sm'
import BasicInfoDetail from './child/BasicInfoDetail.vue'
import FileInfoDetail from './child/FileInfoDetail.vue'
import { getDetailDataAPI } from '@/api/enterpriseLibrary/technical/technical'
export default {
name: 'TechnicalDetail',
components: {
BasicInfoDetail,
FileInfoDetail,
},
data() {
return {
enterpriseId: decryptWithSM4(this.$route.query.enterpriseId),
technicalSolutionTypeId: decryptWithSM4(this.$route.query.technicalSolutionTypeId),
technicalSolutionId: decryptWithSM4(this.$route.query.technicalSolutionId),
type: decryptWithSM4(this.$route.query.type),
showUploadAnimation: false,
detailData: {} //
}
},
created() {
this.getDetail()
},
methods: {
//
handleClose() {
const obj = {
path: "/technical/index",
query: {
enterpriseId: encryptWithSM4(this.enterpriseId || '0'),
}
}
this.$tab.closeOpenPage(obj)
},
//
async getDetail() {
if (this.type === 'detail') {
const res = await getDetailDataAPI({ technicalSolutionTypeId: this.technicalSolutionTypeId,
technicalSolutionId: this.technicalSolutionId ,type:'detail'})
console.log('res:', res);
this.detailData = res.data;
}
},
},
}
</script>
<style scoped lang="scss">
.app-container {
padding: 24px;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
min-height: 100vh;
overflow-y: auto;
position: relative;
//
&.no-pointer-events {
pointer-events: none;
//
* {
pointer-events: none;
}
}
}
.content-body {
margin-top: 20px;
}
.content-row {
margin: 0;
display: flex;
flex-wrap: nowrap;
gap: 16px;
}
.pane-left,
.pane-center,
.pane-right {
background: #fff;
border-radius: 16px 16px 16px 16px;
min-height: 600px;
box-shadow: 0px 4px 20px 0px rgba(31, 35, 55, 0.1);
padding: 0;
margin-bottom: 20px;
flex: 1;
min-width: 0;
}
.content-header {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 20px;
gap: 12px;
}
.search-btn {
width: 98px;
height: 36px;
background: #1F72EA;
box-shadow: 0px 4px 8px 0px rgba(51, 135, 255, 0.5);
border-radius: 4px;
border: none;
color: #fff;
font-size: 14px;
transition: all 0.3s ease;
&:hover {
background: #4A8BFF;
box-shadow: 0px 6px 12px 0px rgba(51, 135, 255, 0.6);
}
// loading
&.is-loading {
opacity: 0.7;
pointer-events: none;
}
}
.reset-btn {
width: 98px;
height: 36px;
background: #FFFFFF;
box-shadow: 0px 4px 8px 0px rgba(76, 76, 76, 0.2);
border-radius: 4px;
border: none;
color: #666;
font-size: 14px;
transition: all 0.3s ease;
&:hover {
background: #f5f5f5;
color: #409EFF;
box-shadow: 0px 6px 12px 0px rgba(76, 76, 76, 0.3);
}
}
//
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes slideInUp {
from {
opacity: 0;
transform: translateY(30px) scale(0.9);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
</style>

View File

@ -14,11 +14,11 @@
<el-row :gutter="24" class="content-row">
<!-- 基础信息 -->
<el-col :span="6" class="pane-left">
<BasicInfo ref="basicInfo" />
<BasicInfo ref="basicInfo" :detailData="detailData" />
</el-col>
<!-- 文件上传 -->
<el-col :span="6" class="pane-center">
<FileInfo ref="legalPerson" />
<FileInfo ref="fileInfo" :detailData="detailData" />
</el-col>
</el-row>
</div>
@ -30,7 +30,7 @@ import { encryptWithSM4,decryptWithSM4 } from '@/utils/sm'
import BasicInfo from './child/BasicInfo.vue'
import FileInfo from './child/FileInfo.vue'
import GlobalUploadAnimation from '@/views/common/GlobalUploadAnimation.vue'
import { addDataAPI, editDataAPI, getDetailDataAPI } from '@/api/enterpriseLibrary/enterprise/enterprise'
import { addDataAPI, editDataAPI, getDetailDataAPI } from '@/api/enterpriseLibrary/technical/technical'
export default {
name: 'TechnicalForm',
@ -42,6 +42,9 @@ export default {
data() {
return {
enterpriseId: decryptWithSM4(this.$route.query.enterpriseId),
technicalSolutionTypeId: decryptWithSM4(this.$route.query.technicalSolutionTypeId),
technicalSolutionId: decryptWithSM4(this.$route.query.technicalSolutionId),
type: decryptWithSM4(this.$route.query.type),
showUploadAnimation: false,
showSaveAnimation: false, //
uploadQueue: 0, //
@ -68,7 +71,8 @@ export default {
//
async getDetail() {
if (this.type === 'edit') {
const res = await getDetailDataAPI({ enterpriseId: this.enterpriseId })
const res = await getDetailDataAPI({ technicalSolutionTypeId: this.technicalSolutionTypeId,
technicalSolutionId: this.technicalSolutionId,type:'edit' })
console.log('res:', res);
this.detailData = res.data;
}
@ -85,45 +89,39 @@ export default {
try {
//
const [basicInfoData, legalPersonData, accountData] = await Promise.all([
const [basicInfoData, fileInfoData] = await Promise.all([
this.$refs.basicInfo.validate(),
this.$refs.legalPerson.validate(),
this.$refs.accountOpeningCertificate.validate()
this.$refs.fileInfo.validate()
])
//
let formData = {
...basicInfoData,
...legalPersonData,
...accountData,
...fileInfoData,
allFiles: [
...basicInfoData.fileList.map(file => JSON.parse(JSON.stringify(file))),
...legalPersonData.fileList.map(file => JSON.parse(JSON.stringify(file))),
...legalPersonData.fileList2.map(file => JSON.parse(JSON.stringify(file))),
...accountData.fileList.map(file => JSON.parse(JSON.stringify(file)))
...fileInfoData.fileList.map(file => JSON.parse(JSON.stringify(file))),
],
delFiles: [
...basicInfoData.delFileList,
...legalPersonData.delFileList,
...accountData.delFileList
...fileInfoData.delFileList
]
}
console.log('所有表单校验通过,完整数据:', formData)
let allFiles = formData.allFiles.map(file => {
return file?.response?.fileRes ? {
...file.response.fileRes,
} : null;
}).filter(item => item !== null);
formData.files = allFiles;
formData.natureConstruction = formData.natureConstruction.join(',');
formData.enterpriseId = this.enterpriseId;
formData.technicalSolutionTypeId = this.technicalSolutionTypeId;
//
delete formData.fileList;
delete formData.delFileList;
delete formData.allFiles;
delete formData.fileList2;
console.log('所有表单校验通过,完整数据:', formData)
//
const res = await this.saveEnterprise(formData)
const res = await this.saveData(formData)
console.log('res:', res);
if (res.code === 200) {
this.$message.success('保存成功')
@ -140,7 +138,7 @@ export default {
}
},
//
async saveEnterprise(formData) {
async saveData(formData) {
return new Promise((resolve, reject) => {
if (this.type === 'add') { //
addDataAPI(formData).then(res => {
@ -149,7 +147,7 @@ export default {
reject(error)
})
} else { //
formData.enterpriseId = this.enterpriseId;
formData.technicalSolutionId = this.technicalSolutionId;
editDataAPI(formData).then(res => {
resolve(res)
}).catch(error => {

View File

@ -19,7 +19,10 @@
</template>
<script>
import _ from 'lodash'
import { addTypeDataAPI, editTypeDataAPI } from '@/api/enterpriseLibrary/technical/technical'
const CONSTANT_PARAMS = {
type:'edit'
};
export default {
name: "TypeForm",
props: ["width", "rowData", "title", "disabled", "isAdd"],
@ -29,8 +32,9 @@ export default {
dialogVisible: true,
isDisabled: true,
form: {
id: null,
technicalSolutionTypeId: null,
technicalSolutionName: '',
enterpriseId: this.rowData.enterpriseId || null,
},
rules: {
technicalSolutionName: [
@ -42,21 +46,27 @@ export default {
watch: {
isAdd: {
handler(newVal) {
if (newVal === 'edit') {
if (newVal === CONSTANT_PARAMS.type) {
this.initFormData();
}
},
immediate: true,
},
},
computed: {
isAddData() {
return this.isAdd === CONSTANT_PARAMS.type;
}
},
methods: {
/** 初始化表单数据 */
initFormData() {
if (this.isAdd === 'edit' && this.rowData) {
if (this.rowData) {
//
this.form = {
id: this.rowData.id,
technicalSolutionTypeId: this.rowData.technicalSolutionTypeId,
technicalSolutionName: this.rowData.technicalSolutionName || '',
enterpriseId: this.rowData.enterpriseId || null,
};
}
},
@ -74,9 +84,8 @@ export default {
reset() {
this.form = {
id: null,
pid: null,
dataTypeName: '',
remark: '',
technicalSolutionName: '',
enterpriseId: '',
};
this.resetForm("ruleForm");
},
@ -98,8 +107,8 @@ export default {
target: this.$el.querySelector('.el-dialog') || document.body
})
let params = _.cloneDeep(this.form);
if (this.isAdd === 'add') {
addDataClassAPI(params).then(res => {
if (!this.isAddData) {
addTypeDataAPI(params).then(res => {
this.loading.close();
if (res.code === 200) {
this.handleReuslt(res);
@ -112,7 +121,7 @@ export default {
});
} else {
updateDataClassAPI(params).then(res => {
editTypeDataAPI(params).then(res => {
this.loading.close();
if (res.code === 200) {
this.handleReuslt(res);

View File

@ -68,7 +68,14 @@ export default {
}
},
watch: {
detailData:{
handler(newVal) {
if(Object.keys(newVal).length > 0){
this.setFormData(newVal)
}
},
immediate: true
}
},
created() {
},
@ -87,18 +94,11 @@ export default {
},
setFormData() {
const fileList = this.getFileList('business_license');
this.form = {
enterpriseName: this.detailData.enterpriseName || '',
enterpriseCode: this.detailData.enterpriseCode || '',
registeredCapital: this.detailData.registeredCapital || '',
establishedDate: this.detailData.establishedDate || null,
businessTerm: this.detailData.businessTerm || '',
residence: this.detailData.residence || '',
businessScope: this.detailData.businessScope || '',
fileList: fileList,
delFileList: []
voltageLevel: this.detailData.voltageLevel || '',
natureConstruction: this.detailData.natureConstruction.split(',') || [],
structuralForm: this.detailData.structuralForm || '',
basicForm: this.detailData.basicForm || '',
}
},

View File

@ -0,0 +1,80 @@
<template>
<div>
<div class="basic-info-title">
<img src="@/assets/enterpriseLibrary/basic-info.png" alt="基础信息">
<span>基础信息</span>
</div>
<div class="detail-content">
<DetailItem label="电压等级" :value="form.voltageLevel" />
<DetailItem label="建设性质" :value="form.natureConstruction" />
<DetailItem label="结构形式" :value="form.structuralForm" />
<DetailItem label="基础形式" :value="form.basicForm" />
</div>
</div>
</template>
<script>
import DetailItem from '@/views/common/DetailItem.vue';
export default {
name: 'BasicInfoDetailTechnical',
components: {
DetailItem
},
props: {
detailData: {
type: Object,
default: () => { }
}
},
data() {
return {
form: {
voltageLevel: undefined,
natureConstruction: undefined,
structuralForm: undefined,
basicForm: undefined,
},
}
},
watch: {
detailData:{
handler(newVal) {
if(Object.keys(newVal).length > 0){
this.setDetailData(newVal)
}
},
immediate: true
}
},
created() {
},
methods: {
setDetailData() {
this.form = {
voltageLevel: this.detailData.voltageLevel || '',
natureConstruction: this.detailData.natureConstruction || '',
structuralForm: this.detailData.structuralForm || '',
basicForm: this.detailData.basicForm || '',
}
},
},
}
</script>
<style scoped lang="scss">
.basic-info-title {
display: flex;
align-items: center;
margin: 10px 0;
span {
margin: 0 5px;
font-size: 20px;
}
}
.form-item {
width: 100%;
}
</style>

View File

@ -9,7 +9,7 @@
<el-form-item label="文件上传" prop="fileList">
<UploadMoreFile :fileList="form.fileList" @file-change="handleFileChange" @del-file="handleDelFile"
type="business_license" :uploadType="uploadType" :maxFileTips="maxFileTips"
:fileUploadRule="fileUploadRule" :limitUploadNum="limitUploadNum" />
:fileUploadRule="fileUploadRule" :limitUploadNum="limitUploadNum" :disabled="disabled" />
</el-form-item>
</el-form>
</div>
@ -26,7 +26,8 @@ const defaultParams = {
fields_json: '',
suffix: 'technical_solution_database'
},
limitUploadNum: 5
limitUploadNum: 5,
disabled: false
};
import UploadMoreFile from '@/views/common/UploadMoreFile.vue'
export default {
@ -47,6 +48,7 @@ export default {
maxFileTips: defaultParams.maxFileTips,
fileUploadRule: defaultParams.fileUploadRule,
limitUploadNum: defaultParams.limitUploadNum,
disabled: defaultParams.disabled,
form: {
fileList: [],
delFileList: []
@ -58,6 +60,18 @@ export default {
}
}
},
watch: {
detailData:{
handler(newVal) {
if(Object.keys(newVal).length > 0){
this.limitUploadNum = 1;
this.disabled = true;
this.setFormData(newVal)
}
},
immediate: true
}
},
created() {
},
methods: {
@ -89,7 +103,22 @@ export default {
}
},
setFormData() {
const fileList = this.getFileList();
this.form = {
fileList: fileList,
delFileList: []
}
},
getFileList(){
return this.detailData.resourceFileVoList.map(item => {
return {
name: item.fileName,
filePath: item.filePath,
lsFilePath:item.lsFilePath,
fileType:item.fileType
};
});
}
},
}

View File

@ -0,0 +1,85 @@
<template>
<div>
<div class="basic-info-title">
<img src="@/assets/enterpriseLibrary/basic-info.png" alt="文件上传">
<span>文件上传</span>
</div>
<div class="detail-content">
<FileOrImageDisplay label="文件上传" :file="form.fileList[0]" :image-url="form.url" />
</div>
</div>
</template>
<script>
import FileOrImageDisplay from '@/views/common/FileOrImageDisplay.vue';
export default {
name: 'FileInfoTechnical',
components: {
FileOrImageDisplay
},
props: {
detailData: {
type: Object,
default: () => { }
}
},
data() {
return {
form: {
fileList: [],
url: ''
},
}
},
watch: {
detailData: {
handler(newVal) {
if (Object.keys(newVal).length > 0) {
this.setDetailData(newVal)
}
},
immediate: true
}
},
created() {
},
methods: {
setDetailData() {
const fileList = this.getFileList();
this.form = {
fileList: fileList,
url: fileList[0].filePath
}
},
getFileList() {
return this.detailData.resourceFileVoList.map(item => {
return {
name: item.fileName,
filePath: item.filePath,
lsFilePath: item.lsFilePath,
fileType: item.fileType
};
});
}
},
}
</script>
<style scoped lang="scss">
.basic-info-title {
display: flex;
align-items: center;
margin: 10px 0;
span {
margin: 0 5px;
font-size: 20px;
}
}
.form-item {
width: 100%;
}
</style>

View File

@ -33,10 +33,10 @@ export const formLabel = [
]
export const columnsList = [
{ t_props: 'userName', t_label: '方案名称' },
{ t_props: 'nickName', t_label: '建设性质' },
{ t_props: 'phonenumberDes', t_label: '结构形式' },
{ t_props: 'phonenumberDes', t_label: '基础形式' },
{ t_props: 'phonenumberDes', t_label: '文件状态' },
{ t_slot: 'deptName', t_label: '创建时间' },
{ t_props: 'technicalName',t_width: 350, t_label: '方案名称' },
{ t_props: 'natureConstruction', t_label: '建设性质' },
{ t_props: 'structuralForm', t_label: '结构形式' },
{ t_props: 'basicForm', t_label: '基础形式' },
{ t_slot: 'technicalSolutionState', t_label: '文件状态' },
{ t_props: 'createTime',t_width: 180, t_label: '创建时间' },
]

View File

@ -8,12 +8,12 @@
</div>
<div class="layout-container">
<el-row :gutter="18">
<el-col :span="5" class="left-col">
<el-col :span="4" class="left-col">
<LeftType :value="activeCategory" @change="handleCategoryChange" @add-category="handleAddCategory"
@category-command="handleCategoryCommand" :enterpriseId="enterpriseId" />
</el-col>
<el-col :span="19" class="right-col">
<RightTable :category-id="activeCategory" @add-scheme="handleAddScheme" @view="handleView"
<el-col :span="20" class="right-col">
<RightTable :value="activeCategory" @add-scheme="handleAddScheme" @view="handleView"
@edit="handleEdit" @delete="handleDelete" :enterpriseId="enterpriseId" />
</el-col>
</el-row>
@ -34,7 +34,7 @@ export default {
},
data() {
return {
activeCategory: 'dev',
activeCategory: null,
enterpriseId: decryptWithSM4(this.$route.query.enterpriseId),
}
},
@ -81,6 +81,7 @@ export default {
<style scoped lang="scss">
.app-container {
width: 100%;
height: calc(100vh - 84px);
overflow: hidden;
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
@ -115,13 +116,25 @@ export default {
.layout-container {
display: flex;
height: 100%;
width: 100%;
justify-content: space-around;
}
.left-col {
height: calc(100vh - 120px);
padding-left: 0 !important;
}
.right-col {
height: calc(100vh - 120px);
padding-right: 0 !important;
}
.el-row {
width: 100%;
height: 100%;
}
.el-col {
height: 100%;
}
</style>