Browse Source

Merge remote-tracking branch 'origin/release-sy-v1.0.0'

# Conflicts:
#	.env.production
#	src/views/dike/runManage/supervisionInspetion/statisticAnalysis/index.vue
master_tdsql
zth 2 months ago
parent
commit
795264c24b
  1. 5
      .env.development
  2. 7
      .env.production
  3. 11
      deploy/Dockerfile
  4. 14
      deploy/nginx.conf.tmpl
  5. 84
      src/views/aiSupervision/fourPredictions/warnInfo/index.vue
  6. 9
      src/views/components/SyMixMap.vue
  7. 12
      src/views/dike/runManage/enginerring/inspectionRouteManage/components/RouteDetail.vue
  8. 3
      src/views/dike/runManage/supervisionInspetion/index.vue
  9. 154
      src/views/dike/runManage/supervisionInspetion/statisticAnalysis/components/Pie.vue
  10. 2
      src/views/dike/runManage/supervisionInspetion/statisticAnalysis/index.vue
  11. 4
      src/views/reservoir/safeOperation/index.vue
  12. 4
      src/views/sluice/runManage/enginerring/inspectionRouteManage/components/RouteDetail.vue
  13. 2
      vue.config.js

5
.env.development

@ -1,11 +1,14 @@
# 开发环境配置 # 开发环境配置
ENV = 'development' ENV = 'development'
# 服务路径
VUE_APP_BASE_URL = /
# 开发环境 # 开发环境
# VUE_APP_BASE_API = 'http://192.168.1.113:8081/data-admin/' # VUE_APP_BASE_API = 'http://192.168.1.113:8081/data-admin/'
# VUE_APP_BASE_API = 'http://192.168.1.20:19084/data-admin/' # VUE_APP_BASE_API = 'http://192.168.1.20:19084/data-admin/'
VUE_APP_BASE_API = '/thinking' VUE_APP_BASE_API = /thinking
VUE_APP_FAST_BASE_URL = 'http://192.168.1.20:9080/' VUE_APP_FAST_BASE_URL = 'http://192.168.1.20:9080/'

7
.env.production

@ -1,6 +1,9 @@
# 生产环境配置 # 生产环境配置
ENV = 'admin' ENV = 'admin'
# 服务路径
VUE_APP_BASE_URL = /sgcyy-slgcyxgl
# 若依管理系统/生产环境 # 若依管理系统/生产环境
VUE_APP_BASE_API = '/sgcyy-slgcyxgl/thinking' VUE_APP_BASE_API = ${VUE_APP_BASE_URL}/thinking
VUE_APP_FAST_BASE_URL = 'http://192.168.1.20:9080/' VUE_APP_FAST_BASE_URL = http://192.168.1.20:9080/

11
deploy/Dockerfile

@ -6,11 +6,12 @@ COPY . /root
# yum install -y devtoolset-8-gcc devtoolset-8-gcc-c++ && \ # yum install -y devtoolset-8-gcc devtoolset-8-gcc-c++ && \
# source /opt/rh/devtoolset-8/enable && \ # source /opt/rh/devtoolset-8/enable && \
RUN yarn config set strict-peer-dependencies false && \ RUN yarn config set strict-peer-dependencies false && \
yarn config set sass_binary_site https://npmmirror.com/mirrors/node-sass && \ yarn config set ignore-engines true && \
yarn config set registry http://172.16.32.57:8931/repository/npm-group/ && \ yarn config set sass_binary_site https://npmmirror.com/mirrors/node-sass && \
yarn cache clean && \ yarn config set registry http://172.16.32.57:8931/repository/npm-group/ && \
yarn install --verbose && \ yarn cache clean && \
yarn run build yarn install --verbose && \
yarn run build
# Second stage: minimal runtime environment # Second stage: minimal runtime environment
FROM registry.datameta.com:8180/public/nginx:1.25-alpine FROM registry.datameta.com:8180/public/nginx:1.25-alpine

14
deploy/nginx.conf.tmpl

