master
fanluyan 1 year ago
parent e7a7e876c6
commit 89cb733d62

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

@ -51,7 +51,12 @@ export default {
this.isProduction = process.env.NODE_ENV === "production";
if (this.isProduction) {
// 使IP
this.hostName = window.location.origin;
if (window.location.pathname.includes("/cac")) {
this.hostName = window.location.origin + "/cac/";
} else {
this.hostName = window.location.origin;
}
console.log("aaaaaaaaaaaa");
} else {
// 使 target
@ -62,6 +67,7 @@ export default {
watch: {},
methods: {
linkHome() {
console.log(this.hostName);
window.location.href = this.hostName;
},
},
@ -90,7 +96,7 @@ export default {
font-size: 14px;
margin-right: 32px;
a {
color: #6de1ff;
color: #fff;
background-image: url(../assets/menu.png);
height: 40px;
line-height: 40px;
@ -99,6 +105,9 @@ export default {
background-repeat: no-repeat;
overflow: hidden;
}
.router-link-active {
color: #6de1ff;
}
}
}
}

@ -420,6 +420,19 @@ export function bindApi(data) {
data,
});
}
//解绑
export function unbindApi(data) {
return request({
url: "/parambind/unbind",
method: "post",
params: data,
headers: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
},
});
}
export function generateParamindexApi(data) {
return request({
url: "/parambind/generateParamindex",

@ -5,7 +5,7 @@ import router from "../router/index";
const service = axios.create({
// process.env.NODE_ENV === 'development' 来判断是否开发环境
// easy-mock服务挂了暂时不使用了
// baseURL: '',
//baseURL: "",
// timeout: 5000
baseURL: "/cac-api", //把原来的项目地址改成api解决跨域问题
timeout: 30000,

@ -44,8 +44,10 @@
<el-form-item label="开始日期">
<el-date-picker
v-model="formdata.starttime"
:picker-options="pickerOptions"
type="date"
placeholder="开始日期"
default-time="00:00:00"
>
</el-date-picker>
</el-form-item>
@ -53,7 +55,9 @@
<el-date-picker
@change="changedate"
v-model="formdata.endtime"
:picker-options="pickerOptions"
type="date"
default-time="23:59:59"
placeholder="结束日期"
class="ml10"
>
@ -163,6 +167,11 @@ export default {
components: { lineChart },
data() {
return {
pickerOptions: {
disabledDate(date) {
return date.getTime() > Date.now(); //
},
},
filterText: "", //
treeData: [], //
defaultExpandedKeys: [],
@ -308,6 +317,28 @@ export default {
this.formdata.endtime = this.$moment(this.formdata.endtime).format(
"YYYY-MM-DD HH:mm:ss"
);
console.log(this.formdata.starttime);
console.log(this.formdata.endtime);
if (
this.formdata.starttime == "Invalid date" ||
this.formdata.endtime == "Invalid date"
) {
return this.$message({
duration: 1500,
showClose: true,
message: "请选择开始时间和结束时间",
type: "warning",
});
}
if (this.formdata.starttime > this.formdata.endtime) {
return this.$message({
duration: 1500,
showClose: true,
message: "开始日期不能大于结束日期",
type: "warning",
});
}
console.log(this.tabName);
if (this.tabName == "dataTab") {
this.getDetailTable(

@ -5,13 +5,14 @@
:title="title"
:visible.sync="bdzDialogshow"
width="520px"
:close-on-click-modal="false"
>
<el-form
label-position="left"
ref="formInfo"
label-width="104px"
:rules="rules"
:model="formInfo"
:rules="rules"
>
<el-form-item label="名称:" prop="mc">
<el-input v-model="formInfo.mc"></el-input>
@ -20,11 +21,23 @@
<el-input v-model="formInfo.coordinate"></el-input>
</el-form-item>
<el-form-item label="电压等级:" prop="voltagegrade">
<el-input v-model="formInfo.voltagegrade"></el-input>
<!-- <el-input v-model="formInfo.voltagegrade"></el-input> -->
<el-select
v-model="formInfo.voltagegrade"
placeholder="请选择电压等级"
>
<el-option
v-for="item in volOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="规模:" prop="scale">
<!-- <el-form-item label="规模:" prop="scale">
<el-input v-model="formInfo.scale"></el-input>
</el-form-item>
</el-form-item> -->
<el-form-item label="描述:" prop="note">
<el-input v-model="formInfo.note"></el-input>
</el-form-item>
@ -43,7 +56,17 @@ export default {
data() {
return {
bdzDialogshow: false,
formInfo: {},
volOptions: [
{
value: 220,
label: "220Kv",
},
{
value: 500,
label: "500Kv",
},
],
formInfo: "",
rules: {
mc: [{ required: true, message: "请输入名称", trigger: "blur" }],
},
@ -56,7 +79,16 @@ export default {
//
getdataform(val) {
console.log(val);
this.formInfo = JSON.parse(JSON.stringify(val));
if (val == null) {
this.formInfo = {
mc: "",
coordinate: "",
voltagegrade: "",
note: "",
};
} else {
this.formInfo = JSON.parse(JSON.stringify(val));
}
},
submitForm() {
this.$refs.formInfo.validate((valid) => {
@ -74,6 +106,13 @@ export default {
});
this.hide();
this.$parent.getbdzAllList(); //
} else {
this.$message({
duration: 1500,
showClose: true,
message: res.errorMsg,
type: "error",
});
}
})
.catch((err) => {});
@ -89,6 +128,13 @@ export default {
});
this.hide();
this.$parent.getbdzAllList(); //
} else {
this.$message({
duration: 1500,
showClose: true,
message: res.errorMsg,
type: "error",
});
}
})
.catch((err) => {});
@ -101,17 +147,17 @@ export default {
},
display() {
this.bdzDialogshow = true;
if (this.title == "添加电站") {
this.formInfo.mc = "";
this.formInfo.coordinate = "";
this.formInfo.voltagegrade = "";
this.formInfo.scale = "";
this.formInfo.note = "";
}
// if (this.title == "") {
// this.formInfo.mc = "";
// this.formInfo.coordinate = "";
// this.formInfo.voltagegrade = "";
// this.formInfo.scale = "";
// this.formInfo.note = "";
// }
},
hide() {
//this.$refs.formInfo.resetFields(); //
this.bdzDialogshow = false;
this.$refs.formInfo.resetFields(); //
},
},
};
@ -125,6 +171,9 @@ export default {
text-align: left;
}
}
.el-select {
width: 374px;
}
.el-input-number.is-controls-right[class*="small"] [class*="decrease"],
.el-input-number.is-controls-right[class*="small"] [class*="increase"] {
display: none;

@ -21,7 +21,7 @@
<el-table-column prop="coordinate" label="坐标"></el-table-column>
<el-table-column prop="voltagegrade" label="电压等级">
</el-table-column>
<el-table-column prop="scale" label="规模"> </el-table-column>
<!-- <el-table-column prop="scale" label="规模"> </el-table-column> -->
<el-table-column prop="note" label="描述"> </el-table-column>
<el-table-column label="操作" width="200" class-name="editClass">
<template slot-scope="scope">
@ -83,7 +83,7 @@ export default {
handleAddClick() {
this.title = "添加电站";
this.$refs.bdzAddRef.display();
//this.$refs.bdzAddRef.getdataform(null);
this.$refs.bdzAddRef.getdataform(null);
},
//
handleEditClick(data) {
@ -109,7 +109,12 @@ export default {
});
this.getbdzAllList(); //
} else {
this.$message.error(res.data);
this.$message({
duration: 1500,
showClose: true,
type: "error",
message: res.errorMsg,
});
}
});
})

@ -5,6 +5,7 @@
:title="title"
:visible.sync="jcsbDialogshow"
width="520px"
:close-on-click-modal="false"
>
<el-form
label-position="left"

@ -117,7 +117,12 @@ export default {
});
this.getjcsbAllList(); //
} else {
this.$message.error(res.data);
this.$message({
duration: 1500,
showClose: true,
type: "error",
message: res.errorMsg,
});
}
});
})

