10.10基坑后台管理开发

dev_xd
lj7788@126.com 2025-10-10 15:31:18 +08:00
parent d5139d5db5
commit 71baa4f1ae
15 changed files with 427 additions and 682 deletions

View File

@ -50,6 +50,19 @@ public class ProProjectInfoSetting extends BaseEntity
@Excel(name = "删除标识")
private Long isDel;
/** 项目基坑平面图 */
@Excel(name = "项目基坑平面图")
private String pitImgUrl;
public void setPitImgUrl(String pitImgUrl)
{
this.pitImgUrl = pitImgUrl;
}
public String getPitImgUrl()
{
return pitImgUrl;
}
public void setId(Long id)
{
this.id = id;

View File

@ -78,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="orgImage" column="ps_org_image" />
<result property="orgVideo" column="ps_org_video" />
<result property="orgPlane" column="ps_org_plane" />
<result property="pitImgUrl" column="ps_pit_img_url" />
</resultMap>
<sql id="selectProProjectInfoVo">
@ -125,7 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
pi.floor_area, pi.total_output_value, pi.planned_completion_time, pi.scheduled_start_time, pi.actual_operating_time, pi.actual_completion_time,
pi.contract_amount, pi.paid_amount, pi.on_account_amount, pi.project_schedule, pi.project_summarize, pi.project_qr_code, pi.project_status,
pi.project_sort, pi.is_del, pi.create_by, pi.create_time, pi.update_by, pi.update_time, pi.remark,
pd.id pd_id,pd.dept_type pd_type,pd.dept_name pd_name,pd.dept_code pd_code,pd.leader pd_leader,pd.phone pd_phone,pi.bim_config,
pd.id pd_id,pd.dept_type pd_type,pd.dept_name pd_name,pd.dept_code pd_code,pd.leader pd_leader,pd.phone pd_phone,pi.bim_config,ps.pit_img_url ps_pit_img_url,
ps.id ps_id,ps.org_name ps_org_name,ps.org_logo ps_org_logo,ps.org_image ps_org_image,ps.org_video ps_org_video,ps.org_plane ps_org_plane,ac.vendors_code
from pro_project_info pi
left join sys_dept sd on sd.dept_id = pi.com_id

View File

@ -18,11 +18,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="pitImgUrl" column="pit_img_url" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectProProjectInfoSettingVo">
select ps.id, ps.project_id, pi.project_name, ps.org_name, ps.org_logo, ps.org_image, ps.org_video, ps.org_plane, ps.is_del, ps.create_by, ps.create_time, ps.update_by, ps.update_time, ps.remark from pro_project_info_setting ps
select ps.id, ps.project_id, pi.project_name, ps.org_name, ps.org_logo,ps.pit_img_url, ps.org_image, ps.org_video, ps.org_plane, ps.is_del, ps.create_by, ps.create_time, ps.update_by, ps.update_time, ps.remark from pro_project_info_setting ps
left join pro_project_info pi on pi.id = ps.project_id
left join sys_dept sd on sd.dept_id = pi.com_id
</sql>
@ -57,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="pitImgUrl != null">pit_img_url,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@ -71,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="pitImgUrl != null">#{pitImgUrl},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
@ -89,6 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="pitImgUrl != null">pit_img_url = #{pitImgUrl},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}

View File

@ -0,0 +1,12 @@
{
"singleQuote": true,
"semi": false,
"tabWidth": 2,
"printWidth": 400,
"trailingComma": "none",
"bracketSpacing": true,
"arrowParens": "avoid",
"htmlWhitespaceSensitivity": "ignore",
"vueIndentScriptAndStyle": false,
"endOfLine": "lf"
}

View File

@ -1,3 +1,6 @@
2025.10.10
pro_project_info_setting 表增加字段 pit_img_url varchar(512) 项目基坑平面图
2025.9.16
1.增加表pro_user_inout_record 员工出入场记录

View File

@ -0,0 +1,65 @@
/**
* 拖拽移动指令 - Vue3 版本
* 使用方法: v-move
* 功能: 使元素可以通过鼠标拖拽移动
*/
export default {
mounted(el, binding, vnode) {
let dragging = false;
let startX, startY, deltaX, deltaY;
// 设置初始样式
el.style.position = 'absolute';
el.style.cursor = 'pointer';
// 鼠标按下事件
const mouseDownHandler = function(e) {
dragging = true;
startX = e.clientX - parseInt(el.style.left || 0);
startY = e.clientY - parseInt(el.style.top || 0);
document.addEventListener('mousemove', mouseMoveHandler);
document.addEventListener('mouseup', mouseUpHandler);
// 阻止默认行为,避免选中文本
e.preventDefault();
};
// 鼠标移动事件
const mouseMoveHandler = function(e) {
if (dragging) {
deltaX = e.clientX - startX;
deltaY = e.clientY - startY;
el.style.left = deltaX + 'px';
el.style.top = deltaY + 'px';
}
};
// 鼠标释放事件
const mouseUpHandler = function() {
dragging = false;
document.removeEventListener('mousemove', mouseMoveHandler);
document.removeEventListener('mouseup', mouseUpHandler);
};
// 绑定事件监听器
el.addEventListener('mousedown', mouseDownHandler);
// 存储事件处理器引用,便于清理
el._moveHandlers = {
mouseDownHandler,
mouseMoveHandler,
mouseUpHandler
};
},
// 组件卸载时清理事件监听器
beforeUnmount(el) {
if (el._moveHandlers) {
el.removeEventListener('mousedown', el._moveHandlers.mouseDownHandler);
document.removeEventListener('mousemove', el._moveHandlers.mouseMoveHandler);
document.removeEventListener('mouseup', el._moveHandlers.mouseUpHandler);
delete el._moveHandlers;
}
}
};

View File

@ -2,10 +2,12 @@ import hasRole from './permission/hasRole'
import hasPermi from './permission/hasPermi'
import notHasPermi from './permission/notHasPermi'
import copyText from './common/copyText'
import move from './common/move'
export default function directive(app){
app.directive('hasRole', hasRole)
app.directive('hasPermi', hasPermi)
app.directive('notHasPermi', notHasPermi)
app.directive('copyText', copyText)
app.directive('move', move)
}

View File

@ -1,6 +1,6 @@
<template>
<div class="app-container pit-alarm-index">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="告警状态" prop="status">
<el-radio-group v-model="queryParams.status" @change="getList">
<el-radio :value="false">未处理</el-radio>
@ -19,16 +19,13 @@ item, index
<el-button type="primary" @click="handleQuery">
<el-icon style="margin-right: 5px">
<Search />
</el-icon>
</el-button>
</el-icon> </el-button>
<el-button @click="resetQuery">
<el-icon style="margin-right: 5px">
<Refresh />
</el-icon>
</el-button>
</el-icon> </el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8" v-if="1 == 2">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd"
@ -48,21 +45,16 @@ item, index
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="pitAlarmList" @selection-change="handleSelectionChange">
<el-table-column label="编号" align="center" prop="id" width="80" />
<el-table-column label="项目名称" align="center" prop="prjName" width="240" />
<!-- <el-table-column label="总包单位" align="center" prop="deptName" width="180" /> -->
<el-table-column label="告警源" align="center" prop="alarmSource">
<template v-slot="scope">
{{ scope.row.alarmSource }}-{{ scope.row.variety }}
</template>
<template v-slot="scope"> {{ scope.row.alarmSource }}-{{ scope.row.variety }} </template>
</el-table-column>
<el-table-column label="等级" align="center" prop="level" width="180">
<template v-slot="scope">
<span class="sp-data" :class="'sp-level-' + scope.row.level">{{
getLevel(scope.row.level)
}}</span>
<span class="sp-data" :class="'sp-level-' + scope.row.level">{{ getLevel(scope.row.level) }}</span>
</template>
</el-table-column>
<el-table-column label="告警信息" align="center" prop="alarmInfo" width="180" />
@ -87,13 +79,11 @@ item, index
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize" @pagination="getList" />
<alarm-detail-dlg ref="detailDlg" />
</div>
</template>
<script>
import {
listPitAlarm,

View File

@ -3,74 +3,33 @@
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="监测项" prop="meId">
<el-select v-model="queryParams.meId" placeholder="请选择监测项" clearable filterable @change="handleQuery">
<el-option v-for="item in pitEls" :key="item.id" :label="item.name" :value="item.id">
<el-option v-for="item in pitEls" :key="item.id" :label="item.name" :value="item.srvId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="测点" prop="spId">
<el-select v-model="queryParams.spId" placeholder="请选择测点" clearable filterable>
<el-option v-for="item in surveyPoints" :key="item.id" :label="item.name" :value="item.id">
<el-option v-for="item in pitSps" :key="item.id" :label="item.name" :value="item.spId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="时间范围">
<el-date-picker v-model="dateRange" value-format="yyyy-MM-dd" type="daterange" range-separator="-"
start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" @change="handleQuery">
<el-date-picker v-model="queryParams.selDate" value-format="yyyy-MM-dd" type="daterange" range-separator="-"
start-placeholder="开始日期" end-placeholder="结束日期" @change="handleQuery">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="handleQuery">
<el-icon style="margin-right: 5px">
<Search />
</el-icon>
</el-button>
</el-icon> </el-button>
<el-button size="small" @click="resetQuery">
<el-icon style="margin-right: 5px">
<Refresh />
</el-icon>
</el-button>
</el-icon> </el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" size="small" @click="handleAdd" v-hasPermi="['device:pitData:add']">
<el-icon style="margin-right: 5px">
<Plus />
</el-icon>
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" size="small" :disabled="single" @click="handleUpdate"
v-hasPermi="['device:pitData:edit']">
<el-icon style="margin-right: 5px">
<Edit />
</el-icon>
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" size="small" :disabled="multiple" @click="handleDelete"
v-hasPermi="['device:pitData:remove']">
<el-icon style="margin-right: 5px">
<Delete />
</el-icon>
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" size="small" @click="handleExport" v-hasPermi="['device:pitData:export']">
<el-icon style="margin-right: 5px">
<Download />
</el-icon>
</el-button>
</el-col>
<right-toolbar :showSearch="showSearch" @update:showSearch="showSearch = $event"
@queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="pitDataList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="编号" align="center" prop="id" />
<el-table-column label="监测项" align="center" prop="meName" />
<el-table v-loading="loading" :data="pitDataList" max-height="50vh">
<el-table-column label="测点" align="center" prop="spName" />
<el-table-column label="X方向位移(mm)" align="center" prop="displace">
<template v-slot="scope">{{ scope.row.displace.toFixed(3) }}</template>
@ -82,9 +41,7 @@
<template v-slot="scope">{{ scope.row.variation.toFixed(3) }}</template>
</el-table-column>
<el-table-column label="X方向变化速率(mm/d)" align="center" prop="changeRate">
<template v-slot="scope">{{
scope.row.changeRate.toFixed(3)
}}</template>
<template v-slot="scope">{{ scope.row.changeRate.toFixed(3) }}</template>
</el-table-column>
<el-table-column label="Y方向位移(mm)" align="center" prop="displace2">
<template v-slot="scope">{{ scope.row.displace2.toFixed(3) }}</template>
@ -93,92 +50,33 @@
<template v-slot="scope">{{ scope.row.totalize2.toFixed(3) }}</template>
</el-table-column>
<el-table-column label="Y方向单次变化量(mm)" align="center" prop="variation2">
<template v-slot="scope">{{
scope.row.variation2.toFixed(3)
}}</template>
<template v-slot="scope">{{ scope.row.variation2.toFixed(3) }}</template>
</el-table-column>
<el-table-column label="Y方向变化速率(mm/d)" align="center" prop="changeRate2">
<template v-slot="scope">{{
scope.row.changeRate2.toFixed(3)
}}</template>
<template v-slot="scope">{{ scope.row.changeRate2.toFixed(3) }}</template>
</el-table-column>
<el-table-column label="采集时间" align="center" prop="collectTime" width="180" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="small" type="primary" text @click="handleUpdate(scope.row)"
v-hasPermi="['device:pitData:edit']">
<el-icon style="margin-right: 3px">
<Edit />
</el-icon>
</el-button>
<el-button size="small" type="danger" text @click="handleDelete(scope.row)"
v-hasPermi="['device:pitData:remove']">
<el-icon style="margin-right: 3px">
<Delete />
</el-icon>
</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize" @pagination="getList" />
<!-- 添加或修改测点数据对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="监测项" prop="meId">
<el-select v-model="form.meId" placeholder="请选择监测项" clearable filterable>
<el-option v-for="item in meas" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="测点" prop="spId">
<el-select v-model="form.spId" placeholder="请选择测点" clearable filterable>
<el-option v-for="item in surveyPoints" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="X方向位移" prop="displace">
<el-input v-model="form.displace" placeholder="请输入X方向位移" />
</el-form-item>
<el-form-item label="X方向累计变化量" prop="totalize">
<el-input v-model="form.totalize" placeholder="请输入X方向累计变化量" />
</el-form-item>
<el-form-item label="X方向单次变化量" prop="variation">
<el-input v-model="form.variation" placeholder="请输入X方向单次变化量" />
</el-form-item>
<el-form-item label="X方向变化速率" prop="changeRate">
<el-input v-model="form.changeRate" placeholder="请输入X方向变化速率" />
</el-form-item>
<el-form-item label="Y方向位移" prop="displace2">
<el-input v-model="form.displace2" placeholder="请输入Y方向位移" />
</el-form-item>
<el-form-item label="Y方向累计变化量" prop="totalize2">
<el-input v-model="form.totalize2" placeholder="请输入Y方向累计变化量" />
</el-form-item>
<el-form-item label="Y方向单次变化量" prop="variation2">
<el-input v-model="form.variation2" placeholder="请输入Y方向单次变化量" />
</el-form-item>
<el-form-item label="Y方向变化速率" prop="changeRate2">
<el-input v-model="form.changeRate2" placeholder="请输入Y方向变化速率" />
</el-form-item>
<el-form-item label="采集时间" prop="collectTime">
<el-date-picker clearable v-model="form.collectTime" type="date" value-format="yyyy-MM-dd"
placeholder="选择采集时间">
</el-date-picker>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
<div v-if="chartData && queryParams.meId == 22" class="div-chart">
<el-radio-group v-model="selChart1" class="chart1-group" @change="showChartData(1)">
<el-radio :value="0" border>X方向位移(mm)</el-radio>
<el-radio :value="1" border>X方向累计变化量(mm)</el-radio>
<el-radio :value="2" border>X方向单次变化量(mm)</el-radio>
<el-radio :value="3" border>X方向变化速率(mm/d)</el-radio>
</el-radio-group>
<Chart ref="chart1" :chgOpt="opt => changeOpt(opt, 1)" :key="'c1-' + spId" />
<el-radio-group v-model="selChart2" class="chart2-group" @change="showChartData(2)">
<el-radio :value="0" border>Y方向位移(mm)</el-radio>
<el-radio :value="1" border>Y方向累计变化量(mm)</el-radio>
<el-radio :value="2" border>Y方向单次变化量(mm)</el-radio>
<el-radio :value="3" border>Y方向变化速率(mm/d)</el-radio>
</el-radio-group>
<Chart ref="chart2" :chgOpt="opt => changeOpt(opt, 2)" :key="'c2-' + spId" />
</div>
</div>
</template>
<script>
import {
listPitData,
@ -245,7 +143,7 @@ export default {
this.userStore = useUserStore();
this.queryParams.projectId = this.userStore.currentPrjId;
this.queryParams.subDeptId = this.userStore.currentComId;
this.doQuerySub();
this.init();
},
@ -444,39 +342,7 @@ export default {
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
cfgId: null,
dataType: null,
dataId: null,
spId: null,
spName: null,
collectTime: null,
changeRate: null,
changeRate2: null,
displace: null,
displace2: null,
totalize: null,
totalize2: null,
variation: null,
variation2: null,
state: null,
remark: null,
isDel: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
@ -487,72 +353,7 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加测点数据";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getPitData(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改测点数据";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updatePitData(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addPitData(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm('是否确认删除测点数据编号为"' + ids + '"的数据项?')
.then(function () {
return delPitData(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
this.download(
"device/pitData/export",
{
...this.queryParams,
},
`pitData_${new Date().getTime()}.xlsx`
);
},
},
};
</script>

View File

@ -1,52 +1,49 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="设备编号" prop="code">
<el-input v-model="queryParams.code" placeholder="请输入设备编号" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="设备名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入设备名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="handleQuery">
<el-icon style="margin-right: 5px;"><Search /></el-icon>
</el-button>
<el-icon style="margin-right: 5px;">
<Search />
</el-icon> </el-button>
<el-button size="small" @click="resetQuery">
<el-icon style="margin-right: 5px;"><Refresh /></el-icon>
</el-button>
<el-icon style="margin-right: 5px;">
<Refresh />
</el-icon> </el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="pitDeviceList">
<el-table-column label="编号" align="center" prop="id" width="100"/>
<el-table-column label="编号" align="center" prop="id" width="100" />
<el-table-column label="设备编号" align="center" prop="devCode" />
<el-table-column label="设备名称" align="center" prop="name" />
<el-table-column label="设备类型" align="center" prop="devTypeName" />
<el-table-column label="分类" align="center" width="250px">
<template v-slot="scope">
{{ scope.row.typeCategory }} {{ scope.row.typeName }}
</template>
<template v-slot="scope"> {{ scope.row.typeCategory }} {{ scope.row.typeName }} </template>
</el-table-column>
<el-table-column label="关联测点数目" align="center" prop="ptCount" />
<el-table-column label="当前电量" align="center" prop="batDl" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button type="primary" text @click="handleDetail(scope.row)">
<el-icon style="margin-right: 3px;"><InfoFilled /></el-icon>
</el-button>
<el-icon style="margin-right: 3px;">
<InfoFilled />
</el-icon> </el-button>
<el-button type="danger" text @click="handleDelete(scope.row)"
v-hasPermi="['device:pitDevice:remove']">
<el-icon style="margin-right: 3px;"><Delete /></el-icon>
</el-button>
<el-icon style="margin-right: 3px;">
<Delete />
</el-icon> </el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize" @pagination="getList" />
<deviceDetailDlg ref="detailDlg"/>
<deviceDetailDlg ref="detailDlg" />
</div>
</template>
<script>
import {
listPitDevice,
@ -118,7 +115,7 @@ export default {
this.userStore = useUserStore();
this.queryParams.projectId = this.userStore.currentPrjId;
this.queryParams.subDeptId = this.userStore.currentComId;
this.getList();
this.init();
},
@ -191,7 +188,7 @@ export default {
handleDetail(row) {
this.$refs.detailDlg.showDialog(row);
},
/** 删除按钮操作 */
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除设备管理编号为"' + ids + '"的数据项?').then(function () {

View File

@ -1,19 +1,23 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="构件名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入构件名称" clearable @keyup.enter="handleQuery" />
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="监测项" prop="srvId">
<el-select v-model="queryParams.srvId" placeholder="请选择监测项" clearable filterable>
<el-option v-for="item in pitEls" :key="item.id" :label="item.name" :value="item.srvId">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleQuery">
<el-icon style="margin-right: 5px;"><Search /></el-icon>
</el-button>
<el-icon style="margin-right: 5px;">
<Search />
</el-icon> </el-button>
<el-button @click="resetQuery">
<el-icon style="margin-right: 5px;"><Refresh /></el-icon>
</el-button>
<el-icon style="margin-right: 5px;">
<Refresh />
</el-icon> </el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="pitElementList" stripe ref="expandTable">
<el-table-column type="expand">
<template #default="props">
@ -35,17 +39,15 @@
</template>
</el-table-column>
<el-table-column label="类型" align="center" prop="type">
<template #default="scope">
<template #default="scope">
<code>{{ scope.row.type }}</code>
</template>
</el-table-column>
</el-table-column>
</el-table>
<pagination v-show="total>0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
@pagination="getList" />
</div>
</template>
<script>
import { listPitElement, getPitElement, delPitElement, addPitElement, updatePitElement } from "@/api/device/pitElement";
import { queryUnitList, findMyProjectList } from "@/api/publics";
@ -77,7 +79,8 @@ export default {
pageNum: 1,
pageSize: 10,
projectId: null,
subDeptId: null,
subDeptId: null,
srvId: null,
},
//
form: {},
@ -86,15 +89,15 @@ export default {
},
projectOptions: [],
depts: [],
userStore: null,
pitEls: [], //
userStore: null,
};
},
created() {
this.userStore = useUserStore();
this.queryParams.projectId = this.userStore.currentPrjId;
this.queryParams.subDeptId = this.userStore.currentComId;
this.getList();
this.doQuerySub();
this.init();
},
mounted() {
@ -118,37 +121,20 @@ export default {
});
},
doQuerySub() {
let prjId=this.queryParams.projectId;
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
if (tmps.length > 0 || !prjId) {
this.depts = tmps;
if (tmps.length == 1) {
this.queryParams.subDeptId = tmps[0].deptId;
} else {
this.queryParams.subDeptId = '';
}
this.getList();
//
this.$nextTick(() => {
this.expandAllRows();
});
return;
}
queryUnitList({
projectId: prjId,
unitTypes: "2".split(","),
this.pitEls = [];
this.pitSps = [];
this.queryParams.srvId = "";
this.doQueryPitEL();
},
doQueryPitEL() {
listPitElement({
pageNum: 1,
pageSize: 100,
projectId: this.queryParams.projectId
}).then((d) => {
let objs = d.rows || [];
if (!this.prjDept2) {
this.prjDept2 = {};
}
this.prjDept2[prjId] = objs;
this.depts = objs;
if (objs.length == 1) {
this.queryParams.subDeptId = objs[0].deptId;
} else {
this.queryParams.subDeptId = '';
}
this.pitEls = d.rows || [];
this.queryParams.srvId = "";
this.getList();
//
this.$nextTick(() => {
@ -169,7 +155,7 @@ export default {
this.loading = true;
listPitElement(this.queryParams).then(response => {
this.pitElementList = response.rows;
console.log("pitElementList==",response)
console.log("pitElementList==", response)
this.total = response.total;
this.loading = false;
//
@ -178,7 +164,7 @@ export default {
});
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;

View File

@ -1,27 +1,37 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="测点名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入测点名称" clearable @keyup.enter="handleQuery" />
<el-form-item label="监测项" prop="meId">
<el-select v-model="queryParams.meId" placeholder="请选择监测项" clearable filterable @change="doQueryPitSps">
<el-option v-for="item in pitEls" :key="item.id" :label="item.name" :value="item.srvId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="测点" prop="spId">
<el-select v-model="queryParams.spId" placeholder="请选择测点" clearable filterable>
<el-option v-for="item in pitSps" :key="item.id" :label="item.name" :value="item.spId">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleQuery">
<el-icon style="margin-right: 5px;"><Search /></el-icon>
</el-button>
<el-icon style="margin-right: 5px;">
<Search />
</el-icon> </el-button>
<el-button @click="resetQuery">
<el-icon style="margin-right: 5px;"><Refresh /></el-icon>
</el-button>
<el-icon style="margin-right: 5px;">
<Refresh />
</el-icon> </el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain @click="handlePosition">
<el-icon style="margin-right: 5px;"><Location /></el-icon>
</el-button>
<el-icon style="margin-right: 5px;">
<Location />
</el-icon> </el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="pitSurveyPointList">
<el-table-column label="编号" align="center" prop="spId" width="80" />
<el-table-column label="所属监测点组名称" align="center" prop="groupName" />
@ -32,16 +42,16 @@
<template #default="scope">{{ ["人工上传", "设备"][scope.row.dataSource] }}</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
@pagination="getList" />
<surveyPointPositionDrawer ref="ptDrawer" @success="handleQuery"></surveyPointPositionDrawer>
</div>
</template>
<script>
import { listPitSurveyPoint, getPitSurveyPoint, delPitSurveyPoint, addPitSurveyPoint, updatePitSurveyPoint } from "@/api/device/pitSurveyPoint";
import { Search, Refresh, Location } from '@element-plus/icons-vue';
import { getProProjectInfo } from "@/api/manage/proProjectInfo";
import { listPitElement } from "@/api/device/pitElement";
import surveyPointPositionDrawer from './surveyPointPositionDrawer.vue'
import useUserStore from "@/store/modules/user";
export default {
@ -76,28 +86,73 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
projectId: null,
projectId: null,
subDeptId: null,
name: null,
},
//
form: {},
pitEls: [], //
pitSps: [], //
//
rules: {
},
userStore: null,
userStore: null,
};
},
created() {
this.userStore = useUserStore();
this.queryParams.projectId = this.userStore.currentPrjId;
this.queryParams.subDeptId = this.userStore.currentComId;
this.getList();
this.doQuerySub();
},
methods: {
doQuerySub() {
this.pitEls = [];
this.pitSps = [];
this.queryParams.meId = "";
this.queryParams.spId = "";
this.doQueryPitEL();
},
doQueryPitEL() {
listPitElement({
pageNum: 1,
pageSize: 100,
projectId: this.queryParams.projectId
}).then((d) => {
this.pitEls = d.rows || [];
this.queryParams.meId = "";
this.doQueryPitSps();
});
},
doQueryPitSps() {
if (!this.queryParams.meId) {
this.pitSps = [];
this.queryParams.spId = "";
this.getList();
return;
}
listPitSurveyPoint({
pageNum: 1,
pageSize: 100,
meId: this.queryParams.meId,
}).then((d) => {
this.pitSps = d.rows || [];
this.queryParams.spId = "";
this.getList();
});
},
handlePosition() {
this.$refs.ptDrawer.show(this.pitSurveyPointList, this.queryParams);
getProProjectInfo(this.queryParams.projectId).then(response => {
this.prjInfo = response.data;
let pitImgUrl = this.prjInfo?.setting?.pitImgUrl || "";
if (!pitImgUrl) {
this.$message.error("请配置项目的基坑图片[项目管理->操作->修改->项目大屏设置->基坑图片管理]");
return;
}
this.$refs.ptDrawer.show(this.pitSurveyPointList, this.queryParams, pitImgUrl);
});
},
/** 查询测点管理列表 */
getList() {

View File

@ -1,113 +1,107 @@
<template>
<div class="survey-point-position-drawer" v-if="isOpen" style="padding:0px 10px">
<el-drawer v-if="isOpen" v-model="isOpen" direction="rtl" size="960px"
style="padding-left: 20px" title="项目基坑标注">
<div style="width:940px;height:560px;" class="main-div" :style="'background-image:url('+imgUrl+')'">
<span v-for="(it,idx) in pts" :key="idx" class="pt-item"
v-move
:style="'top:'+it.y+'px;left:'+it.x+'px;'">
<el-icon class="pt-icon"><Location /></el-icon>
<span class="pt-name">{{ it.name }}</span>
</span>
</div>
<div>
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-drawer>
</div>
</template>
<script>
import {updatePitSurveyPoint } from "@/api/device/pitSurveyPoint";
<el-drawer v-if="isOpen" v-model="isOpen" direction="rtl" size="960px"
style="padding-left: 20px" title="项目基坑标注">
<div style="width:940px;height:560px;" class="main-div" :style="'background-image:url(' + imgUrl + ')'">
<span v-for="(it, idx) in pts" :key="idx" class="pt-item"
v-move
:style="'top:' + it.y + 'px;left:' + it.x + 'px;'">
<el-icon class="pt-icon">
<Location />
</el-icon>
<span class="pt-name">{{ it.name }}</span>
</span>
</div>
<div>
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-drawer>
</div>
</template>
<script>
import { updatePitSurveyPoint } from "@/api/device/pitSurveyPoint";
import axios from 'axios'
export default {
export default {
name: 'RuoyiUiPitImageDrawer',
data() {
return {
isOpen:false,
pts:null,
query:null,
imgUrl:'',
dragging:false,
dragItem:null,
};
},
mounted() {
},
methods: {
submitForm(){
let pts=this.$el.querySelectorAll(".pt-item");
let ajaxs=[];
for(let i=0;i<pts.length;i++){
let pt=pts[i];
let top=pt.style.top.replace("px","");
let left=pt.style.left.replace("px","");
let obj={
x:left,y:top
}
this.pts[i].position=JSON.stringify(obj);
ajaxs.push(updatePitSurveyPoint({id:this.pts[i].id,position:this.pts[i].position}))
}
if(ajaxs.length>0){
axios.all(ajaxs).then(res=>{
if(res[0].code==200){
this.$modal.msgSuccess("修改成功!");
this.$emit("success")
}else{
this.$modal.msgError("修改失败!");
return {
isOpen: false,
pts: null,
query: null,
imgUrl: '',
dragging: false,
dragItem: null,
};
},
mounted() {
},
methods: {
submitForm() {
let pts = this.$el.querySelectorAll(".pt-item");
let ajaxs = [];
for (let i = 0; i < pts.length; i++) {
let pt = pts[i];
let top = pt.style.top.replace("px", "");
let left = pt.style.left.replace("px", "");
let obj = {
x: left, y: top
}
this.isOpen=false;
this.pts[i].position = JSON.stringify(obj);
ajaxs.push(updatePitSurveyPoint({ id: this.pts[i].id, position: this.pts[i].position }))
}
if (ajaxs.length > 0) {
axios.all(ajaxs).then(res => {
if (res[0].code == 200) {
this.$modal.msgSuccess("修改成功!");
this.$emit("success")
} else {
this.$modal.msgError("修改失败!");
}
this.isOpen = false;
});
} else {
this.isOpen = false;
}
},
cancel() {
this.isOpen = false;
},
show(pts, query, url) {
this.pts = (pts || []).map(it => {
let pt = this.$tryToJson(it.position, { x: 0, y: 0 });
it.x = pt.x || 0;
it.y = pt.y || 0;
return it;
});
}else{
this.isOpen=false;
this.query = query;
this.isOpen = true;
this.imgUrl = import.meta.env.VITE_APP_BASE_API + url;
}
},
cancel(){
this.isOpen=false;
},
show(pts,query) {
this.pts = (pts||[]).map(it=>{
let pt=this.$tryToJson(it.position,{x:0,y:0});
it.x=pt.x||0;
it.y=pt.y||0;
return it;
});
this.query=query;
this.isOpen = true;
this.loadPitImage();
},
loadPitImage(){
getSurProject(this.query.projectId).then(d=>{
let url=d.data?.prjPlanUrl||"";
if(!url){
this.$modal.msgError("请配置项目的基坑图片[项目管理->更多操作->基坑图片管理]")
}else{
this.imgUrl=process.env.VUE_APP_BASE_API+url;
}
});
}
},
};
</script>
<style lang="scss">
.survey-point-position-drawer{
.el-drawer__body{
padding:0px 10px;
.main-div{
};
</script>
<style lang="scss">
.survey-point-position-drawer {
.el-drawer__body {
padding: 0px 10px;
.main-div {
margin-bottom: 20px;
position: relative;
background-position: center;
background-repeat: no-repeat;
background-size: contain;
.pt-item{
.pt-item {
position: absolute;
cursor: pointer;
.pt-icon{
color:#2962FF;
.pt-icon {
color: #2962FF;
display: block;
text-align: center;
font-size: 24px;
@ -115,7 +109,8 @@ import axios from 'axios'
width: 24px;
height: 24px;
}
.pt-name{
.pt-name {
display: block;
color: #2962FF;
text-align: center;
@ -123,7 +118,7 @@ import axios from 'axios'
text-shadow: 1px 1px 0px #F3E5F5;
}
}
}
}
}
</style>
}
}
}
</style>

View File

@ -1,119 +1,45 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="监测项" prop="meId">
<el-select v-model="queryParams.meId" placeholder="请选择监测项" clearable filterable @change="handleQuery">
<el-option v-for="item in meas" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="测点" prop="spId">
<el-select v-model="queryParams.spId" placeholder="请选择测点" clearable filterable>
<el-option v-for="item in surveyPoints" :key="item.id" :label="item.name" :value="item.id">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="监测项" prop="monitorElementId">
<el-select v-model="queryParams.monitorElementId" placeholder="请选择监测项" clearable filterable>
<el-option v-for="item in pitEls" :key="item.id" :label="item.name" :value="item.srvId">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="handleQuery">
<el-icon style="margin-right: 5px;"><Search /></el-icon>
</el-button>
<el-icon style="margin-right: 5px;">
<Search />
</el-icon> </el-button>
<el-button size="small" @click="resetQuery">
<el-icon style="margin-right: 5px;"><Refresh /></el-icon>
</el-button>
<el-icon style="margin-right: 5px;">
<Refresh />
</el-icon> </el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain size="small" @click="handleAdd"
v-hasPermi="['device:pitThreshold:add']">
<el-icon style="margin-right: 5px;"><Plus /></el-icon>
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain size="small" :disabled="single" @click="handleUpdate"
v-hasPermi="['device:pitThreshold:edit']">
<el-icon style="margin-right: 5px;"><Edit /></el-icon>
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain size="small" :disabled="multiple" @click="handleDelete"
v-hasPermi="['device:pitThreshold:remove']">
<el-icon style="margin-right: 5px;"><Delete /></el-icon>
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain size="small" @click="handleExport"
v-hasPermi="['device:pitThreshold:export']">
<el-icon style="margin-right: 5px;"><Download /></el-icon>
</el-button>
</el-col>
<right-toolbar :showSearch="showSearch" @update:showSearch="showSearch = $event" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="pitThresholdList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="编号" align="center" prop="id" />
<el-table-column label="监测项" align="center" prop="meName" />
<el-table-column label="测点" align="center" prop="spName" />
<el-table-column label="预警值" align="center" prop="warningValue" />
<el-table-column label="报警值" align="center" prop="alarmValue" />
<el-table-column label="控制值" align="center" prop="controlValue" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="small" type="primary" text @click="handleUpdate(scope.row)"
v-hasPermi="['device:pitThreshold:edit']">
<el-icon style="margin-right: 3px;"><Edit /></el-icon>
</el-button>
<el-button size="small" type="danger" text @click="handleDelete(scope.row)"
v-hasPermi="['device:pitThreshold:remove']">
<el-icon style="margin-right: 3px;"><Delete /></el-icon>
</el-button>
</template>
<el-table v-loading="loading" :data="pitThresholdList">
<el-table-column label="编号" align="center" prop="id" width="100" />
<el-table-column label="监测项" align="center" prop="elName" />
<el-table-column label="监测分项" align="center" prop="monitorItemName" />
<el-table-column label="类型" align="center" prop="type" />
<el-table-column label="报警值等级" align="center" prop="level">
<template #default="scope"> {{ ["正常", "超预警值", "超报警值", "超控制值"][scope.row.level] }} </template>
</el-table-column>
<el-table-column label="报警值配置" align="center" prop="threshold" />
<el-table-column label="每天时间范围" align="center" prop="intervalA">
<template #default="scope">{{ scope.row.intervalA }} ~ {{ scope.row.intervalB }}</template>
</el-table-column>
<el-table-column label="报警提示信息" align="center" prop="alarmInfo" />
</el-table>
<pagination v-show="total>0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
@pagination="getList" />
<!-- 添加或修改基坑阈值对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="监测项" prop="meId">
<el-select v-model="form.meId" placeholder="请选择监测项" clearable filterable @change="handleMeChange">
<el-option v-for="item in meas" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="测点" prop="spId">
<el-select v-model="form.spId" placeholder="请选择测点" clearable filterable>
<el-option v-for="item in surveyPoints" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="预警值" prop="warningValue">
<el-input v-model="form.warningValue" placeholder="请输入预警值" />
</el-form-item>
<el-form-item label="报警值" prop="alarmValue">
<el-input v-model="form.alarmValue" placeholder="请输入报警值" />
</el-form-item>
<el-form-item label="控制值" prop="controlValue">
<el-input v-model="form.controlValue" placeholder="请输入控制值" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script>
import { listPitThreshold, getPitThreshold, delPitThreshold, addPitThreshold, updatePitThreshold } from "@/api/device/pitThreshold";
import { queryUnitList, findMyProjectList } from "@/api/publics";
import { listPitElement } from "@/api/device/pitElement";
import useUserStore from "@/store/modules/user";
export default {
name: "PitThreshold",
@ -142,13 +68,15 @@ export default {
pageNum: 1,
pageSize: 10,
projectId: null,
subDeptId: null,
subDeptId: null,
},
//
form: {},
//
rules: {
},
pitEls: [], //
pitSps: [], //
projectOptions: [],
depts: [],
userStore: null,
@ -158,38 +86,25 @@ export default {
this.userStore = useUserStore();
this.queryParams.projectId = this.userStore.currentPrjId;
this.queryParams.subDeptId = this.userStore.currentComId;
this.getList();
this.doQuerySub();
this.init();
},
methods: {
doQuerySub() {
let prjId=this.queryParams.projectId;
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
if (tmps.length > 0 || !prjId) {
this.depts = tmps;
if (tmps.length == 1) {
this.queryParams.subDeptId = tmps[0].deptId;
} else {
this.queryParams.subDeptId = '';
}
this.getList();
return;
}
queryUnitList({
projectId: prjId,
unitTypes: "2".split(","),
this.pitEls = [];
this.pitSps = [];
this.queryParams.monitorElementId = "";
this.queryParams.spId = "";
this.doQueryPitEL();
},
doQueryPitEL() {
listPitElement({
pageNum: 1,
pageSize: 100,
projectId: this.queryParams.projectId
}).then((d) => {
let objs = d.rows || [];
if (!this.prjDept2) {
this.prjDept2 = {};
}
this.prjDept2[prjId] = objs;
this.depts = objs;
if (objs.length == 1) {
this.queryParams.subDeptId = objs[0].deptId;
} else {
this.queryParams.subDeptId = '';
}
this.pitEls = d.rows || [];
this.queryParams.monitorElementId = "";
this.getList();
});
},
@ -210,39 +125,7 @@ export default {
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
cfgId: null,
srvId: null,
alarmInfo: null,
alarmName: null,
intervalA: null,
intervalB: null,
level: null,
monitorElementId: null,
monitorItemId: null,
monitorItemName: null,
tgId: null,
threshold: null,
type: null,
unit: null,
state: null,
remark: null,
isDel: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
@ -253,64 +136,6 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加报警阈值";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getPitThreshold(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改报警阈值";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updatePitThreshold(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addPitThreshold(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除报警阈值编号为"' + ids + '"的数据项?').then(function () {
return delPitThreshold(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
this.download('device/pitThreshold/export', {
...this.queryParams
}, `pitThreshold_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -14,7 +14,6 @@
<el-button icon="Refresh" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['manage:proProjectInfo:add']"></el-button>
@ -30,7 +29,6 @@
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table :data="proProjectInfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="所属单位" align="center" prop="comName" width="120" />
@ -56,23 +54,17 @@
<el-table-column label="负责人电话" align="center" prop="projectPersonPhone" width="120" />
<el-table-column label="项目工期" align="center" prop="projectTimeLimit" width="120">
<template #default="scope">
<el-tag effect="plain">
{{ scope.row.projectTimeLimit + " 天" }}
</el-tag>
<el-tag effect="plain"> {{ scope.row.projectTimeLimit + " 天" }} </el-tag>
</template>
</el-table-column>
<el-table-column label="总投资" align="center" prop="totalInvestment">
<template #default="scope">
<el-tag effect="dark">
{{ scope.row.totalInvestment + " 万元" }}
</el-tag>
<el-tag effect="dark"> {{ scope.row.totalInvestment + " 万元" }} </el-tag>
</template>
</el-table-column>
<el-table-column label="合同金额" align="center" prop="contractAmount">
<template #default="scope">
<el-tag effect="dark">
{{ scope.row.contractAmount + " 万元" }}
</el-tag>
<el-tag effect="dark"> {{ scope.row.contractAmount + " 万元" }} </el-tag>
</template>
</el-table-column>
<el-table-column label="项目进度" align="center" prop="projectSchedule">
@ -98,7 +90,9 @@
<template #default="scope">
<el-dropdown @command="(e) => menuCommand(e, scope.row)">
<span class="el-dropdown-link">
<el-icon :size="14" color="var(--el-color-primary)"> <Setting /> </el-icon><span style="margin-left: 8px; position: relative; top: -3px"></span>
<el-icon :size="14" color="var(--el-color-primary)">
<Setting />
</el-icon><span style="margin-left: 8px; position: relative; top: -3px"></span>
<el-icon class="el-icon--right">
<arrow-down />
</el-icon>
@ -106,24 +100,25 @@
<template #dropdown>
<el-dropdown-menu>
<div v-hasPermi="['manage:proProjectInfo:edit']">
<el-dropdown-item command="edit" style="color: var(--el-color-primary)"
><el-icon :size="14" color="var(--el-color-primary)"> <Edit /> </el-icon>
</el-dropdown-item>
<el-dropdown-item command="edit" style="color: var(--el-color-primary)"><el-icon :size="14" color="var(--el-color-primary)">
<Edit />
</el-icon> </el-dropdown-item>
</div>
<div v-hasPermi="['manage:proProjectInfo:edit']">
<el-dropdown-item command="resetQr" style="color: var(--el-color-primary)"
><el-icon :size="14" color="var(--el-color-primary)"> <Refresh /> </el-icon>
</el-dropdown-item>
<el-dropdown-item command="resetQr" style="color: var(--el-color-primary)"><el-icon :size="14" color="var(--el-color-primary)">
<Refresh />
</el-icon> </el-dropdown-item>
</div>
<div v-hasPermi="['manage:costOutput:add']">
<el-dropdown-item divided command="outCost" style="color: var(--el-color-primary)"
><el-icon :size="14" color="var(--el-color-primary)"> <Money /> </el-icon>
</el-dropdown-item>
<el-dropdown-item divided command="outCost" style="color: var(--el-color-primary)"><el-icon :size="14" color="var(--el-color-primary)">
<Money />
</el-icon> </el-dropdown-item>
</div>
<div v-hasPermi="['manage:proProjectInfo:remove']">
<el-dropdown-item divided command="delete" style="color: var(--el-color-primary)">
<el-icon :size="14" color="var(--el-color-primary)"> <Delete /> </el-icon></el-dropdown-item
>
<el-icon :size="14" color="var(--el-color-primary)">
<Delete />
</el-icon></el-dropdown-item>
</div>
</el-dropdown-menu>
</template>
@ -131,12 +126,10 @@
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
<!-- 添加或修改项目信息对话框 -->
<el-dialog :title="title" v-model="open" width="1080px" append-to-body :close-on-click-modal="false" :close-on-press-escape="false" class="project-info-edit-dlg">
<el-form ref="proProjectInfoRef" :model="form" :rules="rules" label-width="120px">
<el-dialog :title="title" v-model="open" width="1080px" append-to-body :close-on-click-modal="false" :close-on-press-escape="false" class="project-info-edit-dlg">
<el-form ref="proProjectInfoRef" :model="form" :rules="rules" label-width="120px">
<el-tabs v-model="activeTags" type="card" class="demo-tabs">
<el-tab-pane label="项目基本信息" name="base">
<el-row :gutter="20">
@ -190,7 +183,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="项目地址" prop="projectAddress" ref="fitemPrjAddr">
@ -322,16 +314,21 @@
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12" :class="form.setting.orgLogo ? 'no-up' : 'can-up'" class="up-img">
<el-col :span="8" :class="form.setting.orgLogo ? 'no-up' : 'can-up'" class="up-img">
<el-form-item label="显示LOGO" prop="orgLogo">
<image-upload v-model="form.setting.orgLogo" :limit="1" />
</el-form-item>
</el-col>
<el-col :span="12" :class="form.setting.orgPlane ? 'no-up' : 'can-up'" class="up-img">
<el-col :span="8" :class="form.setting.orgPlane ? 'no-up' : 'can-up'" class="up-img">
<el-form-item label="施工平面图布置图" prop="orgPlane">
<image-upload v-model="form.setting.orgPlane" :limit="1" />
</el-form-item>
</el-col>
<el-col :span="8" :class="form.setting.pitImgUrl ? 'no-up' : 'can-up'" class="up-img">
<el-form-item label="项目基坑平面图" prop="pitImgUrl">
<image-upload v-model="form.setting.pitImgUrl" :limit="1" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24" :class="form.setting.orgImage && form.setting.orgImage.split(',').length == 9 ? 'no-up' : 'can-up'" class="up-img">
@ -361,7 +358,6 @@
<baidu-map ref="mapRef" @docom="mapDocom"></baidu-map>
</div>
</template>
<script setup name="ProProjectInfo">
import { deptTreeSelect } from "@/api/system/user";
import { listProProjectInfo, getProProjectInfo, delProProjectInfo, addProProjectInfo, updateProProjectInfo, resetProQrCode } from "@/api/manage/proProjectInfo";
@ -577,7 +573,7 @@ function doDeletPrjDept(it, item, index) {
it.datas.splice(index, 1);
proxy.$modal.msgSuccess("删除成功");
})
.catch(() => {});
.catch(() => { });
} else {
it.datas.splice(index, 1);
}
@ -633,7 +629,7 @@ function handleResetQr(row) {
getList();
proxy.$modal.msgSuccess("重置成功");
})
.catch(() => {});
.catch(() => { });
}
/** 参建单位序号 */
@ -742,7 +738,7 @@ function handleDelete(row) {
getList();
proxy.$modal.msgSuccess("删除成功");
})
.catch(() => {});
.catch(() => { });
}
/** 导出按钮操作 */