@ -47,9 +47,14 @@ http {
charset utf-8; charset utf-8;
client_max_body_size ${NGINX_MAX_BODY_SIZE}; client_max_body_size ${NGINX_MAX_BODY_SIZE};
location /mobileH5 {
return 301 http://shuili-h5.product.dev.com:30115?$args;
}
location / { location / {
root /usr/share/nginx/html; root /usr/share/nginx/html;
index index.html index.htm; index index.html index.htm;
try_files $uri $uri/ /index.html;
} }
error_page 500 502 503 504 /50x.html; error_page 500 502 503 504 /50x.html;
@ -70,7 +75,14 @@ http {
rewrite ^/thinking/(.*)$ /tianhui-admin-web/$1 break; rewrite ^/thinking/(.*)$ /tianhui-admin-web/$1 break;
proxy_pass ${API_SERVER}; proxy_pass ${API_SERVER};
} }
location /sgcyy-slgcyxgl/api {
rewrite ^/sgcyy-slgcyxgl/api/(.*)$ /tianhui-admin-web/$1 break;
proxy_pass ${API_SERVER};
}
location /sgcyy-slgcyxgl/thinking {
rewrite ^/sgcyy-slgcyxgl/thinking/(.*)$ /tianhui-admin-web/$1 break;
proxy_pass ${API_SERVER};
}
} }
} }

84
src/views/aiSupervision/fourPredictions/warnInfo/index.vue

