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