2025-11-03 15:36:35 +08:00
|
|
|
<template>
|
|
|
|
|
<!-- 招标解析 -->
|
|
|
|
|
<el-card class="analysis-container">
|
|
|
|
|
<div class="table-container">
|
2025-11-10 09:46:22 +08:00
|
|
|
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="false" ref="analysisTableRef"
|
|
|
|
|
:columnsList="columnsList" :request-api="listAPI" :sendParams="sendParams" :handleColWidth="250">
|
2025-11-03 15:36:35 +08:00
|
|
|
<template slot="tableTitle">
|
|
|
|
|
<h3>数据列表</h3>
|
|
|
|
|
</template>
|
|
|
|
|
<template slot="tableActions">
|
2025-11-03 15:43:46 +08:00
|
|
|
<el-button @click="handleAdd" v-hasPermi="['analysis:analysis:add']" class="add-btn"><i
|
|
|
|
|
class="el-icon-plus"></i> 新建项目</el-button>
|
2025-11-10 09:46:22 +08:00
|
|
|
<el-button @click="handleOnlyOffice">预览文档</el-button>
|
2025-11-03 15:36:35 +08:00
|
|
|
</template>
|
|
|
|
|
<template slot="handle" slot-scope="{ data }">
|
2025-11-05 13:17:30 +08:00
|
|
|
<el-button type="text" v-hasPermi="['enterpriseLibrary:analysis:detail']" class="action-btn"
|
2025-11-03 15:36:35 +08:00
|
|
|
@click="handleDetail(data)">
|
|
|
|
|
查看
|
|
|
|
|
</el-button>
|
2025-11-05 16:42:09 +08:00
|
|
|
<el-button type="text" v-hasPermi="['enterpriseLibrary:analysis:detail']" class="action-btn"
|
|
|
|
|
@click="handleBidDetail(data)">
|
2025-11-05 13:17:30 +08:00
|
|
|
标段解析
|
|
|
|
|
</el-button>
|
2025-11-05 17:18:34 +08:00
|
|
|
<el-button type="text" v-hasPermi="['enterpriseLibrary:analysis:detail']" class="action-btn"
|
2025-11-05 18:00:34 +08:00
|
|
|
@click="handleBidListDetail(data)">
|
2025-11-05 13:17:30 +08:00
|
|
|
查看标段
|
2025-11-03 15:36:35 +08:00
|
|
|
</el-button>
|
|
|
|
|
<el-button type="text" v-hasPermi="['enterpriseLibrary:tool:del']" class="action-btn"
|
2025-11-10 09:46:22 +08:00
|
|
|
style="color: #db3e29" @click="handleDelete(data)">
|
2025-11-03 15:36:35 +08:00
|
|
|
删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</TableModel>
|
|
|
|
|
</div>
|
2025-11-10 09:46:22 +08:00
|
|
|
<!-- <el-dialog :visible.sync="showViewer" width="80%" append-to-body title="预览">
|
|
|
|
|
<OnlyOfficeViewer :document-url="documentUrl" :document-title="documentTitle" :document-key="documentKey"
|
|
|
|
|
:mode="mode" :type="type" @document-ready="handleDocumentReady" @app-ready="handleAppReady" @error="handleError"
|
|
|
|
|
@initialized="handleInitialized" />
|
|
|
|
|
</el-dialog> -->
|
2025-11-05 09:47:20 +08:00
|
|
|
<!-- 新建项目 -->
|
2025-11-05 13:17:30 +08:00
|
|
|
<AnalysisForm v-if="showAnalysisForm" :title="title" :row="row" @closeDialog="showAnalysisForm = false"
|
|
|
|
|
:width="600" />
|
2025-11-03 15:36:35 +08:00
|
|
|
</el-card>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import TableModel from '@/components/TableModel2'
|
|
|
|
|
import { columnsList, formLabel } from './config'
|
2025-11-05 13:17:30 +08:00
|
|
|
import { encryptWithSM4 } from '@/utils/sm'
|
2025-11-03 15:36:35 +08:00
|
|
|
import { listAPI, delDataAPI } from '@/api/analysis/analysis'
|
2025-11-04 13:22:28 +08:00
|
|
|
import OnlyOfficeViewer from '@/views/common/OnlyOfficeViewer.vue'
|
2025-11-05 09:47:20 +08:00
|
|
|
import AnalysisForm from './components/AnalysisForm.vue'
|
2025-11-03 15:36:35 +08:00
|
|
|
export default {
|
2025-11-05 17:18:34 +08:00
|
|
|
name: 'Analysis',
|
2025-11-03 15:36:35 +08:00
|
|
|
components: {
|
|
|
|
|
TableModel,
|
2025-11-04 13:22:28 +08:00
|
|
|
OnlyOfficeViewer,
|
2025-11-10 09:46:22 +08:00
|
|
|
AnalysisForm,
|
2025-11-03 15:36:35 +08:00
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
formLabel,
|
|
|
|
|
columnsList,
|
|
|
|
|
listAPI,
|
2025-11-05 13:17:30 +08:00
|
|
|
sendParams: {
|
2025-11-10 09:46:22 +08:00
|
|
|
enterpriseId: 2,
|
2025-11-05 13:17:30 +08:00
|
|
|
},
|
2025-11-04 13:22:28 +08:00
|
|
|
showViewer: false,
|
2025-11-10 09:46:22 +08:00
|
|
|
documentUrl: 'http://192.168.0.14:9090/smart-bid/technicalSolutionDatabase/2025/11/03/716d9f3d89434c56bc49296dbbccc226.docx',
|
|
|
|
|
documentTitle: '716d9f3d89434c56bc49296dbbccc226.docx',
|
|
|
|
|
documentKey: '716d9f3d89434c56bc49296dbbccc226',
|
|
|
|
|
mode: 'edit',
|
|
|
|
|
type: 'desktop', // desktop, mobile embedded
|
2025-11-05 09:47:20 +08:00
|
|
|
showAnalysisForm: false,
|
|
|
|
|
title: '',
|
|
|
|
|
row: {},
|
2025-11-05 16:42:09 +08:00
|
|
|
selectedRow: null, // 单选框选中的行数据
|
2025-11-03 15:36:35 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2025-11-10 09:46:22 +08:00
|
|
|
created() { },
|
2025-11-03 15:36:35 +08:00
|
|
|
|
|
|
|
|
methods: {
|
2025-11-10 09:46:22 +08:00
|
|
|
handleDocumentReady() {
|
|
|
|
|
console.log('文档已准备就绪');
|
|
|
|
|
},
|
|
|
|
|
handleAppReady() {
|
|
|
|
|
console.log('应用已准备就绪');
|
2025-11-04 13:22:28 +08:00
|
|
|
},
|
2025-11-10 09:46:22 +08:00
|
|
|
handleError(error) {
|
|
|
|
|
console.error('发生错误:', error);
|
|
|
|
|
this.$message.error('文档加载失败');
|
2025-11-04 13:22:28 +08:00
|
|
|
},
|
2025-11-10 09:46:22 +08:00
|
|
|
handleInitialized(editor) {
|
|
|
|
|
console.log('编辑器已初始化', editor);
|
|
|
|
|
},
|
|
|
|
|
handleOnlyOffice() {
|
|
|
|
|
this.$router.push({
|
|
|
|
|
name: 'TestOnlyOffice',
|
|
|
|
|
})
|
2025-11-03 15:36:35 +08:00
|
|
|
},
|
2025-11-10 09:46:22 +08:00
|
|
|
|
2025-11-03 15:36:35 +08:00
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
handleAdd() {
|
2025-11-10 09:46:22 +08:00
|
|
|
this.title = '新建项目'
|
|
|
|
|
this.showAnalysisForm = true
|
2025-11-03 15:36:35 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 修改操作 */
|
|
|
|
|
handleUpdate(row) {
|
2025-11-10 09:46:22 +08:00
|
|
|
this.title = '修改项目'
|
|
|
|
|
this.isAdd = 'edit'
|
|
|
|
|
this.row = row
|
|
|
|
|
this.isflag = true
|
2025-11-03 15:36:35 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/* 查看操作 */
|
|
|
|
|
handleDetail(row) {
|
2025-11-05 13:17:30 +08:00
|
|
|
this.$router.push({
|
|
|
|
|
name: 'AnalysisDetail',
|
|
|
|
|
query: {
|
2025-11-10 09:46:22 +08:00
|
|
|
proId: encryptWithSM4('2'),
|
|
|
|
|
},
|
2025-11-05 13:17:30 +08:00
|
|
|
})
|
2025-11-03 15:36:35 +08:00
|
|
|
},
|
2025-11-05 16:42:09 +08:00
|
|
|
/** 标段解析操作 */
|
|
|
|
|
handleBidDetail(row) {
|
|
|
|
|
this.$router.push({
|
2025-11-05 18:00:34 +08:00
|
|
|
name: 'AnalysisBidDetail',
|
2025-11-05 17:18:34 +08:00
|
|
|
query: {
|
2025-11-10 09:46:22 +08:00
|
|
|
proId: encryptWithSM4('2'),
|
|
|
|
|
},
|
2025-11-05 17:18:34 +08:00
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
/** 查看标段操作 */
|
2025-11-05 18:00:34 +08:00
|
|
|
handleBidListDetail(row) {
|
2025-11-05 17:18:34 +08:00
|
|
|
this.$router.push({
|
|
|
|
|
name: 'AnalysisBidIndex',
|
2025-11-05 16:42:09 +08:00
|
|
|
query: {
|
2025-11-10 09:46:22 +08:00
|
|
|
proId: encryptWithSM4('2'),
|
|
|
|
|
},
|
2025-11-05 16:42:09 +08:00
|
|
|
})
|
|
|
|
|
},
|
2025-11-04 13:22:28 +08:00
|
|
|
|
2025-11-03 15:36:35 +08:00
|
|
|
/* 搜索操作 */
|
|
|
|
|
handleQuery() {
|
|
|
|
|
this.$refs.analysisTableRef.getTableList()
|
|
|
|
|
},
|
2025-11-10 09:46:22 +08:00
|
|
|
|
2025-11-03 15:36:35 +08:00
|
|
|
/** 删除操作 */
|
|
|
|
|
handleDelete(row) {
|
2025-11-10 09:46:22 +08:00
|
|
|
this.$confirm(
|
|
|
|
|
`确定要删除"${row.toolName}"吗?删除后将无法恢复!`,
|
|
|
|
|
'操作提示',
|
|
|
|
|
{
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning',
|
|
|
|
|
dangerouslyUseHTMLString: true,
|
|
|
|
|
customClass: 'delete-confirm-dialog',
|
|
|
|
|
},
|
|
|
|
|
).then(() => {
|
|
|
|
|
delDataAPI({
|
|
|
|
|
toolId: row.toolId,
|
|
|
|
|
enterpriseId: this.enterpriseId,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
this.$message.success('删除成功')
|
|
|
|
|
this.handleQuery()
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.msg || '删除失败')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((error) => {
|
|
|
|
|
console.error('删除失败:', error)
|
|
|
|
|
})
|
2025-11-03 15:36:35 +08:00
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.analysis-container {
|
|
|
|
|
height: calc(100vh - 84px);
|
|
|
|
|
overflow: hidden;
|
2025-11-10 09:46:22 +08:00
|
|
|
background: linear-gradient(180deg, #f1f6ff 20%, #e5efff 100%);
|
2025-11-03 15:36:35 +08:00
|
|
|
}
|
|
|
|
|
|
2025-11-04 13:22:28 +08:00
|
|
|
::v-deep .table-card {
|
2025-11-03 15:36:35 +08:00
|
|
|
height: calc(100vh - 230px) !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.add-btn {
|
|
|
|
|
width: 121px;
|
|
|
|
|
height: 36px;
|
2025-11-10 09:46:22 +08:00
|
|
|
background: #1f72ea;
|
2025-11-03 15:36:35 +08:00
|
|
|
box-shadow: 0px 4px 8px 0px rgba(51, 135, 255, 0.5);
|
|
|
|
|
border-radius: 4px 4px 4px 4px;
|
|
|
|
|
color: #fff;
|
|
|
|
|
border: none;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
transition: all 0.3s;
|
|
|
|
|
|
|
|
|
|
&:hover {
|
2025-11-10 09:46:22 +08:00
|
|
|
background: #4a8bff;
|
2025-11-03 15:36:35 +08:00
|
|
|
box-shadow: 0px 6px 12px 0px rgba(51, 135, 255, 0.6);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.action-btn {
|
|
|
|
|
margin-right: 8px;
|
|
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
|
margin-right: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|