@ -5,6 +5,7 @@
:title="title"
:visible.sync="modevtypeDialogshow"
width="520px"
:close-on-click-modal="false"
>
<el-form
label-position="left"
@ -17,13 +18,18 @@
<el-input v-model="formInfo.mc"></el-input>
</el-form-item>
<el-form-item label="选择表名:">
<el-select v-model="formInfo.tablename">
<el-select v-model="formInfo.tablename" @change="changetablename">
<el-option
v-for="item in tableOptions"
:key="item"
:label="item"
:value="item"
></el-option>
:key="item.name"
:label="item.name"
:value="item.name"
>
{{ item.name
}}<span v-if="item.comment != '' && item.comment != null"
>({{ item.comment }})</span
>
</el-option>
</el-select>
</el-form-item>
</el-form>
@ -47,6 +53,7 @@ export default {
modevtypeDialogshow: false,
formInfo: {
mc: "",
tablename: "",
},
rules: {
mc: [{ required: true, message: "请输入名称", trigger: "blur" }],
@ -63,6 +70,10 @@ export default {
console.log(val);
this.formInfo = JSON.parse(JSON.stringify(val));
},
changetablename(val) {
console.log(val);
this.formInfo.tablename = val;
},
submitForm() {
this.$refs.formInfo.validate((valid) => {
if (valid) {
@ -126,7 +137,7 @@ export default {
this.tableOptions = res.data;
if (this.title == "添加监测类型") {
console.log(this.formInfo);
this.formInfo.tablename = this.tableOptions[0];
this.formInfo.tablename = this.tableOptions[0].name;
this.formInfo.mc = "";
}
})

@ -109,7 +109,12 @@ export default {
});
this.getmodevtypeAllList(); //
} else {
this.$message.error(res.data);
this.$message({
duration: 1500,
showClose: true,
type: "error",
message: res.errorMsg,
});
}
});
})

@ -5,6 +5,7 @@
:title="title"
:visible.sync="qyjgDialogshow"
width="520px"
:close-on-click-modal="false"
>
<el-form
label-position="left"
@ -76,6 +77,13 @@ export default {
});
this.hide();
this.$parent.getAreaAllList(); //
} else {
this.$message({
duration: 1500,
showClose: true,
message: res.errorMsg,
type: "error",
});
}
})
.catch((err) => {});
@ -91,6 +99,13 @@ export default {
});
this.hide();
this.$parent.getAreaAllList(); //
} else {
this.$message({
duration: 1500,
showClose: true,
message: res.errorMsg,
type: "error",
});
}
})
.catch((err) => {});

@ -106,7 +106,12 @@ export default {
});
this.getAreaAllList(); //
} else {
this.$message.error(res.data);
this.$message({
duration: 1500,
showClose: true,
type: "error",
message: res.errorMsg,
});
}
});
})

@ -5,6 +5,7 @@
:title="title"
:visible.sync="sblxDialogshow"
width="520px"
:close-on-click-modal="false"
>
<el-form
label-position="left"
@ -63,6 +64,13 @@ export default {
});
this.hide();
this.$parent.getsblxAllList(); //
} else {
this.$message({
duration: 1500,
showClose: true,
message: res.errorMsg,
type: "error",
});
}
})
.catch((err) => {});
@ -78,6 +86,13 @@ export default {
});
this.hide();
this.$parent.getsblxAllList(); //
} else {
this.$message({
duration: 1500,
showClose: true,
message: res.errorMsg,
type: "error",
});
}
})
.catch((err) => {});

@ -105,7 +105,12 @@ export default {
});
this.getsblxAllList(); //
} else {
this.$message.error(res.data);
this.$message({
duration: 1500,
showClose: true,
type: "error",
message: res.errorMsg,
});
}
});
})

@ -5,6 +5,7 @@
:title="title"
:visible.sync="zsbDialogshow"
width="520px"
:close-on-click-modal="false"
>
<el-form
label-position="left"
@ -105,6 +106,13 @@ export default {
});
this.hide();
this.$parent.getzsbAllList(); //
} else {
this.$message({
duration: 1500,
showClose: true,
message: res.errorMsg,
type: "error",
});
}
})
.catch((err) => {});
@ -120,6 +128,13 @@ export default {
});
this.hide();
this.$parent.getzsbAllList(); //
} else {
this.$message({
duration: 1500,
showClose: true,
message: res.errorMsg,
type: "error",
});
}
})
.catch((err) => {});

@ -25,6 +25,7 @@
<template slot-scope="scope">
<el-link
type="primary"
icon="el-icon-monitor"
@click="handlejcsbClick(scope.row)"
size="small"
>监测设备</el-link
@ -114,7 +115,12 @@ export default {
});
this.getzsbAllList(); //
} else {
this.$message.error(res.data);
this.$message({
duration: 1500,
showClose: true,
type: "error",
message: res.errorMsg,
});
}
});
})

