Commit 4e25153b by zhaopanyu

zpy

parent e88bde77
......@@ -413,4 +413,63 @@ export default {
background-color: #e6e6e6;
border-color: #adadad;
}
/* 放大缩小按钮组样式 */
.toolbar-controls .el-button-group {
border: none;
background: transparent;
box-shadow: none;
}
.toolbar-controls .el-button-group .el-button {
width: 40px;
height: 40px;
padding: 0;
border: none;
border-radius: 10px;
background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08),
inset 0 1px 0 rgba(255, 255, 255, 0.8);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
overflow: hidden;
margin: 0 3px;
}
.toolbar-controls .el-button-group .el-button [class^="el-icon-"] {
font-size: 16px;
margin: 0;
transition: all 0.3s ease;
}
/* 放大按钮 - 蓝色系 */
.toolbar-controls .el-button-group .el-button .el-icon-zoom-in {
color: #409EFF;
}
.toolbar-controls .el-button-group .el-button:hover {
transform: translateY(-1px);
}
.toolbar-controls .el-button-group .el-button:hover .el-icon-zoom-in {
color: #fff;
transform: scale(1.1);
}
/* 缩小按钮 - 红色系 */
.toolbar-controls .el-button-group .el-button .el-icon-zoom-out {
color: #ff4757;
}
.toolbar-controls .el-button-group .el-button:hover .el-icon-zoom-out {
color: #fff;
transform: scale(1.1);
}
/* 通用悬停效果 */
.toolbar-controls .el-button-group .el-button:active {
transform: translateY(0);
box-shadow: 0 2px 6px rgba(64, 158, 255, 0.25);
}
</style>
\ No newline at end of file
<template>
<el-button
:icon="icon"
:plain="plain"
:loading="loading"
:title="title"
@click="handleClick"
>
<el-button :icon="icon" :plain="plain" :loading="loading" :title="title" @click="handleClick">
<slot></slot>
</el-button>
</template>
......@@ -40,4 +34,41 @@ export default {
</script>
<style scoped>
</style>
\ No newline at end of file
.el-button {
width: 40px;
height: 40px;
padding: 0;
border: none;
border-radius: 10px;
background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08),
inset 0 1px 0 rgba(255, 255, 255, 0.8);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
overflow: hidden;
}
.el-button [class^="el-icon-"] {
font-size: 16px;
margin: 0;
color: #28a745;
transition: all 0.3s ease;
}
.el-button:hover {
background: linear-gradient(145deg, #28a745 0%, #34ce57 100%);
box-shadow: 0 4px 12px rgba(40, 167, 69, 0.25),
0 2px 4px rgba(0, 0, 0, 0.1);
transform: translateY(-1px);
}
.el-button:hover [class^="el-icon-"] {
color: #fff;
transform: scale(1.1);
}
.el-button:active {
transform: translateY(0);
box-shadow: 0 2px 6px rgba(40, 167, 69, 0.25);
}
</style>
\ No newline at end of file
......@@ -26,7 +26,7 @@ export default {
height: { type: Number, default: 0 },
idOverride: { type: [String, Number], default: null }
},
data () {
data() {
return {
chart: null,
resizeObserver: null,
......@@ -46,7 +46,7 @@ export default {
points: []
}
},
mounted () {
mounted() {
// 仅使用延迟初始化,确保容器有尺寸后再 init
this.deferInit()
window.addEventListener('resize', this.resizeChart)
......@@ -69,16 +69,18 @@ export default {
})
}
},
created () {
created() {
// 尽早触发接口调用,进入页面即发起请求
this.loadDht()
},
activated () {
activated() {
// 当页面被 keep-alive 缓存后再次进入时,确保尺寸和图表刷新
this.deferInit()
this.resizeChart()
// 强制重新加载数据,确保路由参数变化时数据能更新
this.loadDht(true)
},
beforeDestroy () {
beforeDestroy() {
window.removeEventListener('resize', this.resizeChart)
if (this.chart) {
this.chart.dispose()
......@@ -89,9 +91,19 @@ export default {
this.resizeObserver = null
}
},
watch: {
// 监听idOverride变化,当路由参数变化时重新加载数据
idOverride(newId, oldId) {
if (newId !== oldId && newId) {
console.log('[ysgc] idOverride变化,重新加载数据:', newId);
this.dhtResult = null; // 清除缓存
this.loadDht(true);
}
}
},
methods: {
// 等待容器有有效尺寸再初始化,避免 echarts 容器宽高为 0 报错
deferInit () {
deferInit() {
const tryInit = () => {
const el = this.$refs.chartRef
if (!el) return
......@@ -135,10 +147,10 @@ export default {
}
this.$nextTick(tryInit)
},
resizeChart () {
resizeChart() {
if (this.chart) this.chart.resize()
},
initChart () {
initChart() {
const el = this.$refs.chartRef
if (!el) return
if (this.chart) {
......@@ -161,7 +173,7 @@ export default {
}
},
// 数据变化后自动刷新(确保缩略图及时绘制)
_requestRender () {
_requestRender() {
if (!this.chart) return
this.$nextTick(() => {
this.renderChart()
......@@ -174,8 +186,8 @@ export default {
})
},
// 调用地层/断层图接口(示例),优先从路由参数获取 id
loadDht () {
if (this.loadingDht || this.dhtResult) return
loadDht(forceReload = false) {
if (this.loadingDht || (this.dhtResult && !forceReload)) return
try {
const route = this.$route || {}
const params = route.params || {}
......@@ -202,7 +214,7 @@ export default {
}
},
// 将接口返回的数据应用到图表状态
applyDhtResult () {
applyDhtResult() {
const data = this.dhtResult || {}
// 边界
this.xMin = data.xmin != null ? Number(data.xmin) : this.xMin
......@@ -248,7 +260,7 @@ export default {
} catch (e) { }
},
// 生成图表配置
buildOption () {
buildOption() {
// 若未提供边界,则根据数据自动估算
const allXs = []
const allYs = []
......@@ -322,7 +334,7 @@ export default {
}
},
// 渲染或更新图表
renderChart () {
renderChart() {
if (!this.chart) return
const option = this.buildOption()
this.chart.setOption(option, true)
......@@ -330,7 +342,7 @@ export default {
this.bindChartEvents()
},
// 绑定点击/双击事件,把被点击的绿色线条映射为 segy 下标并上报
bindChartEvents () {
bindChartEvents() {
if (!this.chart) return
// 解除旧绑定避免重复
this.chart.off('click')
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -116,9 +116,13 @@
<el-button size="mini" type="text" icon="el-icon-location"
@click="handleYsgcInfo(scope.row)">导航图</el-button>
</template>
<!-- 待验收状态:显示查看、井信息、segy信息和撤回按钮 -->
<!-- 待验收状态:显示查看、修改、删除、井信息、segy信息和撤回按钮 -->
<template v-else-if="scope.row.xmzt === '待验收'">
<el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)">查看</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ysqqXmxx:ysqqXmxx:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ysqqXmxx:ysqqXmxx:remove']">删除</el-button>
<el-button size="mini" type="text" icon="el-icon-odometer" @click="handleJxxInfo(scope.row)">井信息</el-button>
<el-button size="mini" type="text" icon="el-icon-files"
@click="handleSegyInfo(scope.row)">segy信息</el-button>
......
......@@ -46,12 +46,14 @@
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button v-if="projectStatus === '未提交'" type="primary" plain icon="el-icon-plus" size="mini"
@click="handleAdd" v-hasPermi="['ysqqXmxxJxx:jxx:add']">新增</el-button>
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single || projectStatus !== '未提交'"
@click="handleUpdate" v-hasPermi="['ysqqXmxxJxx:jxx:edit']">修改</el-button>
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple || projectStatus !== '未提交'"
@click="handleDelete" v-hasPermi="['ysqqXmxxJxx:jxx:remove']">删除</el-button>
<el-button v-if="projectStatus === '未提交' || projectStatus === '待验收'" type="primary" plain icon="el-icon-plus"
size="mini" @click="handleAdd" v-hasPermi="['ysqqXmxxJxx:jxx:add']">新增</el-button>
<el-button type="success" plain icon="el-icon-edit" size="mini"
:disabled="single || (projectStatus !== '未提交' && projectStatus !== '待验收')" @click="handleUpdate"
v-hasPermi="['ysqqXmxxJxx:jxx:edit']">修改</el-button>
<el-button type="danger" plain icon="el-icon-delete" size="mini"
:disabled="multiple || (projectStatus !== '未提交' && projectStatus !== '待验收')" @click="handleDelete"
v-hasPermi="['ysqqXmxxJxx:jxx:remove']">删除</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['ysqqXmxxJxx:jxx:export']">导出</el-button>
</el-form-item>
......@@ -87,14 +89,14 @@
<el-table-column label="备用3" align="center" prop="ext3" /> -->
<el-table-column label="操作" min-width="100" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!-- 未提交状态:显示修改和删除按钮 -->
<template v-if="projectStatus === '未提交'">
<!-- 未提交和待验收状态:显示修改和删除按钮 -->
<template v-if="projectStatus === '未提交' || projectStatus === '待验收'">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ysqqXmxxJxx:jxx:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ysqqXmxxJxx:jxx:remove']">删除</el-button>
</template>
<!-- 其他状态(待验收、已验收、已归档):只显示查看按钮 -->
<!-- 其他状态(已验收、已归档):只显示查看按钮 -->
<template v-else>
<el-button size="mini" type="text" icon="el-icon-view" @click="handleUpdate(scope.row)">查看</el-button>
</template>
......@@ -270,7 +272,7 @@ export default {
this.form = response.data
this.open = true
// 根据项目状态决定是查看还是修改
if (this.projectStatus === '未提交') {
if (this.projectStatus === '未提交' || this.projectStatus === '待验收') {
this.title = "修改验收前期-项目信息-井信息"
this.isReadOnly = false
} else {
......
......@@ -59,12 +59,14 @@
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button v-if="projectStatus === '未提交'" type="primary" plain icon="el-icon-plus" size="mini"
@click="handleAdd" v-hasPermi="['ysqqXmxxSegy:segy:add']">新增</el-button>
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single || projectStatus !== '未提交'"
@click="handleUpdate" v-hasPermi="['ysqqXmxxSegy:segy:edit']">修改</el-button>
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple || projectStatus !== '未提交'"
@click="handleDelete" v-hasPermi="['ysqqXmxxSegy:segy:remove']">删除</el-button>
<el-button v-if="projectStatus === '未提交' || projectStatus === '待验收'" type="primary" plain icon="el-icon-plus"
size="mini" @click="handleAdd" v-hasPermi="['ysqqXmxxSegy:segy:add']">新增</el-button>
<el-button type="success" plain icon="el-icon-edit" size="mini"
:disabled="single || (projectStatus !== '未提交' && projectStatus !== '待验收')" @click="handleUpdate"
v-hasPermi="['ysqqXmxxSegy:segy:edit']">修改</el-button>
<el-button type="danger" plain icon="el-icon-delete" size="mini"
:disabled="multiple || (projectStatus !== '未提交' && projectStatus !== '待验收')" @click="handleDelete"
v-hasPermi="['ysqqXmxxSegy:segy:remove']">删除</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['ysqqXmxxSegy:segy:export']">导出</el-button>
</el-form-item>
......@@ -101,14 +103,14 @@
<el-table-column label="备用3" align="center" prop="ext3" /> -->
<el-table-column label="操作" min-width="100" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!-- 未提交状态:显示修改和删除按钮 -->
<template v-if="projectStatus === '未提交'">
<!-- 未提交和待验收状态:显示修改和删除按钮 -->
<template v-if="projectStatus === '未提交' || projectStatus === '待验收'">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ysqqXmxxSegy:segy:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ysqqXmxxSegy:segy:remove']">删除</el-button>
</template>
<!-- 其他状态(待验收、已验收、已归档):只显示查看按钮 -->
<!-- 其他状态(已验收、已归档):只显示查看按钮 -->
<template v-else>
<el-button size="mini" type="text" icon="el-icon-view" @click="handleUpdate(scope.row)">查看</el-button>
</template>
......@@ -343,7 +345,7 @@ export default {
this.open = true
// 根据项目状态决定是查看还是修改
if (this.projectStatus === '未提交') {
if (this.projectStatus === '未提交' || this.projectStatus === '待验收') {
this.title = "修改segy信息"
this.isReadOnly = false
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment