Commit 9ef88e78 authored by xinzhedeai's avatar xinzhedeai

备战尾矿库 init

parent 461278fc
var ServiceURL = 'http://192.168.3.216:9002';
// var ServiceURL = 'http://192.168.3.216:9002';
var ServiceURL = 'http://192.168.3.166:9003';
window.VUE_APP_API = {ServiceURL:ServiceURL}
Origin
"version": "1.118",更新内容:
预警列表添加解除时间列
......@@ -8,3 +8,6 @@
"version": "1.120",更新内容: 2024/8/10(周六)
为防止环境监测模块名称过长超出边界,添加对设备名称的过滤,只显示设备类型
"version": "1.121",2024/9/29(周日)
更新内容: 对大屏模块添加自动播放控制, 控制字段为 autoplay, 在数据库的 sys_views 表中, true 表示自动播放
\ No newline at end of file
import request from '@/utils/request'
import qs from 'qs'
export function getPhone(params) {
return request({
url: '/data/phone/history',
method: 'get',
params
})
}
export function addPhone(data) {
return request({
url: '/data/phone',
method: 'post',
data
})
}
export function editPhone(data) {
return request({
url: '/data/phone',
method: 'put',
data
})
}
export function delPhone(data) {
return request({
url: '/data/phone',
method: 'delete',
data
})
}
export function getPhoneMsgHis(params) {
return request({
// url: '/data/phoneHistory/history?'+ qs.stringify(params, { indices: false }),
url: '/data/phoneHistory/history',
method: 'get',
params
})
}
\ No newline at end of file
......@@ -3063,7 +3063,7 @@ var reqApis = function () {
}
},
"subitem": {
name: "监测类型", type: 'radio', form: 0, style: "display:block", key: 'name', val: 'value', change: function (val, item) {
name: "监测类型", type: 'radio', form: 0, style:"display:block", key: 'name', val: 'value', change: function (val, item) {
var Dict = this.Dict, info = Dict.baseInfo, iitem = info["subitem"], fitem = this.form.item;
iitem.partName = item.name;
fitem.title = Dict.nameSplitJoint();
......
......@@ -19,7 +19,7 @@
*/
-->
<template>
<Carousel class="cu-slider" indicator-position="none" height="100%" :interval="config.interval">
<Carousel class="cu-slider" indicator-position="outside" height="100%" :interval="config.interval" :autoplay="config.autoplay">
<Carousel-item v-for="(item, i) in list">
<h3><i class="el-icon-s-data"></i>{{item.sumtitle}}</h3>
<!-- 设备信息 -->
......@@ -138,6 +138,7 @@ export default {
},
config:{
interval:6000,
autoplay:true,
},
}
},
......@@ -152,6 +153,7 @@ export default {
methods: {
createViews(item){
this.list = item.children;this.config.interval = item.interval;
(item.autoplay !== void 0) && (this.config.autoplay = item.autoplay);
var carouselCtn = this.$el.firstElementChild;
return new Promise((resolve, reject) => {
this.$nextTick(() => {
......@@ -320,6 +322,6 @@ export default {
}
}
.el-carousel__arrow{display:none;}
//.el-carousel__arrow{display:none;}
}
</style>
\ No newline at end of file
......@@ -49,5 +49,5 @@ module.exports = {
*/
caseNumber: '鲁ICP备09100748号-5',
"version": "1.120"
"version": "1.121"
}
<template>
<div class="common-page qyzz page-t1">
<div class="head-container">
<div class="panel-bottom page-row">
<div class="ctin-box">
<div class="content-within">
<div class="content-fix">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="姓名" prop="name">
<el-input
v-model="queryParams.exact.name"
placeholder="请输入姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="手机号" prop="phone">
<el-input
v-model="queryParams.phone"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item label="发送时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="daterangeChange"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table ref="table" v-loading="loading" :data="dataList" size="small" style="width: 100%;" border >
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="电话" align="center" prop="phone" />
<el-table-column label="时间" align="center" prop="time" />
<el-table-column label="短信内容" align="center" prop="content" width="500"/>
</el-table>
<el-pagination
layout="total, prev, pager, next"
:current-page="queryParams.page"
@current-change="changePage"
@size-change="changeSize"
:total="total"
:page-size="10"
>
</el-pagination>
</div>
</div></div></div>
</div>
</div>
</template>
<script>
import { getPhoneMsgHis } from '@/api/alarmMsg'
export default {
name: 'ToolQiniuConfig',
data() {
return {
dateRange:[],
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 表格数据
dataList: [],
// 弹出层标题
title: "a",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
page:1,
size: 10,
phone:null,
name:'',
daterange:null,
exact:{name:''}
},
// 表单参数
form: {},
}
},
created(){
this.getList()
},
methods: {
getList(){
getPhoneMsgHis(this.queryParams).then(res => {
this.dataList = res.body.list
this.total = res.body.total;
})
this.loading = false;
},
changePage(page) {
this.queryParams.page = page;
this.getList();
},
changeSize(size){
console.log(size)
this.queryParams.size = size;
},
daterangeChange(val){
console.log(val.join(','))
this.queryParams.daterange=val.join(',');
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.getList();
},
resetQuery() {
this.dateRange = []
this.queryParams={
page:1,
size: 10,
phone:null,
name:'',
daterange:null,
exact:{name:''}
}
this.handleQuery();
},
}
}
</script>
<style scoped>
</style>
<template>
<div class="common-page qyzz page-t1">
<div class="head-container">
<!--表单组件-->
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-row>
<el-col :span="12">
<el-form-item label="姓名" prop="name">
<el-input v-model="form.name" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电话" prop="phone">
<el-input v-model="form.phone" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="cancel">取消</el-button>
<el-button type="primary" @click="submitForm">确认</el-button>
</div>
</el-dialog>
<!--工具栏-->
<div class="panel-bottom page-row">
<div class="ctin-box">
<div class="content-within">
<div class="content-fix">
<div class="toolbar">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除</el-button>
</el-col>
</el-row>
</div>
<!--表格渲染-->
<el-table ref="table" v-loading="loading" :data="dataList" size="small" style="width: 100%;" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="电话" align="center" prop="phone" />
<el-table-column label="操作" width="150px" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
layout="total, prev, pager, next"
:current-page="queryParams.page"
@current-change="changePage"
@size-change="changeSize"
:total="total"
:page-size="10"
>
</el-pagination>
</div>
</div>
</div>
</div>
<!-- <pagination /> -->
</div>
</div>
</template>
<script>
import {getPhone,addPhone,editPhone,delPhone} from '@/api/alarmMsg'
// import pagination from '@crud/Pagination'
export default {
name: 'ToolQiniuConfig',
// components: { pagination, crudOperation, rrOperation, udOperation },
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 表格数据
dataList: [],
// 弹出层标题
title: "a",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
page:1,
size: 10,
},
// 表单参数
form: {},
rules: {
name: [
{ required: true, message: '姓名不能为空', trigger: 'blur' }
]
}
}
},
created(){
this.getList()
},
methods: {
reset() {
this.form = {
id:undefined,
phone:undefined,
name:undefined,
};
},
getList(){
getPhone({page:0,size:999}).then(res => {
console.log(res)
this.dataList = res.body.list
this.total = res.body.total;
})
this.loading = false;
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
console.log(this.ids)
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
console.log(row)
this.reset();
// const id = row.name
// getPhone({page:0,size:999,exact:{name:id}}).then(response => {
// // console.log(response.body.list[0])
// this.form = response.body.list[0];
// this.open = true;
// this.title = "修改信息";
// });
this.form = row;
this.open = true;
this.title = "修改信息";
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != undefined) {
editPhone(this.form).then(response => {
this.$message({
message: '修改成功',
type: 'success'
});
this.open = false;
this.getList();
});
} else {
addPhone(this.form).then(response => {
this.$message({
message: '新增成功',
type: 'success'
});
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id ? [row.id] : this.ids;
this.$confirm('是否确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delPhone(ids)
return
}).then(()=>{
this.getList();
this.$message({
type: 'success',
message: '删除成功!'
});
}).catch(() => {
});
},
changePage(page) {
this.queryParams.page = page;
this.getList();
},
changeSize(size){
console.log(size)
this.queryParams.size = size;
},
daterangeChange(val){
console.log(val.join(','))
this.queryParams.daterange=val.join(',');
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.getList();
},
resetQuery() {
this.dateRange = []
this.queryParams={
page:1,
size: 10,
phone:null,
name:null,
daterange:null,
}
this.handleQuery();
},
}
}
</script>
<style scoped>
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment