fix:预警中心-图例设置修改
This commit is contained in:
parent
453e7a64e9
commit
f475aa4656
27
nginx.conf
27
nginx.conf
@ -1,5 +1,5 @@
|
||||
|
||||
|
||||
http {
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
@ -23,5 +23,30 @@
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
},
|
||||
server {
|
||||
listen 8082;
|
||||
server_name localhost;
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
location /prod-api/ {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header REMOTE-HOST $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://192.168.50.208:8080/;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -104,8 +104,15 @@ store.watch(
|
||||
() => store.getters.token,
|
||||
(newToken) => {
|
||||
if (newToken) {
|
||||
if (window.location.port === ""||window.location.port === 80) {
|
||||
// 内网
|
||||
wsService.connect(`ws://${window.location.hostname}:8080/websocket?token=${newToken}`);
|
||||
}else{
|
||||
// 外网
|
||||
wsService.connect(`ws://${window.location.hostname}:18080/websocket?tsoken=${newToken}`);
|
||||
}
|
||||
// 本地
|
||||
wsService.connect(`ws://localhost:8080/websocket?token=${newToken}`);
|
||||
// wsService.connect(`ws://localhost:8080/websocket?token=${newToken}`);
|
||||
// 内网
|
||||
// wsService.connect(`ws://10.60.5.83:8080/websocket?token=${newToken}`);
|
||||
// 外网
|
||||
|
||||
@ -0,0 +1,185 @@
|
||||
<!--
|
||||
* @Author: SunTao 328867980@qq.com
|
||||
* @Date: 2024-12-17 13:35:37
|
||||
* @LastEditors: SunTao 328867980@qq.com
|
||||
* @LastEditTime: 2024-12-17 14:18:26
|
||||
* @FilePath: \znxjxt-ui\src\views\xj\inspection-warn\warning-line\components\edit-line.vue
|
||||
* @Description: 图例设置-编辑弹窗
|
||||
-->
|
||||
<template>
|
||||
<div class="edit-content">
|
||||
<el-form
|
||||
class="editForm"
|
||||
ref="warningLineForm"
|
||||
:model="warningLineForm"
|
||||
:rules="rules"
|
||||
label-width="7rem"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="病害名称:" prop="defectTypeName">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="warningLineForm.defectTypeName"
|
||||
placeholder="请输入病害名称"
|
||||
/>
|
||||
</el-form-item> </el-col
|
||||
></el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="范围一:" prop="s1">
|
||||
<el-input v-model="warningLineForm.s1" placeholder="请输入数字">
|
||||
<template slot="prepend">>=</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col></el-row
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="范围二:" prop="s2">
|
||||
<el-input v-model="warningLineForm.s2" placeholder="请输入数字"
|
||||
><template slot="prepend">>=</template></el-input
|
||||
>
|
||||
</el-form-item>
|
||||
</el-col></el-row
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="范围三:" prop="s3">
|
||||
<el-input v-model="warningLineForm.s3" placeholder="请输入数字"
|
||||
><template slot="prepend">>=</template></el-input
|
||||
>
|
||||
</el-form-item>
|
||||
</el-col></el-row
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="范围四:" prop="s4">
|
||||
<el-input v-model="warningLineForm.s4" placeholder="请输入数字"
|
||||
><template slot="prepend">>=</template></el-input
|
||||
>
|
||||
</el-form-item>
|
||||
</el-col></el-row
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="范围五:" prop="s5">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="warningLineForm.s5"
|
||||
placeholder="请输入病害名称"
|
||||
><template slot="prepend">>=</template></el-input
|
||||
>
|
||||
</el-form-item>
|
||||
</el-col></el-row
|
||||
>
|
||||
</el-form>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "EditLine",
|
||||
props: {
|
||||
dialogItem: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 表单数据
|
||||
warningLineForm: {
|
||||
defectTypeName: "",
|
||||
s5: 0,
|
||||
},
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
s1: [
|
||||
{ required: true, message: "请输入范围一", trigger: "blur" },
|
||||
{
|
||||
pattern: /^(0|[1-9]\d*(\.\d+)?)$/,
|
||||
message: "请输入非负数",
|
||||
},
|
||||
],
|
||||
s2: [
|
||||
{ required: true, message: "请输入范围二", trigger: "blur" },
|
||||
{
|
||||
pattern: /^(0|[1-9]\d*(\.\d+)?)$/,
|
||||
message: "请输入非负数",
|
||||
},
|
||||
],
|
||||
s3: [
|
||||
{ required: true, message: "请输入范围三", trigger: "blur" },
|
||||
{
|
||||
pattern: /^(0|[1-9]\d*(\.\d+)?)$/,
|
||||
message: "请输入非负数",
|
||||
},
|
||||
],
|
||||
s4: [
|
||||
{ required: true, message: "请输入范围四", trigger: "blur" },
|
||||
{
|
||||
pattern: /^(0|[1-9]\d*(\.\d+)?)$/,
|
||||
message: "请输入非负数",
|
||||
},
|
||||
],
|
||||
s5: [
|
||||
{ required: true, message: "请输入范围五", trigger: "blur" },
|
||||
{
|
||||
pattern: /^(0|[1-9]\d*(\.\d+)?)$/,
|
||||
message: "请输入非负数",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
/**
|
||||
* @description: 点击确定事件
|
||||
* @return {*}
|
||||
*/
|
||||
submitForm() {
|
||||
this.$refs.warningLineForm.validate((valid) => {
|
||||
if (valid) {
|
||||
const data = {
|
||||
...this.warningLineForm,
|
||||
id: this.dialogItem.id,
|
||||
};
|
||||
// updateWarnSetup(data).then(({ code, data }) => {
|
||||
// if (code === 200) {
|
||||
// this.$modal.msgSuccess("更新成功");
|
||||
// this.$emit("cancel");
|
||||
// }
|
||||
// });
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* @description: 点击取消事件
|
||||
* @return {*}
|
||||
*/
|
||||
cancel() {
|
||||
this.$emit("cancel");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.edit-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 页脚 */
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
</style>
|
||||
140
src/views/xj/inspection-warn/warning-line/index.vue
Normal file
140
src/views/xj/inspection-warn/warning-line/index.vue
Normal file
@ -0,0 +1,140 @@
|
||||
<!--
|
||||
* @Author: SunTao 328867980@qq.com
|
||||
* @Date: 2024-12-17 09:18:08
|
||||
* @LastEditors: SunTao 328867980@qq.com
|
||||
* @LastEditTime: 2024-12-17 14:20:15
|
||||
* @FilePath: \znxjxt-ui\src\views\xj\inspection-warn\warning-line\index.vue
|
||||
* @Description: 预警中心-大屏图例设置
|
||||
-->
|
||||
<template>
|
||||
<div class="content">
|
||||
<el-table
|
||||
ref="setupTable"
|
||||
:data="warningLineList"
|
||||
v-loading="loading"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="index" label="序号"> </el-table-column>
|
||||
<el-table-column label="病害名称" align="center" prop="defectName" />
|
||||
<el-table-column label="范围一" align="center" prop="s1">
|
||||
<template slot-scope="scope"> >={{ scope.row.s1 }} </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="范围二" align="center" prop="s2">
|
||||
<template slot-scope="scope"> >={{ scope.row.s2 }} </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="范围三" align="center" prop="s3">
|
||||
<template slot-scope="scope"> >={{ scope.row.s3 }} </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="范围四" align="center" prop="s4">
|
||||
<template slot-scope="scope"> >={{ scope.row.s4 }} </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="范围五" align="center" prop="s5">
|
||||
<template slot-scope="scope"> >={{ scope.row.s5 }} </template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-dialog
|
||||
title="图例设置"
|
||||
:visible.sync="editVisible"
|
||||
width="30rem"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
destroy-on-close
|
||||
>
|
||||
<edit-line
|
||||
v-if="editVisible"
|
||||
@cancel="cancel"
|
||||
:dialogItem="dialogItem"
|
||||
></edit-line>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import EditLine from "./components/edit-line.vue";
|
||||
export default {
|
||||
components: { EditLine },
|
||||
name: "WarningLine",
|
||||
data() {
|
||||
return {
|
||||
// 列表加载状态
|
||||
loading: false,
|
||||
// 列表数据
|
||||
warningLineList: [],
|
||||
// 编辑弹窗显隐控制
|
||||
editVisible: false,
|
||||
// 传弹窗数据
|
||||
dialogItem: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* @description: 获取列表数据
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
getList() {
|
||||
this.loading = true;
|
||||
setTimeout(() => {
|
||||
this.warningLineList = [
|
||||
{
|
||||
defectName: "病害名称",
|
||||
s1: "80",
|
||||
s2: "60",
|
||||
s3: "40",
|
||||
s4: "20",
|
||||
s5: "0",
|
||||
},
|
||||
];
|
||||
this.loading = false;
|
||||
}, 500);
|
||||
},
|
||||
|
||||
/**
|
||||
* @description: 列表点击编辑事件
|
||||
* @param {*} val
|
||||
* @return {*}
|
||||
*/
|
||||
handleUpdate(val) {
|
||||
this.editVisible = true;
|
||||
},
|
||||
|
||||
/**
|
||||
* @description: 关闭弹窗事件
|
||||
* @param {*} val
|
||||
* @return {*}
|
||||
*/
|
||||
cancel() {
|
||||
this.editVisible = false;
|
||||
this.dialogItem = {};
|
||||
this.getList();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
width: 100%;
|
||||
height: calc(100vh - 5.4rem);
|
||||
padding: 1rem;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
@ -2,34 +2,60 @@
|
||||
* @Author: SunTao 328867980@qq.com
|
||||
* @Date: 2024-01-08 11:56:02
|
||||
* @LastEditors: SunTao 328867980@qq.com
|
||||
* @LastEditTime: 2024-12-02 15:37:29
|
||||
* @LastEditTime: 2024-12-17 13:44:44
|
||||
* @FilePath: \znxjxt-ui\src\views\xj\inspection-warn\warning-setup\components\add-setup.vue
|
||||
* @Description: 预警中心-预警设置-新增/编辑组件
|
||||
-->
|
||||
<template>
|
||||
<div class="add-setup">
|
||||
<el-form class="addForm" ref="warningSetupForm" :model="warningSetupForm" :rules="rules" label-width="7rem">
|
||||
<el-form
|
||||
class="addForm"
|
||||
ref="warningSetupForm"
|
||||
:model="warningSetupForm"
|
||||
:rules="rules"
|
||||
label-width="8rem"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预警类型" prop="meteringType">
|
||||
<el-select v-model="warningSetupForm.meteringType" placeholder="请选择预警类型" style="width: 100%" clearable
|
||||
@change="changeMeteringType">
|
||||
<el-option v-for="item in meteringList" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-form-item label="预警类型:" prop="meteringType">
|
||||
<el-select
|
||||
v-model="warningSetupForm.meteringType"
|
||||
placeholder="请选择预警类型"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
@change="changeMeteringType"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in meteringList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" v-if="warningSetupForm.meteringType !== '面积'">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预警病害长度" prop="length">
|
||||
<el-input-number v-model="warningSetupForm.length" :min="0" placeholder="请输入预警病害长度" style="width: 100%" />
|
||||
<el-form-item label="预警病害长度:" prop="length">
|
||||
<el-input-number
|
||||
v-model="warningSetupForm.length"
|
||||
:min="0"
|
||||
placeholder="请输入预警病害长度"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" v-if="warningSetupForm.meteringType !== '长度'">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预警病害面积" prop="area">
|
||||
<el-input-number v-model="warningSetupForm.area" :min="0" placeholder="请输入预警病害面积" style="width: 100%" />
|
||||
<el-form-item label="预警病害面积:" prop="area">
|
||||
<el-input-number
|
||||
v-model="warningSetupForm.area"
|
||||
:min="0"
|
||||
placeholder="请输入预警病害面积"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -54,7 +80,7 @@ export default {
|
||||
// 接收父组件传过来的数据
|
||||
dialogItem: {
|
||||
type: Object,
|
||||
default: () => { },
|
||||
default: () => {},
|
||||
},
|
||||
},
|
||||
components: {},
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
* @Author: SunTao 328867980@qq.com
|
||||
* @Date: 2024-01-08 11:56:02
|
||||
* @LastEditors: SunTao 328867980@qq.com
|
||||
* @LastEditTime: 2024-12-05 13:51:04
|
||||
* @LastEditTime: 2024-12-17 13:31:41
|
||||
* @FilePath: \znxjxt-ui\src\views\xj\inspection-warn\warning-setup\index.vue
|
||||
* @Description: 预警中心-预警设置
|
||||
-->
|
||||
@ -143,23 +143,9 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<div class="pagination-part">
|
||||
<el-pagination
|
||||
background
|
||||
:current-page.sync="pagination.page"
|
||||
@current-change="handleCurrentChange"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size.sync="pagination.size"
|
||||
@size-change="handleSizeChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="tableTotal"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
<!-- 新增/编辑弹窗 -->
|
||||
<el-dialog
|
||||
title="新增预警设置"
|
||||
title="预警设置"
|
||||
:visible.sync="addVisible"
|
||||
width="30rem"
|
||||
append-to-body
|
||||
@ -177,7 +163,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDefectList, getWarnSetupList,updateWarnSetup } from "@/api/xj/warnSetup";
|
||||
import {
|
||||
getDefectList,
|
||||
getWarnSetupList,
|
||||
updateWarnSetup,
|
||||
} from "@/api/xj/warnSetup";
|
||||
import AddSetup from "./components/add-setup.vue";
|
||||
export default {
|
||||
name: "WarningSetup",
|
||||
@ -194,15 +184,8 @@ export default {
|
||||
tableDefect: [],
|
||||
// 预警设置列表
|
||||
setupList: [],
|
||||
// 预警设置列表总数
|
||||
tableTotal: 0,
|
||||
// 列表加载状态
|
||||
loading: false,
|
||||
// 分页
|
||||
pagination: {
|
||||
page: 1,
|
||||
size: 10,
|
||||
},
|
||||
// 列表已选数组
|
||||
checkIds: [],
|
||||
// 非多个禁用
|
||||
@ -355,6 +338,7 @@ export default {
|
||||
width: 100%;
|
||||
height: calc(100vh - 5.4rem);
|
||||
padding: 1rem;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.mb8 {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
* @Author: SunTao 328867980@qq.com
|
||||
* @Date: 2024-11-01 17:25:06
|
||||
* @LastEditors: SunTao 328867980@qq.com
|
||||
* @LastEditTime: 2024-12-12 16:30:36
|
||||
* @LastEditTime: 2024-12-17 09:42:12
|
||||
* @FilePath: \znxjxt-ui\src\views\xj\inspection\confirmation-management\components\image-dialog.vue
|
||||
* @Description: 病害确认-影像模式弹窗
|
||||
-->
|
||||
@ -532,14 +532,18 @@ export default {
|
||||
})
|
||||
.then(({ code, msg }) => {
|
||||
if (code === 200) {
|
||||
this.showImage(this.currentIndex);
|
||||
this.defectData.splice(this.currentIndex, 1);
|
||||
// this.currentIndex + 1;
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
} else {
|
||||
this.$modal.msgWarning(msg);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.showImage(this.currentIndex);
|
||||
if (this.defectData.length < 4) {
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user