@ -6,6 +6,7 @@
:visible.sync="colDialogshow"
width="1020px"
@close="hide"
:close-on-click-modal="false"
>
<div class="colContain">
<el-table
@ -155,7 +156,7 @@ export default {
//icd
handleDeleteClick(val) {
console.log(val);
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
this.$confirm("删除该类型?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
@ -166,13 +167,25 @@ export default {
})
.then((res) => {
console.log(res);
this.$message({
duration: 1500,
showClose: true,
message: "文件删除成功",
type: "success",
});
this.$parent.geticdList(this.colTableData.iedName, this.colIndex);
if (res.success) {
this.$message({
duration: 1500,
showClose: true,
message: "删除成功",
type: "success",
});
this.$parent.geticdList(
this.colTableData.iedName,
this.colIndex
);
} else {
this.$message({
duration: 1500,
showClose: true,
type: "error",
message: res.errorMsg,
});
}
})
.catch((err) => {});
//this.getactivityList();

@ -192,7 +192,7 @@ export default {
this.$message({
duration: 1500,
showClose: true,
message: "文件上传失败,请重新上传",
message: res.errorMsg,
type: "error",
});
this.$refs.upload.clearFiles();
@ -291,13 +291,22 @@ export default {
})
.then((res) => {
console.log(res);
this.$message({
duration: 1500,
showClose: true,
message: "文件删除成功",
type: "success",
});
this.geticdList(val.iedName);
if (res.success) {
this.$message({
duration: 1500,
showClose: true,
message: "文件删除成功",
type: "success",
});
this.geticdList(val.iedName);
} else {
this.$message({
duration: 1500,
showClose: true,
type: "error",
message: res.errorMsg,
});
}
})
.catch((err) => {});
//this.getactivityList();

@ -18,7 +18,7 @@
:current-node-key="currentNodekey"
:expand-on-click-node="true"
@node-click="handleNodeClick"
accordion
default-expand-all
>
<template class="custom-tree-node" slot-scope="{ node, data }">
<!-- <span>{{ data.name || data.mc }}</span> -->
@ -75,33 +75,44 @@
type="primary"
style="margin-left: 16px"
>
保存
绑定
</el-button>
<el-button
@click="unBind"
type="primary"
:disabled="jbFlag"
style="margin-left: 16px"
>
解绑
</el-button>
</div>
<el-divider></el-divider>
<p class="warnMsg">
<el-tag
type="warning"
v-for="(item, index) in warnMsg"
:key="index"
>{{ item }}</el-tag
>
</p>
<div class="showMsgBox">
<p class="outsideLabel" v-for="(item, index) in bindInfoArray">
<span
>{{ item.comment }}
<b>({{ item.name }})</b>
</span>
<span>
<em
v-for="(item2, index2) in previewData"
:key="index2"
v-if="item.name == item2.colName"
>{{ item2.lastName }}</em
></span
<p class="warnMsg" v-if="warnMsg">
<el-tag
type="warning"
v-for="(item, index) in warnMsg"
:key="index"
>{{ item }}</el-tag
>
</p>
<div class="outside">
<p class="outsideLabel" v-for="(item, index) in bindInfoArray">
<span
>{{ item.comment }}
<b>({{ item.name }})</b>
</span>
<span>
<em
v-for="(item2, index2) in previewData"
:key="index2"
v-if="item.name == item2.colName"
>{{ item2.param }}</em
></span
>
</p>
</div>
</div>
</div>
</div>
@ -115,6 +126,7 @@ import {
iedListApi,
previewApi,
bindApi,
unbindApi,
generateParamindexApi,
} from "@/utils/api/index";
export default {
@ -145,6 +157,7 @@ export default {
defaultShow: true, //
drawer: false,
warnMsg: "",
jbFlag: false,
};
},
watch: {},
@ -191,7 +204,13 @@ export default {
})
.then((res) => {
console.log(res);
console.log("aaaaaaaaaaa");
this.bindInfo = res.data;
if ((res.data.iedName == null) & (res.data.icdid == null)) {
this.jbFlag = true;
} else {
this.jbFlag = false;
}
if (res.data.columnList != null) {
this.bindInfoArray = res.data.columnList;
this.previewData = res.data.attList;
@ -222,6 +241,8 @@ export default {
//iedname
changeIedname(val) {
this.iedName = val;
this.ljName = "";
this.warnMsg = "";
console.log(this.iedName);
console.log(this.iedOptions.find((item) => item === val));
this.getinstList();
@ -251,17 +272,26 @@ export default {
console.log(val);
console.log(this.ljOptions.find((item) => item.paramIndex === val));
this.icdid = this.ljOptions.find((item) => item.paramIndex === val).id;
this.warnMsg = "";
previewApi({
eqmid: this.currentNodeKey,
icdid: this.icdid,
})
.then((res) => {
console.log(res);
this.previewData = res.data;
this.warnMsg = res.warnMsg.split("\n\r");
console.log(this.bindInfoArray);
console.log(this.previewData);
if (res.success) {
this.previewData = res.data;
this.warnMsg = res.warnMsg.split("\n\r");
console.log(this.warnMsg);
console.log(this.bindInfoArray);
console.log(this.previewData);
} else {
this.$message({
showClose: true,
message: res.errorMsg,
type: "error",
});
}
})
.catch((err) => {
console.log(err); //
@ -285,7 +315,7 @@ export default {
this.$message({
showClose: true,
message: res.errorMsg,
type: "warning",
type: "error",
});
}
})
@ -315,6 +345,32 @@ export default {
console.log(err); //
});
},
//
unBind() {
unbindApi({
eqmid: this.currentNodeKey,
})
.then((res) => {
console.log(res);
if (res.success) {
this.$message({
showClose: true,
message: "解绑成功",
type: "success",
});
this.getBindList();
} else {
this.$message({
showClose: true,
message: res.errorMsg,
type: "error",
});
}
})
.catch((err) => {
console.log(err); //
});
},
},
};
</script>
@ -356,7 +412,7 @@ export default {
}
.el-tree {
overflow-y: auto;
/* overflow-x: hidden; */
overflow-x: hidden;
height: calc(100% - 40px);
.el-tree-node__content {
height: 32px;
@ -492,48 +548,54 @@ export default {
.el-divider--horizontal {
margin: 12px 0px;
}
.warnMsg {
padding: 0px 12px 0px 12px;
.el-tag {
margin-right: 12px;
margin-bottom: 12px;
}
}
.showMsgBox {
width: calc(100% - 80px);
max-height: calc(100% - 64px);
padding: 0px 40px;
overflow: auto;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
.outsideLabel {
height: 40px;
line-height: 40px;
.warnMsg {
//padding: 0px 12px 0px 12px;
.el-tag {
display: block;
margin-right: 12px;
margin-bottom: 12px;
font-size: 14px;
}
}
.outside {
display: flex;
align-items: center;
margin-bottom: 12px;
margin-top: 2px;
span {
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
.outsideLabel {
height: 40px;
line-height: 40px;
min-width: 280px;
padding: 0px 12px;
width: max-content;
border: 1px solid #ededed;
text-align: center;
b {
font-weight: normal;
font-size: 12px;
color: #666;
}
&:last-child {
width: 200px;
}
em {
font-style: normal;
display: flex;
align-items: center;
margin-bottom: 12px;
margin-top: 2px;
span {
height: 40px;
line-height: 40px;
min-width: 280px;
padding: 0px 12px;
width: max-content;
border: 1px solid #ededed;
text-align: center;
b {
font-weight: normal;
font-size: 12px;
color: #666;
}
&:last-child {
width: 200px;
}
em {
font-style: normal;
}
}
}
}

@ -2,12 +2,12 @@ const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
//打包清除console
chainWebpack(config) {
config.optimization.minimizer("terser").tap((args) => {
args[0].terserOptions.compress.drop_console = true;
return args;
});
},
// chainWebpack(config) {
// config.optimization.minimizer("terser").tap((args) => {
// args[0].terserOptions.compress.drop_console = true;
// return args;
// });
// },
productionSourceMap: false, // 生产环境是否要生成 sourceMap
publicPath: process.env.PUBLIC_PATH ? process.env.PUBLIC_PATH : "./", // 部署应用包时的基本 URL
// assetsPublicPath: process.env.NODE_ENV === "production" ? "" : "/",

Loading…
Cancel
Save