@ -1,4 +1,3 @@
<!-- 预警预报信息管理 --> <!-- 预警预报信息管理 -->
<script> <script>
import { getAreasData } from "@/api/areas/index"; import { getAreasData } from "@/api/areas/index";
@ -6,7 +5,7 @@ import { ENGINTYPE, TABELLIST } from "../const";
let that; let that;
export default { export default {
name: "warnInfo", name: "warnInfo",
data() { data () {
return { return {
searchForm: { searchForm: {
enginType: "1", enginType: "1",
@ -28,37 +27,37 @@ export default {
}, },
}; };
}, },
created() { created () {
that = this; that = this;
}, },
filters: { filters: {
// //
filterembankment(price) { filterembankment (price) {
const data = that.enginTypeList.filter((res) => res.dictValue == price); const data = that.enginTypeList.filter((res) => res.dictValue == price);
return data[0] ? data[0].dictLabel : "/"; return data[0] ? data[0].dictLabel : "/";
}, },
}, },
methods: { methods: {
handleGoManage(row) { handleGoManage (row) {
this.$router.push({ this.$router.push({
path: "warnInfoDetail", path: "warnInfoDetail",
query: { id: row.id }, query: { id: row.id },
}); });
}, },
handleCurrentPageChange(page) { handleCurrentPageChange (page) {
this.pageData.pageNum = page; this.pageData.pageNum = page;
this.getTableData(); this.getTableData();
}, },
handlePageSizeChange(pageSize) { handlePageSizeChange (pageSize) {
this.pageData.pageSize = pageSize; this.pageData.pageSize = pageSize;
this.getTableData(); this.getTableData();
}, },
search() { search () {
this.pageData.pageNum = 1; this.pageData.pageNum = 1;
this.getTableData(); this.getTableData();
}, },
// //
resetSearch() { resetSearch () {
this.pageData.pageNum = 1; this.pageData.pageNum = 1;
if (!this.$refs["searchForm"]) return; if (!this.$refs["searchForm"]) return;
this.$refs["searchForm"].resetFields(); this.$refs["searchForm"].resetFields();
@ -66,7 +65,7 @@ export default {
}, },
// //
getTreeData() { getTreeData () {
getAreasData().then((items) => { getAreasData().then((items) => {
this.adcdOptions = items.data; this.adcdOptions = items.data;
if (items?.data) { if (items?.data) {
@ -89,11 +88,11 @@ export default {
} }
}); });
}, },
handleEngin() { handleEngin () {
this.getTableData() this.getTableData()
}, },
// //
getTableData() { getTableData () {
console.log(this.searchForm); console.log(this.searchForm);
const list = TABELLIST.filter(res => { const list = TABELLIST.filter(res => {
let filter = true let filter = true
@ -120,7 +119,7 @@ export default {
this.tableData = list this.tableData = list
} }
}, },
async mounted() { async mounted () {
this.getTreeData() this.getTreeData()
this.getTableData() this.getTableData()
@ -132,44 +131,23 @@ export default {
<div class="slider-right"> <div class="slider-right">
<div class="top-title">预警预报信息管理</div> <div class="top-title">预警预报信息管理</div>
<div class="table-box"> <div class="table-box">
<el-form <el-form inline :model="searchForm" ref="searchForm" class="demo-ruleForm">
inline
:model="searchForm"
ref="searchForm"
class="demo-ruleForm"
>
<el-form-item label="水工程对象类型:" prop="enginType"> <el-form-item label="水工程对象类型:" prop="enginType">
<el-select v-model="searchForm.enginType" @change="handleEngin" placeholder="请选择"> <el-select v-model="searchForm.enginType" @change="handleEngin" placeholder="请选择">
<el-option <el-option v-for="item in enginTypeList" :label="item.dictLabel" :value="item.dictValue"
v-for="item in enginTypeList" :key="item.id"></el-option>
:label="item.dictLabel"
:value="item.dictValue"
:key="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="行政区划" prop="adcd"> <el-form-item label="行政区划" prop="adcd">
<el-cascader <el-cascader :options="areasOptions" v-model="searchForm.adcd" :props="areasOptionProps" placeholder="请选择行政区划"
:options="areasOptions" clearable size="small">
v-model="searchForm.adcd"
:props="areasOptionProps"
placeholder="请选择行政区划"
clearable
size="small"
>
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
<el-form-item prop="value"> <el-form-item prop="value">
<el-input <el-input v-model="searchForm.value" class="search-input" placeholder="请输入水工程名称或者编号"></el-input>
v-model="searchForm.value"
class="search-input"
placeholder="请输入水工程名称或者编号"
></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button class="search-btn" type="success" @click="search" <el-button class="search-btn" type="success" @click="search">查询</el-button>
>查询</el-button
>
<el-button @click="resetSearch">重置</el-button> <el-button @click="resetSearch">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -198,27 +176,15 @@ export default {
</el-table-column> </el-table-column>
<el-table-column prop="address" align="center" label="操作"> <el-table-column prop="address" align="center" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button style="margin-right: 16px" @click="handleGoManage(scope.row)" type="text"
style="margin-right: 16px" size="small">预报预警信息管理</el-button>
@click="handleGoManage(scope.row)"
type="text"
size="small"
>预报预警信息管理</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination background class="pagination" style="margin-top: 16px; margin-right: 16px; float: right"
background :current-page="pageData.pageNum" :page-sizes="pageData.pageSizes"
class="pagination" layout="total, prev, pager, next, sizes, jumper" :total="pageData.total"
style="margin-top: 16px; margin-right: 16px; float: right" @current-change="(e) => handleCurrentPageChange(e)" @size-change="(e) => handlePageSizeChange(e)">
:current-page="pageData.pageNum"
:page-sizes="pageData.pageSizes"
layout="total, prev, pager, next, sizes, jumper"
:total="pageData.total"
@current-change="(e) => handleCurrentPageChange(e)"
@size-change="(e) => handlePageSizeChange(e)"
>
</el-pagination> </el-pagination>
</div> </div>
</div> </div>

9
src/views/components/SyMixMap.vue

@ -105,6 +105,7 @@ export default {
}, },
data() { data() {
return { return {
baseUrl: process.env.BASE_URL,
defaultHeight: 50000, defaultHeight: 50000,
defaultLineWidth: 6, defaultLineWidth: 6,
isFullScreen: false, isFullScreen: false,
@ -265,7 +266,7 @@ export default {
entries.graphicsList.forEach(item=>{ entries.graphicsList.forEach(item=>{
let graphicItem let graphicItem
if(item.type === 'billboard'){ if(item.type === 'billboard'){
graphicItem = new sycim.Billboard(item.position, `/icons/${item.icon}`); graphicItem = new sycim.Billboard(item.position, `${this.baseUrl}icons/${item.icon}`);
graphicItem.setStyle({ graphicItem.setStyle({
canEdit: this.canEdit, canEdit: this.canEdit,
horizontalOrigin: sycim.HorizontalOrigin.CENTER, horizontalOrigin: sycim.HorizontalOrigin.CENTER,
@ -309,7 +310,7 @@ export default {
draw(type, iconName){ draw(type, iconName){
let plotOptions = { let plotOptions = {
scale: 1, scale: 1,
image: `/icons/${iconName}`, image: `${this.baseUrl}icons/${iconName}`,
material: sycim.Cesium.Color.fromCssColorString('#36B29E'), material: sycim.Cesium.Color.fromCssColorString('#36B29E'),
horizontalOrigin: sycim.HorizontalOrigin.CENTER, horizontalOrigin: sycim.HorizontalOrigin.CENTER,
verticalOrigin: sycim.VerticalOrigin.BOTTOM, verticalOrigin: sycim.VerticalOrigin.BOTTOM,
@ -326,7 +327,7 @@ export default {
if (graphic) { if (graphic) {
let graphicItem let graphicItem
if(type === 'billboard'){ if(type === 'billboard'){
graphicItem = new sycim.Billboard(graphic.position, `/icons/${iconName}`); graphicItem = new sycim.Billboard(graphic.position, `${this.baseUrl}icons/${iconName}`);
graphicItem.setStyle({ graphicItem.setStyle({
canEdit: true, canEdit: true,
horizontalOrigin: sycim.HorizontalOrigin.CENTER, horizontalOrigin: sycim.HorizontalOrigin.CENTER,
@ -385,7 +386,7 @@ export default {
let graphicItem let graphicItem
if (type === 'billboard') { if (type === 'billboard') {
// //
graphicItem = new sycim.Billboard(position, `/mobileH5/icons/${iconName}`) graphicItem = new sycim.Billboard(position, `${this.baseUrl}icons/${iconName}`)
graphicItem.setStyle({ graphicItem.setStyle({
canEdit: false, canEdit: false,
horizontalOrigin: sycim.HorizontalOrigin.CENTER, horizontalOrigin: sycim.HorizontalOrigin.CENTER,

12
src/views/dike/runManage/enginerring/inspectionRouteManage/components/RouteDetail.vue

@ -112,7 +112,11 @@
:class="{ 'cursor-not-allowed': !canEdit }" :class="{ 'cursor-not-allowed': !canEdit }"
@click="handleDraw('billboard', 'pos_start.svg')" @click="handleDraw('billboard', 'pos_start.svg')"
> >
<img class="icon" :src="`${baseUrl}/icons/pos_start.svg`" alt="" /> <img
class="icon"
:src="`${baseUrl}icons/pos_start.svg`"
alt=""
/>
设定起点 设定起点
</div> </div>
<div <div
@ -120,7 +124,11 @@
:class="{ 'cursor-not-allowed': !canEdit }" :class="{ 'cursor-not-allowed': !canEdit }"
@click="handleDraw('billboard', 'pos_end.svg')" @click="handleDraw('billboard', 'pos_end.svg')"
> >
<img class="icon" :src="`${baseUrl}/icons/pos_end.svg`" alt="" /> <img
class="icon"
:src="`${baseUrl}icons/pos_end.svg`"
alt=""
/>
设定终点 设定终点
</div> </div>
<div <div

3
src/views/dike/runManage/supervisionInspetion/index.vue

@ -0,0 +1,3 @@
<template>
<router-view />
</template>

154
src/views/dike/runManage/supervisionInspetion/statisticAnalysis/components/Pie.vue

@ -0,0 +1,154 @@
<template>
<div class="pie-component">
<div class="title">{{ title }}</div>
<div ref="pieEle" class="canvas"></div>
</div>
</template>
<script>
import * as echarts from "echarts";
export default {
data() {
return {
myChart: null,
};
},
props: {
title: {
type: String,
default: "",
},
echartsTitle: {
type: String,
default: "",
},
itemData: {
type: Array,
default: () => [],
},
},
mounted() {
this.initEcharts();
},
watch: {
itemData() {
this.initEcharts();
},
},
methods: {
initEcharts() {
const colorList = ["#28CE8E", "#165DFF", "#FFAB00", "#F86220"];
let sum = 0;
let seriesData = this.itemData.map((item, index) => {
if (!isNaN(item.value)) sum += item.value;
return {
name: item.text,
value: item.value,
itemStyle: {
color: colorList[index],
},
};
});
if (!this.myChart) {
this.myChart = echarts.init(this.$refs.pieEle);
}
let option = {
title: {
left: "29%",
top: "38%",
text: sum,
textAlign: "center",
textStyle: {
fontSize: 18,
fontWeight: "bold",
textAlign: "center",
color: "#333",
},
subtext: this.echartsTitle,
subtextStyle: {
fontSize: 14,
textAlign: "center",
color: "#666",
},
},
legend: {
// type: "scroll",
orient: "vertical",
left: "60%",
top: 20,
bottom: 20,
data: seriesData,
formatter: function (name) {
return `{a|${name}}\n{b|${
seriesData.find((item) => item.name === name).value
}}`;
},
itemWidth: 4,
itemHeight: 50,
itemGap: 25,
itemStyle: {
borderJoin: "round",
},
textStyle: {
fontSize: 16,
rich: {
a: {
fontSize: 12,
lineHeight: 20,
},
b: {
fontSize: 18,
fontWeight: "bold",
},
},
},
label: {},
},
tooltip: {
trigger: "item",
},
series: [
{
name: "",
type: "pie",
radius: ["50%", "75%"],
center: ["30%", "50%"],
label: {
show: false,
position: "center",
},
emphasis: {
label: {
show: false,
fontSize: 16,
fontWeight: "bold",
},
},
labelLine: {
show: false,
},
data: seriesData,
},
],
};
this.myChart.setOption(option);
},
},
};
</script>
<style scoped lang="scss">
.pie-component {
border: 1px solid #e5e5e5;
border-radius: 5px;
.title {
padding: 10px;
border-bottom: 1px solid #e5e5e5;
}
.canvas {
width: 500px;
height: 200px;
padding: 10px;
}
}
</style>

2
src/views/dike/runManage/supervisionInspetion/statisticAnalysis/index.vue

@ -5,7 +5,7 @@ import {
getSuperviseStatisticTotal, getSuperviseStatisticTotal,
} from "@/api/dike"; } from "@/api/dike";
import { getAreasData } from "@/api/areas"; import { getAreasData } from "@/api/areas";
// import Pie from "./components/Pie.vue"; import Pie from "./components/Pie.vue";
import { cascaderLazyLoad } from "@/utils/elUtils"; import { cascaderLazyLoad } from "@/utils/elUtils";
export default { export default {

4
src/views/reservoir/safeOperation/index.vue

@ -41,7 +41,7 @@
> >
<template #default="{ node, data }"> <template #default="{ node, data }">
<div class="flex items-center"> <div class="flex items-center">
<span>{{ data.text }}</span> <span>{{ data.nameCn || data.text }}</span>
<img <img
v-if="checkList.find((v) => v === data.id)" v-if="checkList.find((v) => v === data.id)"
class="my-icon ml-4" class="my-icon ml-4"
@ -125,7 +125,7 @@ export default {
showTreeBox: false, showTreeBox: false,
defaultProps: { defaultProps: {
children: "layers", children: "layers",
label: "text", label: "nameCn",
}, },
layerList: [], layerList: [],
checkList: [], checkList: [],

4
src/views/sluice/runManage/enginerring/inspectionRouteManage/components/RouteDetail.vue

@ -114,7 +114,7 @@
> >
<img <img
class="icon" class="icon"
:src="`${baseUrl}/icons/pos_start.svg`" :src="`${baseUrl}icons/pos_start.svg`"
alt="" alt=""
/> />
设定起点 设定起点
@ -126,7 +126,7 @@
> >
<img <img
class="icon" class="icon"
:src="`${baseUrl}/icons/pos_end.svg`" :src="`${baseUrl}icons/pos_end.svg`"
alt="" alt=""
/> />
设定终点 设定终点

2
vue.config.js

@ -18,7 +18,7 @@ module.exports = {
// 部署生产环境和开发环境下的URL。 // 部署生产环境和开发环境下的URL。
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
publicPath: "./", publicPath: process.env.VUE_APP_BASE_URL || '/',
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
outputDir: "dist", outputDir: "dist",
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)

Loading…
Cancel
Save