基坑管理后台处理
parent
1c28b1c19b
commit
d5139d5db5
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
require('echarts/theme/macarons')
|
||||
import 'echarts/theme/macarons';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
|
@ -56,5 +56,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</script>
|
||||
|
|
@ -8,19 +8,28 @@
|
|||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="告警原因" prop="type">
|
||||
<el-select v-model="queryParams.type" filterable placeholder="请选择告警原因" clearable style="width: 150px;">
|
||||
<el-option v-for="(item, index) in '数据异常,DTU异常,传感器异常,网关异常,节点异常'.split(',')" :key="index" :label="item"
|
||||
:value="item">
|
||||
<el-select v-model="queryParams.type" filterable placeholder="请选择告警原因" clearable style="width: 150px">
|
||||
<el-option v-for="(
|
||||
item, index
|
||||
) in '数据异常,DTU异常,传感器异常,网关异常,节点异常'.split(',')" :key="index" :label="item" :value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" @click="handleQuery">
|
||||
<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-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8" v-if="1==2">
|
||||
<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"
|
||||
v-hasPermi="['device:pitAlarm:add']">新增</el-button>
|
||||
|
|
@ -40,56 +49,65 @@
|
|||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="pitAlarmList" @selection-change="handleSelectionChange">
|
||||
<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="prjName" width="240" />
|
||||
<!-- <el-table-column label="总包单位" align="center" prop="deptName" width="180" /> -->
|
||||
<el-table-column label="告警源" align="center" prop="alarmSource" >
|
||||
<el-table-column label="告警源" align="center" prop="alarmSource">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.alarmSource}}-{{ scope.row.variety}}
|
||||
{{ 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"/>
|
||||
<el-table-column label="产生次数" align="center" prop="numbers" width="80"/>
|
||||
<el-table-column label="产生时间" align="center" prop="gmtCreate" width="150"/>
|
||||
<el-table-column label="更新时间" align="center" prop="gmtModified" width="150"/>
|
||||
<el-table-column label="处理人" align="center" prop="staff" width="100" v-if="queryParams.status"/>
|
||||
<el-table-column label="处理人电话" align="center" prop="staffPhone" width="180" v-if="queryParams.status"/>
|
||||
<el-table-column label="处理人结果" align="center" prop="result" width="180" v-if="queryParams.status"/>
|
||||
<el-table-column label="处理图片" align="center" prop="result" width="180" v-if="queryParams.status=='true'">
|
||||
<el-table-column label="告警信息" align="center" prop="alarmInfo" width="180" />
|
||||
<el-table-column label="产生次数" align="center" prop="numbers" width="80" />
|
||||
<el-table-column label="产生时间" align="center" prop="gmtCreate" width="160" />
|
||||
<el-table-column label="更新时间" align="center" prop="gmtModified" width="160" />
|
||||
<el-table-column label="处理人" align="center" prop="staff" width="100" v-if="queryParams.status" />
|
||||
<el-table-column label="处理人电话" align="center" prop="staffPhone" width="180" v-if="queryParams.status" />
|
||||
<el-table-column label="处理人结果" align="center" prop="result" width="180" v-if="queryParams.status" />
|
||||
<el-table-column label="处理图片" align="center" prop="result" width="180" v-if="queryParams.status == 'true'">
|
||||
<template v-slot="scope">
|
||||
<span style="color:#ccc" v-if="!scope.row.resultUrl">暂无</span>
|
||||
<el-image :src="scope.row.resultUrl" v-else
|
||||
:preview-src-list="[scope.row.resultUrl]"/>
|
||||
<span style="color: #ccc" v-if="!scope.row.resultUrl">暂无</span>
|
||||
<el-image :src="scope.row.resultUrl" v-else :preview-src-list="[scope.row.resultUrl]" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="180px">
|
||||
<template v-slot="scope">
|
||||
<el-button type="primary" text v-if="queryParams.status=='false'" icon="el-icon-tickets" @click="showDetail(scope.row)">详情</el-button>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="180px">
|
||||
<template v-slot="scope">
|
||||
<el-button type="primary" text v-if="queryParams.status == 'false'" icon="el-icon-tickets"
|
||||
@click="showDetail(scope.row)">详情</el-button>
|
||||
<el-button size="small" type="danger" text icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['device:pitAlarm:remove']">删除</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" />
|
||||
<alarm-detail-dlg ref="detailDlg"/>
|
||||
<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, getPitAlarm, delPitAlarm, addPitAlarm, updatePitAlarm } from "@/api/device/pitAlarm";
|
||||
import alarmDetailDlg from './alarmDetailDlg.vue'
|
||||
import {findMyProjectList} from "@/api/publics";
|
||||
import {
|
||||
listPitAlarm,
|
||||
getPitAlarm,
|
||||
delPitAlarm,
|
||||
addPitAlarm,
|
||||
updatePitAlarm,
|
||||
} from "@/api/device/pitAlarm";
|
||||
import alarmDetailDlg from "./alarmDetailDlg.vue";
|
||||
import { findMyProjectList } from "@/api/publics";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
export default {
|
||||
components:{
|
||||
alarmDetailDlg
|
||||
components: {
|
||||
alarmDetailDlg,
|
||||
},
|
||||
name: "PitAlarm",
|
||||
data() {
|
||||
|
|
@ -119,27 +137,29 @@ export default {
|
|||
projectId: null,
|
||||
subDeptId: null,
|
||||
status: false,
|
||||
type: null
|
||||
type: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
},
|
||||
rules: {},
|
||||
projectOptions: [],
|
||||
depts: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.userStore = useUserStore();
|
||||
this.queryParams.projectId = this.userStore.currentPrjId;
|
||||
this.queryParams.subDeptId = this.userStore.currentComId;
|
||||
this.getList();
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
showDetail(row){
|
||||
showDetail(row) {
|
||||
try {
|
||||
this.$refs.detailDlg.showDialog(row);
|
||||
} catch (error) {
|
||||
console.error('Error in showDetail:', error);
|
||||
console.error("Error in showDetail:", error);
|
||||
}
|
||||
},
|
||||
init() {
|
||||
|
|
@ -153,14 +173,14 @@ export default {
|
|||
/** 查询报警信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listPitAlarm(this.queryParams).then(response => {
|
||||
listPitAlarm(this.queryParams).then((response) => {
|
||||
this.pitAlarmList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getLevel(lvl){
|
||||
return ["正常","超预警值","超报警值","超控制值"][lvl];
|
||||
getLevel(lvl) {
|
||||
return ["正常", "超预警值", "超报警值", "超控制值"][lvl];
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
|
|
@ -203,7 +223,7 @@ export default {
|
|||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
updateTime: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
|
@ -219,9 +239,9 @@ export default {
|
|||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
|
|
@ -232,8 +252,8 @@ export default {
|
|||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getPitAlarm(id).then(response => {
|
||||
const id = row.id || this.ids;
|
||||
getPitAlarm(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改报警信息";
|
||||
|
|
@ -241,16 +261,16 @@ export default {
|
|||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updatePitAlarm(this.form).then(response => {
|
||||
updatePitAlarm(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPitAlarm(this.form).then(response => {
|
||||
addPitAlarm(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
|
|
@ -262,38 +282,48 @@ export default {
|
|||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除报警信息编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delPitAlarm(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
this.$modal
|
||||
.confirm('是否确认删除报警信息编号为"' + ids + '"的数据项?')
|
||||
.then(function () {
|
||||
return delPitAlarm(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('device/pitAlarm/export', {
|
||||
...this.queryParams
|
||||
}, `pitAlarm_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
this.download(
|
||||
"device/pitAlarm/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`pitAlarm_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.pit-alarm-index{
|
||||
.sp-data{
|
||||
&.sp-level-0{
|
||||
color: #FFEBEE;
|
||||
}
|
||||
&.sp-level-1{
|
||||
color: #EF9A9A;
|
||||
}
|
||||
&.sp-level-2{
|
||||
color: #EF5350;
|
||||
}
|
||||
&.sp-level-3{
|
||||
color: #D32F2F;
|
||||
}
|
||||
}
|
||||
.pit-alarm-index {
|
||||
.sp-data {
|
||||
&.sp-level-0 {
|
||||
color: #ffebee;
|
||||
}
|
||||
|
||||
&.sp-level-1 {
|
||||
color: #ef9a9a;
|
||||
}
|
||||
|
||||
&.sp-level-2 {
|
||||
color: #ef5350;
|
||||
}
|
||||
|
||||
&.sp-level-3 {
|
||||
color: #d32f2f;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,20 +2,28 @@
|
|||
<div class="app-container prj-pit-config">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd"
|
||||
v-hasPermi="['device:pitConfig:add']">新增</el-button>
|
||||
<el-button type="primary" plain size="small" @click="handleAdd"
|
||||
v-hasPermi="['device:pitConfig:add']">
|
||||
<el-icon style="margin-right: 5px;"><Plus /></el-icon>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-edit" size="small" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['device:pitConfig:edit']">修改</el-button>
|
||||
<el-button type="success" plain size="small" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['device:pitConfig:edit']">
|
||||
<el-icon style="margin-right: 5px;"><Edit /></el-icon>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['device:pitConfig:remove']">删除</el-button>
|
||||
<el-button type="danger" plain size="small" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['device:pitConfig:remove']">
|
||||
<el-icon style="margin-right: 5px;"><Delete /></el-icon>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5" v-if="1 == 2">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="small" @click="handleExport"
|
||||
v-hasPermi="['device:pitConfig:export']">导出</el-button>
|
||||
<el-button type="warning" plain size="small" @click="handleExport"
|
||||
v-hasPermi="['device:pitConfig: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>
|
||||
|
|
@ -34,10 +42,14 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button type="primary" text icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['device:pitConfig:edit']">修改</el-button>
|
||||
<el-button type="danger" text icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['device:pitConfig:remove']">删除</el-button>
|
||||
<el-button type="primary" text @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['device:pitConfig:edit']">
|
||||
<el-icon style="margin-right: 3px;"><Edit /></el-icon>修改
|
||||
</el-button>
|
||||
<el-button type="danger" text @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['device:pitConfig:remove']">
|
||||
<el-icon style="margin-right: 3px;"><Delete /></el-icon>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -92,7 +104,7 @@ export default {
|
|||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
showSearch: false,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 项目基坑监测配置表格数据
|
||||
|
|
@ -139,6 +151,8 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.userStore=useUserStore();
|
||||
this.queryParams.projectId = this.userStore.currentPrjId;
|
||||
this.queryParams.subDeptId = this.userStore.currentComId;
|
||||
this.getList();
|
||||
this.init();
|
||||
},
|
||||
|
|
@ -340,12 +354,10 @@ export default {
|
|||
.el-drawer__body {
|
||||
position: relative;
|
||||
|
||||
// .dialog-footer {
|
||||
// position: fixed;
|
||||
// bottom: 0px;
|
||||
// padding: 20px;
|
||||
// }
|
||||
}
|
||||
}
|
||||
.top-right-btn button:first-child{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<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="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 v-for="item in pitEls" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -19,29 +19,52 @@
|
|||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" size="small" @click="handleQuery">
|
||||
<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-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" icon="el-icon-plus" size="small" @click="handleAdd"
|
||||
v-hasPermi="['device:pitData:add']">新增</el-button>
|
||||
<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" icon="el-icon-edit" size="small" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['device:pitData:edit']">修改</el-button>
|
||||
<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" icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['device:pitData:remove']">删除</el-button>
|
||||
<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" icon="el-icon-download" size="small" @click="handleExport"
|
||||
v-hasPermi="['device:pitData:export']">导出</el-button>
|
||||
<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>
|
||||
<right-toolbar :showSearch="showSearch" @update:showSearch="showSearch = $event"
|
||||
@queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="pitDataList" @selection-change="handleSelectionChange">
|
||||
|
|
@ -59,7 +82,9 @@
|
|||
<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>
|
||||
|
|
@ -68,24 +93,36 @@
|
|||
<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 icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['device:pitData:edit']">修改</el-button>
|
||||
<el-button size="small" type="danger" text icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['device:pitData:remove']">删除</el-button>
|
||||
<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" />
|
||||
<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>
|
||||
|
|
@ -127,7 +164,8 @@
|
|||
<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 clearable v-model="form.collectTime" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="选择采集时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
|
@ -142,15 +180,22 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { listPitData, getPitData, delPitData, addPitData, updatePitData } from "@/api/device/pitData";
|
||||
import { listPitElement } from '@/api/device/pitElement'
|
||||
import { listPitSurveyPoint } from '@/api/device/pitSurveyPoint'
|
||||
import {
|
||||
listPitData,
|
||||
getPitData,
|
||||
delPitData,
|
||||
addPitData,
|
||||
updatePitData,
|
||||
} from "@/api/device/pitData";
|
||||
import { listPitElement } from "@/api/device/pitElement";
|
||||
import { listPitSurveyPoint } from "@/api/device/pitSurveyPoint";
|
||||
import { queryUnitList, findMyProjectList } from "@/api/publics";
|
||||
import Chart from '@/components/Chart'
|
||||
import Chart from "@/components/Chart";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
export default {
|
||||
name: "PitData",
|
||||
components:{
|
||||
Chart
|
||||
components: {
|
||||
Chart,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -180,109 +225,73 @@ export default {
|
|||
subDeptId: null,
|
||||
meId: null,
|
||||
spId: null,
|
||||
selDate: []
|
||||
selDate: [],
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
},
|
||||
rules: {},
|
||||
projectOptions: [],
|
||||
depts: [],
|
||||
pitEls: [],//监测项
|
||||
pitSps: [],//测点
|
||||
chartData:null,
|
||||
selChart1:0,
|
||||
selChart2:0,
|
||||
pitEls: [], //监测项
|
||||
pitSps: [], //测点
|
||||
chartData: null,
|
||||
userStore: null,
|
||||
selChart1: 0,
|
||||
selChart2: 0,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
//let dt1 = this.$dt((+new Date()) - 30 * 24 * 3600 * 1000);
|
||||
//let dt2 = this.$dt(new Date());
|
||||
//this.queryParams.selDate = [dt1, dt2];
|
||||
this.getList();
|
||||
this.userStore = useUserStore();
|
||||
this.queryParams.projectId = this.userStore.currentPrjId;
|
||||
this.queryParams.subDeptId = this.userStore.currentComId;
|
||||
|
||||
this.doQuerySub();
|
||||
this.init();
|
||||
},
|
||||
computed:{
|
||||
spId(){
|
||||
computed: {
|
||||
spId() {
|
||||
return this.queryParams.spId;
|
||||
}
|
||||
},
|
||||
},
|
||||
watch:{
|
||||
spId(n,o){
|
||||
if(n!=o){
|
||||
if(n){
|
||||
watch: {
|
||||
spId(n, o) {
|
||||
if (n != o) {
|
||||
if (n) {
|
||||
let postData = {
|
||||
spId: this.queryParams.spId,
|
||||
pageNum:this.queryParams.pageNum,
|
||||
pageSize:5000
|
||||
pageNum: this.queryParams.pageNum,
|
||||
pageSize: 5000,
|
||||
};
|
||||
listPitData(postData).then(d=>{
|
||||
let tmps=d.rows||[];
|
||||
this.chartData=tmps.length>0?tmps:null;
|
||||
this.selChart1=0;
|
||||
this.selChart2=0;
|
||||
listPitData(postData).then((d) => {
|
||||
let tmps = d.rows || [];
|
||||
this.chartData = tmps.length > 0 ? tmps : null;
|
||||
this.selChart1 = 0;
|
||||
this.selChart2 = 0;
|
||||
this.showChartData(1);
|
||||
this.showChartData(2);
|
||||
});
|
||||
}else{
|
||||
this.chartData=null;
|
||||
} else {
|
||||
this.chartData = null;
|
||||
}
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
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.pitEls=[];
|
||||
this.pitSps=[];
|
||||
this.queryParams.meId="";
|
||||
this.queryParams.spId="";
|
||||
}
|
||||
this.doQueryPitEL();
|
||||
return;
|
||||
}
|
||||
queryUnitList({
|
||||
projectId: prjId,
|
||||
unitTypes: "2".split(","),
|
||||
}).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.doQueryPitEL();
|
||||
});
|
||||
this.pitEls = [];
|
||||
this.pitSps = [];
|
||||
this.queryParams.meId = "";
|
||||
this.queryParams.spId = "";
|
||||
this.doQueryPitEL();
|
||||
},
|
||||
doQueryPitEL() {
|
||||
if (!this.queryParams.subDeptId) {
|
||||
this.pitEls = [];
|
||||
this.queryParams.meId = "";
|
||||
this.pitSps=[];
|
||||
this.queryParams.spId="";
|
||||
this.getList();
|
||||
return;
|
||||
}
|
||||
listPitElement({
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
projectId: this.queryParams.projectId,
|
||||
subDeptId: this.queryParams.subDeptId
|
||||
}).then(d => {
|
||||
projectId: this.queryParams.projectId
|
||||
}).then((d) => {
|
||||
this.pitEls = d.rows || [];
|
||||
if (this.pitEls.length > 0) {
|
||||
this.queryParams.meId = this.pitEls[0].srvId;
|
||||
|
|
@ -302,82 +311,97 @@ export default {
|
|||
listPitSurveyPoint({
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
meId: this.queryParams.meId
|
||||
}).then(d => {
|
||||
meId: this.queryParams.meId,
|
||||
}).then((d) => {
|
||||
this.pitSps = d.rows || [];
|
||||
if (this.pitSps.length > 0) {
|
||||
this.queryParams.spId = this.pitSps[0].spId;
|
||||
this.queryParams.spId = this.pitSps[0].spId;
|
||||
} else {
|
||||
this.queryParams.spId = "";
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
changeOpt(opt,type){
|
||||
changeOpt(opt, type) {
|
||||
opt = {
|
||||
tooltip: {
|
||||
trigger: "axis"
|
||||
trigger: "axis",
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: !0x0
|
||||
left: "3%",
|
||||
right: "4%",
|
||||
bottom: "3%",
|
||||
containLabel: !0x0,
|
||||
},
|
||||
toolbox: {
|
||||
feature: {
|
||||
'saveAsImage': {}
|
||||
}
|
||||
saveAsImage: {},
|
||||
},
|
||||
},
|
||||
dataZoom:[{
|
||||
type:'slider',
|
||||
show:true
|
||||
},{
|
||||
type:"inside"
|
||||
}],
|
||||
xAxis:{
|
||||
type:"time"
|
||||
dataZoom: [
|
||||
{
|
||||
type: "slider",
|
||||
show: true,
|
||||
},
|
||||
{
|
||||
type: "inside",
|
||||
},
|
||||
],
|
||||
xAxis: {
|
||||
type: "time",
|
||||
},
|
||||
yAxis:{
|
||||
|
||||
},
|
||||
series:[{
|
||||
data:this.chartData.map(it=>{
|
||||
let tmps=[];
|
||||
tmps.push(it.collectTime);
|
||||
let data=0;
|
||||
if(type==1){
|
||||
data=(it["displace,totalize,variation,changeRate".split(",")[this.selChart1]]||0).toFixed(3)
|
||||
}else{
|
||||
data=(it["displace2,totalize2,variation2,changeRate2".split(",")[this.selChart2]]||0).toFixed(3)
|
||||
}
|
||||
tmps.push(data);
|
||||
return tmps;
|
||||
}),
|
||||
sampling:'max',
|
||||
showSymbol:false,
|
||||
type:'line'
|
||||
}]
|
||||
}
|
||||
yAxis: {},
|
||||
series: [
|
||||
{
|
||||
data: this.chartData.map((it) => {
|
||||
let tmps = [];
|
||||
tmps.push(it.collectTime);
|
||||
let data = 0;
|
||||
if (type == 1) {
|
||||
data = (
|
||||
it[
|
||||
"displace,totalize,variation,changeRate".split(",")[
|
||||
this.selChart1
|
||||
]
|
||||
] || 0
|
||||
).toFixed(3);
|
||||
} else {
|
||||
data = (
|
||||
it[
|
||||
"displace2,totalize2,variation2,changeRate2".split(",")[
|
||||
this.selChart2
|
||||
]
|
||||
] || 0
|
||||
).toFixed(3);
|
||||
}
|
||||
tmps.push(data);
|
||||
return tmps;
|
||||
}),
|
||||
sampling: "max",
|
||||
showSymbol: false,
|
||||
type: "line",
|
||||
},
|
||||
],
|
||||
};
|
||||
return opt;
|
||||
},
|
||||
showChartData(type){
|
||||
if(type==1){
|
||||
if(this.$refs.chart1){
|
||||
},
|
||||
showChartData(type) {
|
||||
if (type == 1) {
|
||||
if (this.$refs.chart1) {
|
||||
this.$refs.chart1.initChart();
|
||||
}else{
|
||||
setTimeout(()=>{
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
this.showChartData(1);
|
||||
},400);
|
||||
}, 400);
|
||||
}
|
||||
}
|
||||
if(type==2){
|
||||
if(this.$refs.chart2){
|
||||
if (type == 2) {
|
||||
if (this.$refs.chart2) {
|
||||
this.$refs.chart2.initChart();
|
||||
}else{
|
||||
setTimeout(()=>{
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
this.showChartData(2);
|
||||
},400);
|
||||
}, 400);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -400,17 +424,21 @@ export default {
|
|||
this.loading = true;
|
||||
let postData = {
|
||||
spId: this.queryParams.spId,
|
||||
pageNum:this.queryParams.pageNum,
|
||||
pageSize:this.queryParams.pageSize
|
||||
};
|
||||
pageNum: this.queryParams.pageNum,
|
||||
pageSize: this.queryParams.pageSize,
|
||||
};
|
||||
let selDate = this.queryParams.selDate;
|
||||
if (selDate && selDate.length > 0) {
|
||||
postData.createTime = this.$dt(selDate[0]).format("YYYY-MM-DD HH:mm:ss");
|
||||
postData.createTime = this.$dt(selDate[0]).format(
|
||||
"YYYY-MM-DD HH:mm:ss"
|
||||
);
|
||||
if (selDate.length > 1) {
|
||||
postData.updateTime = this.$dt(selDate[1]).format("YYYY-MM-DD HH:mm:ss");
|
||||
postData.updateTime = this.$dt(selDate[1]).format(
|
||||
"YYYY-MM-DD HH:mm:ss"
|
||||
);
|
||||
}
|
||||
}
|
||||
listPitData(postData).then(response => {
|
||||
listPitData(postData).then((response) => {
|
||||
this.pitDataList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
|
|
@ -445,7 +473,7 @@ export default {
|
|||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
updateTime: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
|
@ -461,9 +489,9 @@ export default {
|
|||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
|
|
@ -474,8 +502,8 @@ export default {
|
|||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getPitData(id).then(response => {
|
||||
const id = row.id || this.ids;
|
||||
getPitData(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改测点数据";
|
||||
|
|
@ -483,16 +511,16 @@ export default {
|
|||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updatePitData(this.form).then(response => {
|
||||
updatePitData(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPitData(this.form).then(response => {
|
||||
addPitData(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
|
|
@ -504,25 +532,32 @@ export default {
|
|||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除测点数据编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delPitData(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
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`)
|
||||
}
|
||||
}
|
||||
this.download(
|
||||
"device/pitData/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`pitData_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.survey-point-data-index {
|
||||
|
||||
.el-table {
|
||||
max-height: 50vh;
|
||||
height: unset !important;
|
||||
|
|
@ -532,22 +567,27 @@ export default {
|
|||
max-height: 40vh !important;
|
||||
}
|
||||
}
|
||||
.pagination-container{
|
||||
height: 50px !important;
|
||||
}
|
||||
.div-chart{
|
||||
padding-top:10px;
|
||||
.chart1-group{
|
||||
.el-radio{
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
.chart1-group{
|
||||
margin-top:10px;
|
||||
.el-radio{
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.pagination-container {
|
||||
height: 50px !important;
|
||||
}
|
||||
|
||||
.div-chart {
|
||||
padding-top: 10px;
|
||||
|
||||
.chart1-group {
|
||||
.el-radio {
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.chart1-group {
|
||||
margin-top: 10px;
|
||||
|
||||
.el-radio {
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -8,8 +8,12 @@
|
|||
<el-input v-model="queryParams.name" placeholder="请输入设备名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" size="small" @click="handleQuery">
|
||||
<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-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="pitDeviceList">
|
||||
|
|
@ -26,9 +30,13 @@
|
|||
<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 icon="el-icon-info" @click="handleDetail(scope.row)">详情</el-button>
|
||||
<el-button type="danger" text icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['device:pitDevice:remove']">删除</el-button>
|
||||
<el-button type="primary" text @click="handleDetail(scope.row)">
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -49,10 +57,10 @@ import {
|
|||
} from "@/api/device/pitDevice";
|
||||
import { queryUnitList, findMyProjectList } from "@/api/publics";
|
||||
import deviceDetailDlg from "./deviceDetailDlg.vue";
|
||||
|
||||
import useUserStore from "@/store/modules/user";
|
||||
export default {
|
||||
components: {
|
||||
deviceDetailDlg,
|
||||
deviceDetailDlg
|
||||
},
|
||||
name: "PitDevice",
|
||||
data() {
|
||||
|
|
@ -97,6 +105,7 @@ export default {
|
|||
pit_device_type: [],
|
||||
},
|
||||
},
|
||||
userStore: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -106,6 +115,10 @@ export default {
|
|||
);
|
||||
this.dict.type.pit_device_status = pit_device_status;
|
||||
this.dict.type.pit_device_type = pit_device_type;
|
||||
this.userStore = useUserStore();
|
||||
this.queryParams.projectId = this.userStore.currentPrjId;
|
||||
this.queryParams.subDeptId = this.userStore.currentComId;
|
||||
|
||||
this.getList();
|
||||
this.init();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -14,27 +14,39 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" @click="handleQuery">
|
||||
<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-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd"
|
||||
v-hasPermi="['device:pitDeviceSurveyPoint:add']">新增</el-button>
|
||||
<el-button type="primary" plain @click="handleAdd"
|
||||
v-hasPermi="['device:pitDeviceSurveyPoint:add']">
|
||||
<el-icon style="margin-right: 5px;"><Plus /></el-icon>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-edit" size="small" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['device:pitDeviceSurveyPoint:edit']">修改</el-button>
|
||||
<el-button type="success" plain :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['device:pitDeviceSurveyPoint:edit']">
|
||||
<el-icon style="margin-right: 5px;"><Edit /></el-icon>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['device:pitDeviceSurveyPoint:remove']">删除</el-button>
|
||||
<el-button type="danger" plain :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['device:pitDeviceSurveyPoint:remove']">
|
||||
<el-icon style="margin-right: 5px;"><Delete /></el-icon>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="small" @click="handleExport"
|
||||
v-hasPermi="['device:pitDeviceSurveyPoint:export']">导出</el-button>
|
||||
<el-button type="warning" plain @click="handleExport"
|
||||
v-hasPermi="['device:pitDeviceSurveyPoint: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>
|
||||
|
|
@ -46,10 +58,14 @@
|
|||
<el-table-column label="测点" align="center" prop="surveyPointName" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="small" type="primary" text icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['device:pitDeviceSurveyPoint:edit']">修改</el-button>
|
||||
<el-button size="small" type="danger" text icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['device:pitDeviceSurveyPoint:remove']">删除</el-button>
|
||||
<el-button size="small" type="primary" text @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['device:pitDeviceSurveyPoint: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:pitDeviceSurveyPoint:remove']">
|
||||
<el-icon style="margin-right: 3px;"><Delete /></el-icon>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -85,7 +101,7 @@
|
|||
|
||||
<script>
|
||||
import { listPitDeviceSurveyPoint, getPitDeviceSurveyPoint, delPitDeviceSurveyPoint, addPitDeviceSurveyPoint, updatePitDeviceSurveyPoint } from "@/api/device/pitDeviceSurveyPoint";
|
||||
|
||||
import useUserStore from "@/store/modules/user";
|
||||
export default {
|
||||
name: "PitDeviceSurveyPoint",
|
||||
data() {
|
||||
|
|
@ -113,6 +129,8 @@ export default {
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
deviceId: null,
|
||||
projectId: null,
|
||||
subDeptId: null,
|
||||
surveyPointId: null,
|
||||
},
|
||||
// 表单参数
|
||||
|
|
@ -123,6 +141,10 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
this.userStore = useUserStore();
|
||||
this.queryParams.projectId = this.userStore.currentPrjId;
|
||||
this.queryParams.subDeptId = this.userStore.currentComId;
|
||||
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -5,8 +5,12 @@
|
|||
<el-input v-model="queryParams.name" placeholder="请输入构件名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" @click="handleQuery">
|
||||
<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-form-item>
|
||||
</el-form>
|
||||
|
||||
|
|
@ -45,7 +49,7 @@
|
|||
<script>
|
||||
import { listPitElement, getPitElement, delPitElement, addPitElement, updatePitElement } from "@/api/device/pitElement";
|
||||
import { queryUnitList, findMyProjectList } from "@/api/publics";
|
||||
|
||||
import useUserStore from "@/store/modules/user";
|
||||
export default {
|
||||
name: "PitElement",
|
||||
data() {
|
||||
|
|
@ -82,9 +86,14 @@ export default {
|
|||
},
|
||||
projectOptions: [],
|
||||
depts: [],
|
||||
userStore: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.userStore = useUserStore();
|
||||
this.queryParams.projectId = this.userStore.currentPrjId;
|
||||
this.queryParams.subDeptId = this.userStore.currentComId;
|
||||
|
||||
this.getList();
|
||||
this.init();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -14,27 +14,39 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" size="small" @click="handleQuery">
|
||||
<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-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd"
|
||||
v-hasPermi="['device:pitElementItem:add']">新增</el-button>
|
||||
<el-button type="primary" plain size="small" @click="handleAdd"
|
||||
v-hasPermi="['device:pitElementItem:add']">
|
||||
<el-icon style="margin-right: 5px;"><Plus /></el-icon>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-edit" size="small" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['device:pitElementItem:edit']">修改</el-button>
|
||||
<el-button type="success" plain size="small" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['device:pitElementItem:edit']">
|
||||
<el-icon style="margin-right: 5px;"><Edit /></el-icon>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['device:pitElementItem:remove']">删除</el-button>
|
||||
<el-button type="danger" plain size="small" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['device:pitElementItem:remove']">
|
||||
<el-icon style="margin-right: 5px;"><Delete /></el-icon>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="small" @click="handleExport"
|
||||
v-hasPermi="['device:pitElementItem:export']">导出</el-button>
|
||||
<el-button type="warning" plain size="small" @click="handleExport"
|
||||
v-hasPermi="['device:pitElementItem: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>
|
||||
|
|
@ -46,10 +58,14 @@
|
|||
<el-table-column label="监测项" align="center" prop="meName" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="small" type="primary" text icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['device:pitElementItem:edit']">修改</el-button>
|
||||
<el-button size="small" type="danger" text icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['device:pitElementItem:remove']">删除</el-button>
|
||||
<el-button size="small" type="primary" text @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['device:pitElementItem: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:pitElementItem:remove']">
|
||||
<el-icon style="margin-right: 3px;"><Delete /></el-icon>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -85,7 +101,7 @@
|
|||
|
||||
<script>
|
||||
import { listPitElementItem, getPitElementItem, delPitElementItem, addPitElementItem, updatePitElementItem } from "@/api/device/pitElementItem";
|
||||
|
||||
import useUserStore from "@/store/modules/user";
|
||||
export default {
|
||||
name: "PitElementItem",
|
||||
data() {
|
||||
|
|
@ -113,16 +129,23 @@ export default {
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
elementId: null,
|
||||
projectId: null,
|
||||
subDeptId: null,
|
||||
meId: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
},
|
||||
userStore: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.userStore = useUserStore();
|
||||
this.queryParams.projectId = this.userStore.currentPrjId;
|
||||
this.queryParams.subDeptId = this.userStore.currentComId;
|
||||
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@
|
|||
|
||||
<el-table v-loading="loading" :data="pitSurveyPointList">
|
||||
<el-table-column label="编号" align="center" prop="spId" width="80" />
|
||||
<el-table-column label="项目名称" align="center" prop="prjName" width="180" />
|
||||
<el-table-column label="总包单位" align="center" prop="deptName" width="180" />
|
||||
<el-table-column label="所属监测点组名称" align="center" prop="groupName" />
|
||||
<el-table-column label="监测项名称" align="center" prop="meName" />
|
||||
<el-table-column label="监测项英文标识名" align="center" prop="meNameEn" />
|
||||
|
|
@ -45,6 +43,7 @@
|
|||
import { listPitSurveyPoint, getPitSurveyPoint, delPitSurveyPoint, addPitSurveyPoint, updatePitSurveyPoint } from "@/api/device/pitSurveyPoint";
|
||||
import { Search, Refresh, Location } from '@element-plus/icons-vue';
|
||||
import surveyPointPositionDrawer from './surveyPointPositionDrawer.vue'
|
||||
import useUserStore from "@/store/modules/user";
|
||||
export default {
|
||||
name: "PitSurveyPoint",
|
||||
components: {
|
||||
|
|
@ -77,6 +76,8 @@ export default {
|
|||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: null,
|
||||
subDeptId: null,
|
||||
name: null,
|
||||
},
|
||||
// 表单参数
|
||||
|
|
@ -84,9 +85,14 @@ export default {
|
|||
// 表单校验
|
||||
rules: {
|
||||
},
|
||||
userStore: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.userStore = useUserStore();
|
||||
this.queryParams.projectId = this.userStore.currentPrjId;
|
||||
this.queryParams.subDeptId = this.userStore.currentComId;
|
||||
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<span v-for="(it,idx) in pts" :key="idx" class="pt-item"
|
||||
v-move
|
||||
:style="'top:'+it.y+'px;left:'+it.x+'px;'">
|
||||
<i class="el-icon-location-outline pt-icon" ></i>
|
||||
<el-icon class="pt-icon"><Location /></el-icon>
|
||||
<span class="pt-name">{{ it.name }}</span>
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -20,10 +20,10 @@
|
|||
|
||||
<script>
|
||||
import {updatePitSurveyPoint } from "@/api/device/pitSurveyPoint";
|
||||
import axios from 'axios'
|
||||
import axios from 'axios'
|
||||
export default {
|
||||
name: 'RuoyiUiPitImageDrawer',
|
||||
data() {
|
||||
name: 'RuoyiUiPitImageDrawer',
|
||||
data() {
|
||||
return {
|
||||
isOpen:false,
|
||||
pts:null,
|
||||
|
|
@ -112,6 +112,8 @@
|
|||
text-align: center;
|
||||
font-size: 24px;
|
||||
text-shadow: 1px 1px 0px #F3E5F5;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
.pt-name{
|
||||
display: block;
|
||||
|
|
|
|||
|
|
@ -14,27 +14,39 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" size="small" @click="handleQuery">
|
||||
<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-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd"
|
||||
v-hasPermi="['device:pitThreshold:add']">新增</el-button>
|
||||
<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 icon="el-icon-edit" size="small" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['device:pitThreshold:edit']">修改</el-button>
|
||||
<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 icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['device:pitThreshold:remove']">删除</el-button>
|
||||
<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 icon="el-icon-download" size="small" @click="handleExport"
|
||||
v-hasPermi="['device:pitThreshold:export']">导出</el-button>
|
||||
<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>
|
||||
|
|
@ -49,10 +61,14 @@
|
|||
<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 icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['device:pitThreshold:edit']">修改</el-button>
|
||||
<el-button size="small" type="danger" text icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['device:pitThreshold:remove']">删除</el-button>
|
||||
<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-column>
|
||||
</el-table>
|
||||
|
|
@ -98,7 +114,7 @@
|
|||
<script>
|
||||
import { listPitThreshold, getPitThreshold, delPitThreshold, addPitThreshold, updatePitThreshold } from "@/api/device/pitThreshold";
|
||||
import { queryUnitList, findMyProjectList } from "@/api/publics";
|
||||
|
||||
import useUserStore from "@/store/modules/user";
|
||||
export default {
|
||||
name: "PitThreshold",
|
||||
data() {
|
||||
|
|
@ -135,9 +151,13 @@ export default {
|
|||
},
|
||||
projectOptions: [],
|
||||
depts: [],
|
||||
userStore: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.userStore = useUserStore();
|
||||
this.queryParams.projectId = this.userStore.currentPrjId;
|
||||
this.queryParams.subDeptId = this.userStore.currentComId;
|
||||
this.getList();
|
||||
this.init();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ import createSetupExtend from "./setup-extend";
|
|||
import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
|
||||
import VueJsx from "@vitejs/plugin-vue-jsx";
|
||||
import Components from "unplugin-vue-components/vite";
|
||||
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
|
||||
|
||||
export default function createVitePlugins(viteEnv, isBuild = false) {
|
||||
const vitePlugins = [VueJsx(), vue()];
|
||||
vitePlugins.push(createAutoImport());
|
||||
|
|
@ -15,13 +17,17 @@ export default function createVitePlugins(viteEnv, isBuild = false) {
|
|||
vitePlugins.push(createSvgIcon(isBuild));
|
||||
vitePlugins.push(
|
||||
AutoImport({
|
||||
resolvers: [AntDesignVueResolver()],
|
||||
resolvers: [
|
||||
AntDesignVueResolver(),
|
||||
ElementPlusResolver()
|
||||
],
|
||||
})
|
||||
);
|
||||
vitePlugins.push(
|
||||
Components({
|
||||
resolvers: [
|
||||
AntDesignVueResolver({ importStyle: false, resolveIcons: false }),
|
||||
ElementPlusResolver()
|
||||
],
|
||||
})
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue