Browse Source

新增敏感词

wangqin
hui 10 months ago
parent
commit
e5cb35e35b
  1. 20
      ruoyi-ui/src/common/menuData.js
  2. 0
      ruoyi-ui/src/views/JiHeExpressway/pages/datav/maintainQuery/assets/online_bj.jpg
  3. 0
      ruoyi-ui/src/views/JiHeExpressway/pages/datav/maintainQuery/index.vue
  4. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue
  5. 118
      ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/components/AddNEditDialog.vue
  6. 17
      ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/data.js
  7. 205
      ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/index.vue
  8. 4
      ruoyi-ui/vue.config.js

20
ruoyi-ui/src/common/menuData.js

@ -59,7 +59,7 @@ export default [
component: "control/event/dispatch/index.vue",
},
{
title: "感知事件",
title: "事件列表",
path: "/control/event/event",
name: "controlEventEvent",
component: "control/event/event/index.vue",
@ -115,12 +115,6 @@ export default [
name: "statisticalAnalysis",
path: "/maintain/statisticalAnalysis",
component: "maintenanceOperations/statisticalAnalysis/index.vue",
},
{
title: "设备查询",
name: "maintainQuery",
path: "/maintain/maintainQuery",
component: "maintenanceOperations/maintainQuery/index.vue",
}
]
},
@ -137,6 +131,12 @@ export default [
path: "/service/board",
component: "service/board/index.vue",
},
{
title: "情报板敏感词",
name: "sensitive",
path: "/service/sensitive",
component: "service/sensitive/index.vue",
},
{
title: "发布渠道管理",
name: "PublishingChannelManagement",
@ -182,6 +182,12 @@ export default [
path: "/datav/gisAndBim",
component: "datav/gisAndBim/index.vue",
},
{
title: "数字路网",
name: "maintainQuery",
path: "/datav/maintainQuery",
component: "datav/maintainQuery/index.vue",
}
],
},
{

0
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/maintainQuery/assets/online_bj.jpg → ruoyi-ui/src/views/JiHeExpressway/pages/datav/maintainQuery/assets/online_bj.jpg

Before

Width:  |  Height:  |  Size: 403 KiB

After

Width:  |  Height:  |  Size: 403 KiB

0
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/maintainQuery/index.vue → ruoyi-ui/src/views/JiHeExpressway/pages/datav/maintainQuery/index.vue

2
ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue

@ -621,7 +621,7 @@ export default {
____onDeleteBoardItem(index) {
if (index > -1) {
this.selectedBdMsg.splice(index, 1)
this.$message.success('删除成功,发布后生效。')
this.$message.success('删除成功。')
}
},

118
ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/components/AddNEditDialog.vue

@ -0,0 +1,118 @@
<template>
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增'">
<div class='AddNEditDialog'>
<Form :value="formData" class="form" ref="FormConfigRef" :formList="formList" column="1" labelWidth="120px" />
</div>
<template #footer>
<Button style="background-color: rgba(0, 179, 204, .3);" @click.native="modelVisible = false, submitting = false">
取消
</Button>
<Button @click.native="handleSubmit" :loading="submitting">
确定
</Button>
</template>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import Form from '@screen/components/FormConfig';
import request from "@/utils/request";
import { Message } from "element-ui";
import { addEditFormList } from "./../data"
import { stakeMarkToArray, findPathIdByTreeId } from "@screen/utils/index.js"
export default {
name: 'AddNEditDialog',
components: {
Dialog,
Button,
Form
},
model: {
prop: 'visible',
event: "update:value"
},
props: {
visible: Boolean,
data: Object
},
data() {
return {
submitting: false,
formData: {},
formList: addEditFormList
}
},
computed: {
modelVisible: {
get() {
return this.visible
},
set(val) {
this.$emit('update:value', val)
}
}
},
watch: {
modelVisible: {
immediate: true,
handler(bool) {
if (!bool) return;
this.formData = !this.data ? {} : {
...this.data
}
}
}
},
methods: {
handleSubmit() {
this.$refs.FormConfigRef.validate()
.then((data) => {
this.submitting = true;
if (this.data) data.id = this.data.id;
request({
url: `/business/dcInfoBoardVocabulary`,
method: this.data ? 'PUT' : 'POST',
data
})
.then(result => {
if (result.code != 200) return Message.error(`提交失败!`);
Message.success(`提交成功!`);
this.$emit("afterSubmit");
this.modelVisible = false;
})
.catch((err) => {
console.log("%c [ err ]-110-「DeviceControlDialog.vue」", "font-size:15px; background:#547bf2; color:#98bfff;", err);
Message.error(`提交失败!`);
})
.finally(() => {
this.submitting = false;
})
})
}
},
}
</script>
<style lang='scss' scoped>
.AddNEditDialog {
width: 450px;
display: flex;
flex-direction: column;
gap: 15px;
.tips {
font-size: 12px;
}
}
</style>

17
ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/data.js

@ -0,0 +1,17 @@
import { cloneDeep, merge } from "lodash";
import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js";
export const searchFormList = [
{
label: "关键词:",
key: "word",
}
];
export const addEditFormList = [
{
label: "关键词:",
key: "word",
required: true,
}
];

205
ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/index.vue

@ -0,0 +1,205 @@
<template>
<div class='sensitiveWord'>
<div class="filter">
<div>
<ButtonGradient @click.native="handleAddEdit(true)">
<template #prefix>
<img src="@screen/images/insert.svg" />
</template>
新增
</ButtonGradient>
<ButtonGradient @click.native="handleExport">
<template #prefix>
<img src="@screen/images/export.svg" />
</template>
导出
</ButtonGradient>
<ButtonGradient @click.native="getData">
<template #prefix>
<img src="@screen/images/refresh.svg" />
</template>
刷新
</ButtonGradient>
</div>
<InputSearch style="width: 402px;" :formList="searchFormList" :formConfigOptions="{ labelWidth: '90px' }"
@handleSearch="handleSearch" />
</div>
<div class="body">
<Empty v-if="!data.length && !isFirst" class="no-data" style="position: absolute">暂无数据</Empty>
<template v-else>
<div class="cardBox" v-for="(item, index) in data" :key="index">
<Card :buttonIcon="null" :keyMap="keyMap" :cardData="item" class="card"
buttonText="详情">
<template #form-word="{ data }">
<div class="keyword">
{{ data.word }}
</div>
</template>
<template #button>
<Button @click.native="() => handleAddEdit(true, item)">
修改
</Button>
<Button style="background-color: #FF5F5F;" @click.native="handleDelete(item)">
删除
</Button>
</template>
</Card>
</div>
</template>
</div>
<AddNEditDialog v-model="isShowDialog" :data="dialogData" @afterSubmit = "getData" />;
</div>
</template>
<script>
import Card from "@screen/components/Card1/index.vue"
import AddNEditDialog from "./components/AddNEditDialog.vue"
import InputSearch from '@screen/components/InputSearch/index.vue';
import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue';
import Button from '@screen/components/Buttons/Button.vue';
import { searchFormList } from "./data";
import request from "@/utils/request";
import { setLoading } from "@screen/utils/index.js"
import { delay, exportFile, confirm } from "@screen/utils/common";
import { Message } from "element-ui";
//
export default {
name: 'sensitiveWord',
components: {
Card,
ButtonGradient,
InputSearch,
AddNEditDialog,
Button
},
data() {
return {
searchFormList,
keyMap: [
{
key: "word",
label: "关键词"
},
{
key: "location",
label: "id"
},
{
key: "createTime",
label: "创建时间"
}
],
data: [],
dialogData: null,
isShowDialog: false,
isFirst: true
}
},
created() {
this.getData();
// this.getSearchOptions();
},
methods: {
getSearchData() {
let result = {
...this.searchData,
};
if(!result.word){
result = {};
}
return result
},
async handleDelete(data) {
await confirm({ message: "是否要删除该辖段信息?" });
request({
url: `/business/roadSection/${data.id}`,
method: "DELETE",
data: {}
})
.then(result => {
if (result.code != 200) return Message.error("删除失败");
Message.success("删除成功")
})
.catch(() => {
Message.error("删除失败")
})
},
handleAddEdit(bool, data) {
this.isShowDialog = bool;
this.dialogData = data;
},
handleExport() {
exportFile({
url: "/business/roadSection/export",
filename: "管辖路段",
data: this.getSearchData()
});
},
handleSearch(data) {
this.searchData = data;
this.getData();
},
async getData() {
const closeLoading = setLoading();
await delay(150);
request({
url: `/business/dcInfoBoardVocabulary/list`,
method: "get",
params: this.getSearchData()
}).then(result => {
if (result.code != 200) return;
this.data = result.rows;
// this.data = [
// ...result.rows,...result.rows, ...result.rows, ...result.rows, ...result.rows, ...result.rows, ...result.rows, ...result.rows, ...result.rows, ...result.rows, ...result.rows
// , ...result.rows, ...result.rows, ...result.rows, ...result.rows, ...result.rows, ...result.rows, ...result.rows, ...result.rows, ...result.rows, ...result.rows
// ];
Array.from(result.rows);
}).finally(() => {
this.isFirst = false;
closeLoading();
})
}
}
}
</script>
<style lang='scss' scoped>
.sensitiveWord {
padding: 20px;
display: flex; flex-direction: column;
.filter {
height: 60px;
display: flex;
justify-content: space-between;
align-items: center;
div {
display: flex;
gap: 6px;
}
}
.body {
height: 0; flex: 1; overflow-y: scroll;
display: flex; flex-wrap: wrap; align-items: flex-start;
.cardBox{
flex-basis: percentage(1/7); width: 0; padding-right: 10px; padding-bottom: 10px;
}
.keyword {
font-size: 14px;
font-weight: bold;
color: #00B3CC;
}
}
}
</style>

4
ruoyi-ui/vue.config.js

@ -49,9 +49,9 @@ module.exports = {
// target: `http://10.0.81.202:8087`, //现场后台
// target: `http://10.0.81.204:8087`, //现场后台 刘文阁
// target: `http://10.168.69.255:8087`, //正晨后台 连现场物联 刘文阁
// target: `http://10.168.78.135:8087`, //王钦
target: `http://10.168.78.135:8087`, //王钦
// target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2
target: `http://10.168.68.42:8087`, //王思祥
// target: `http://10.168.68.42:8087`, //王思祥
changeOrigin: true,
pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "",

Loading…
Cancel
Save