提交:1. 统计分析 功能模块前端代码(只对接能源统计接口); 2. 整改部分页面使用弹窗选择表格 的组件
This commit is contained in:
parent
dceb330503
commit
6d2ba906c6
|
@ -0,0 +1,9 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function projectEnergy(query) {
|
||||||
|
return request({
|
||||||
|
url: '/iot/stat/projectEnergy',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
|
@ -2,13 +2,16 @@
|
||||||
<div class="e-dialog-table-select">
|
<div class="e-dialog-table-select">
|
||||||
<div @click="openTableSelectDialog">
|
<div @click="openTableSelectDialog">
|
||||||
<el-input
|
<el-input
|
||||||
|
v-if="type === 'input' || !type"
|
||||||
:placeholder="'点击选择' + title"
|
:placeholder="'点击选择' + title"
|
||||||
v-model="value"
|
v-model="value"
|
||||||
class="input-with-select"
|
class="input-with-select"
|
||||||
:clearable="pclearable"
|
:clearable="pclearable"
|
||||||
|
:disabled="disabled"
|
||||||
:size="psize"
|
:size="psize"
|
||||||
suffix-icon="el-icon-caret-bottom"
|
suffix-icon="el-icon-caret-bottom"
|
||||||
/>
|
/>
|
||||||
|
<el-button :disabled="disabled" type="primary" :size="psize" v-if="type === 'button'" @click="openTableSelectDialog">{{ '点击选择' + title }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="'请选择__' + title"
|
:title="'请选择__' + title"
|
||||||
|
@ -17,6 +20,7 @@
|
||||||
top="10vh"
|
top="10vh"
|
||||||
class="select-table-dialog"
|
class="select-table-dialog"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
|
append-to-body
|
||||||
>
|
>
|
||||||
<e-dynamic-table
|
<e-dynamic-table
|
||||||
v-if="selectTableShow"
|
v-if="selectTableShow"
|
||||||
|
@ -90,9 +94,7 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
value: {
|
value: String,
|
||||||
type: String,
|
|
||||||
},
|
|
||||||
localKey: {
|
localKey: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "ZF_RECENT_KEY",
|
default: "ZF_RECENT_KEY",
|
||||||
|
@ -125,6 +127,8 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
type: String,
|
||||||
|
disabled: Boolean,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -165,9 +169,13 @@ export default {
|
||||||
this.$emit("input", result[this.showFileName] || '');
|
this.$emit("input", result[this.showFileName] || '');
|
||||||
this.$emit('change', result);
|
this.$emit('change', result);
|
||||||
this.selectResult = null;
|
this.selectResult = null;
|
||||||
|
this.$forceUpdate();
|
||||||
},
|
},
|
||||||
// 开启 筛选表格
|
// 开启 筛选表格
|
||||||
openTableSelectDialog() {
|
openTableSelectDialog() {
|
||||||
|
if(this.disabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.selectResult = null;
|
this.selectResult = null;
|
||||||
this.selectTableShow = true;
|
this.selectTableShow = true;
|
||||||
},
|
},
|
||||||
|
@ -212,5 +220,10 @@ export default {
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.select-table-dialog {
|
||||||
|
.el-dialog__body {
|
||||||
|
padding: 10px 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
|
@ -14,17 +14,6 @@
|
||||||
v-show="showSearch"
|
v-show="showSearch"
|
||||||
label-width="68px"
|
label-width="68px"
|
||||||
>
|
>
|
||||||
<!-- <el-form-item label="所属型号" prop="modelId">
|
|
||||||
<el-select v-model="queryParams.modelId" placeholder="所属型号" clearable size="small" @change="handleQuery">
|
|
||||||
<el-option
|
|
||||||
:label="doct.modelName"
|
|
||||||
v-for="doct in queryModelOpt"
|
|
||||||
:key="doct.modelId"
|
|
||||||
:value="doct.modelId"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>-->
|
|
||||||
|
|
||||||
<el-form-item label="型号名称" prop="modelName">
|
<el-form-item label="型号名称" prop="modelName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.modelName"
|
v-model="queryParams.modelName"
|
||||||
|
@ -262,10 +251,15 @@
|
||||||
>
|
>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-form-item label="所属型号:" prop="modelId">
|
<el-form-item label="所属型号:" prop="modelId">
|
||||||
<el-input
|
<e-dialog-table-input
|
||||||
|
:table="selectModelTable"
|
||||||
|
:refurbishFun="listModel"
|
||||||
|
showFileName="modelName"
|
||||||
|
fileName="modelId,modelName,deviceType,prodKey"
|
||||||
v-model="form.modelName"
|
v-model="form.modelName"
|
||||||
placeholder="点击选择型号"
|
title="型号"
|
||||||
@focus="openModelTableSelectDialog()"
|
psize="small"
|
||||||
|
@change="handleModelDialogEvent"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
@ -291,10 +285,15 @@
|
||||||
prop="parentId"
|
prop="parentId"
|
||||||
v-if="form.deviceType === 'MINIATURE_BREAKER'"
|
v-if="form.deviceType === 'MINIATURE_BREAKER'"
|
||||||
>
|
>
|
||||||
<el-input
|
<e-dialog-table-input
|
||||||
|
:table="selectDeviceTable"
|
||||||
|
:refurbishFun="listDevice"
|
||||||
|
showFileName="deviceName"
|
||||||
|
fileName="deviceId,deviceName"
|
||||||
v-model="form.parentName"
|
v-model="form.parentName"
|
||||||
placeholder="点击选择父设备"
|
title="设备"
|
||||||
@focus="openTableSelectDialog()"
|
psize="small"
|
||||||
|
@change="handleDeviceDialogEvent"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
@ -330,7 +329,14 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="设备标签:" v-if="form.deviceType !== 'VIDEO_CONTROLLER' && form.deviceType !== 'GATEWAY_CONTROLLER'" prop="deviceTag">
|
<el-form-item
|
||||||
|
label="设备标签:"
|
||||||
|
v-if="
|
||||||
|
form.deviceType !== 'VIDEO_CONTROLLER' &&
|
||||||
|
form.deviceType !== 'GATEWAY_CONTROLLER'
|
||||||
|
"
|
||||||
|
prop="deviceTag"
|
||||||
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.deviceTag"
|
v-model="form.deviceTag"
|
||||||
filterable
|
filterable
|
||||||
|
@ -364,41 +370,6 @@
|
||||||
<el-button size="mini" @click="cancel">取 消</el-button>
|
<el-button size="mini" @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog
|
|
||||||
title="选择"
|
|
||||||
:visible.sync="selectTableShow"
|
|
||||||
width="75%"
|
|
||||||
top="10vh"
|
|
||||||
class="select-table-dialog"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<select-table-wrap
|
|
||||||
v-if="selectTableShow"
|
|
||||||
:tableOption="tableSelectOption.tableOpt"
|
|
||||||
:queryOption="tableSelectOption.queryOpt"
|
|
||||||
:tableList="tableSelectOption.tableList"
|
|
||||||
@parentGetList="childGetList($event)"
|
|
||||||
:otherOption="tableSelectOption.otherOption"
|
|
||||||
@returnEvent="returnEvent($event)"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button size="mini" type="primary" @click="resuleClick"
|
|
||||||
>确 定</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
selectTableShow = false;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>取 消</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
:class="
|
:class="
|
||||||
componectVal === 'GatewayDetail'
|
componectVal === 'GatewayDetail'
|
||||||
|
@ -427,10 +398,10 @@ import {
|
||||||
disassociateChild,
|
disassociateChild,
|
||||||
} from "@/api/iot/device";
|
} from "@/api/iot/device";
|
||||||
import { listModel, getModel } from "@/api/iot/model";
|
import { listModel, getModel } from "@/api/iot/model";
|
||||||
import SelectTableWrap from "@/components/SelectTable/index";
|
|
||||||
import DetailsWrap from "./profile/details";
|
import DetailsWrap from "./profile/details";
|
||||||
import ParamWrap from "@/components/ParamWrap/deviceParam";
|
import ParamWrap from "@/components/ParamWrap/deviceParam";
|
||||||
import GatewayDetail from "@/views/profile/DeviceDetailsView/index";
|
import GatewayDetail from "@/views/profile/DeviceDetailsView/index";
|
||||||
|
import EDialogTableInput from "@/components/EDialogTableInput";
|
||||||
const deviceStatusOpt = {
|
const deviceStatusOpt = {
|
||||||
ONLINE: "在线",
|
ONLINE: "在线",
|
||||||
OFFLINE: "离线",
|
OFFLINE: "离线",
|
||||||
|
@ -442,24 +413,216 @@ const lineTypeOpt = {
|
||||||
BRANCH: "支路",
|
BRANCH: "支路",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const selectModelTable = {
|
||||||
|
otherOption: {
|
||||||
|
tableType: "model",
|
||||||
|
},
|
||||||
|
queryOption: {
|
||||||
|
disable: false,
|
||||||
|
labelWidth: "68px",
|
||||||
|
params: {
|
||||||
|
protocolType: "",
|
||||||
|
modelName: "",
|
||||||
|
},
|
||||||
|
inline: true,
|
||||||
|
queryChilds: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
placeholder: "型号名称",
|
||||||
|
clearable: true,
|
||||||
|
label: "型号名称",
|
||||||
|
type: "input",
|
||||||
|
key: "modelName",
|
||||||
|
size: "small",
|
||||||
|
value: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
placeholder: "协议类型",
|
||||||
|
clearable: true,
|
||||||
|
label: "协议类型",
|
||||||
|
type: "select",
|
||||||
|
key: "protocolType",
|
||||||
|
size: "small",
|
||||||
|
value: "",
|
||||||
|
options: [
|
||||||
|
// {
|
||||||
|
// key: "IOTOS",
|
||||||
|
// label: "iot平台",
|
||||||
|
// value: "IOTOS"
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// key: "ONENET",
|
||||||
|
// label: "ONENET",
|
||||||
|
// value: "ONENET"
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
key: "OFFICIAL",
|
||||||
|
label: "官方平台",
|
||||||
|
value: "OFFICIAL",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
optionKey: {
|
||||||
|
key: "key",
|
||||||
|
label: "label",
|
||||||
|
value: "value",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
tableOption: {
|
||||||
|
loading: false,
|
||||||
|
rowKey: "deviceId",
|
||||||
|
selection: false,
|
||||||
|
maxHeight: "45vh",
|
||||||
|
childs: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "厂商名称",
|
||||||
|
type: "",
|
||||||
|
prop: "vendorName",
|
||||||
|
align: "left",
|
||||||
|
width: "200",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "型号名称",
|
||||||
|
type: "",
|
||||||
|
prop: "modelName",
|
||||||
|
align: "left",
|
||||||
|
width: "200",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "设备类型",
|
||||||
|
type: "",
|
||||||
|
prop: "deviceTypeName",
|
||||||
|
align: "left",
|
||||||
|
width: "120",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "产品PK",
|
||||||
|
type: "",
|
||||||
|
prop: "prodKey",
|
||||||
|
align: "left",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "产品密钥",
|
||||||
|
type: "",
|
||||||
|
prop: "prodSecret",
|
||||||
|
align: "left",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const selectDeviceTable = {
|
||||||
|
otherOption: {
|
||||||
|
tableType: "device",
|
||||||
|
},
|
||||||
|
queryOption: {
|
||||||
|
disable: false,
|
||||||
|
labelWidth: "68px",
|
||||||
|
params: {
|
||||||
|
deviceName: "",
|
||||||
|
deviceType: "GATEWAY_CONTROLLER",
|
||||||
|
},
|
||||||
|
inline: true,
|
||||||
|
queryChilds: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
placeholder: "设备名称",
|
||||||
|
clearable: true,
|
||||||
|
label: "设备名称",
|
||||||
|
type: "input",
|
||||||
|
key: "deviceName",
|
||||||
|
size: "small",
|
||||||
|
value: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
tableOption: {
|
||||||
|
loading: false,
|
||||||
|
rowKey: "deviceId",
|
||||||
|
selection: false,
|
||||||
|
maxHeight: "45vh",
|
||||||
|
childs: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "所属型号",
|
||||||
|
type: "",
|
||||||
|
prop: "modelName",
|
||||||
|
align: "left",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "设备名称",
|
||||||
|
type: "",
|
||||||
|
prop: "deviceName",
|
||||||
|
align: "left",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "设备Key",
|
||||||
|
type: "",
|
||||||
|
prop: "deviceKey",
|
||||||
|
align: "left",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "创建时间",
|
||||||
|
type: "time",
|
||||||
|
prop: "createTime",
|
||||||
|
align: "center",
|
||||||
|
width: "160",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
tableList: {
|
||||||
|
type: Array,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "systemDevice",
|
name: "systemDevice",
|
||||||
components: {
|
components: {
|
||||||
SelectTableWrap,
|
|
||||||
DetailsWrap,
|
DetailsWrap,
|
||||||
ParamWrap,
|
ParamWrap,
|
||||||
GatewayDetail,
|
GatewayDetail,
|
||||||
|
EDialogTableInput,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
deviceStatusOpt,
|
deviceStatusOpt,
|
||||||
|
selectModelTable,
|
||||||
|
selectDeviceTable,
|
||||||
lineTypeOpt,
|
lineTypeOpt,
|
||||||
sourceId: "",
|
sourceId: "",
|
||||||
componectVal: "",
|
componectVal: "",
|
||||||
selectTableShow: false,
|
|
||||||
tableSelectOption: {},
|
|
||||||
selectResult: {},
|
|
||||||
queryModelOpt: [],
|
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
|
@ -519,7 +682,7 @@ export default {
|
||||||
],
|
],
|
||||||
deviceTag: [
|
deviceTag: [
|
||||||
{ required: true, message: "设备标签不能为空", trigger: "change" },
|
{ required: true, message: "设备标签不能为空", trigger: "change" },
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
deviceTypeList: {},
|
deviceTypeList: {},
|
||||||
deviceTagList: [],
|
deviceTagList: [],
|
||||||
|
@ -530,6 +693,20 @@ export default {
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
listModel,
|
||||||
|
listDevice,
|
||||||
|
handleModelDialogEvent(e) {
|
||||||
|
this.getModelInfoById(e.modelId);
|
||||||
|
this.form.modelId = e.modelId;
|
||||||
|
this.form.modelName = e.modelName;
|
||||||
|
this.form.deviceType = e.deviceType;
|
||||||
|
this.form.prodKey = e.prodKey;
|
||||||
|
this.deviceTypeChange(this.form.deviceType);
|
||||||
|
},
|
||||||
|
handleDeviceDialogEvent(e) {
|
||||||
|
this.form.parentId = e.deviceId;
|
||||||
|
this.form.parentName = e.deviceName;
|
||||||
|
},
|
||||||
// 字典状态字典翻译
|
// 字典状态字典翻译
|
||||||
statusFormat(row, column) {
|
statusFormat(row, column) {
|
||||||
return this.selectDictLabel(this.deviceTagList, row.deviceTag);
|
return this.selectDictLabel(this.deviceTagList, row.deviceTag);
|
||||||
|
@ -542,7 +719,6 @@ export default {
|
||||||
this.deviceTagList = response.data;
|
this.deviceTagList = response.data;
|
||||||
});
|
});
|
||||||
this.getDeviceTypeList();
|
this.getDeviceTypeList();
|
||||||
this.initGetModelList();
|
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
sortChange(column) {
|
sortChange(column) {
|
||||||
|
@ -572,309 +748,12 @@ export default {
|
||||||
}
|
}
|
||||||
this.componectVal = "";
|
this.componectVal = "";
|
||||||
},
|
},
|
||||||
// 打开厂商选择窗口 ——表格
|
|
||||||
openModelTableSelectDialog() {
|
|
||||||
this.selectResult = {};
|
|
||||||
this.tableSelectOption = {
|
|
||||||
otherOption: {
|
|
||||||
tableType: "model",
|
|
||||||
},
|
|
||||||
queryOpt: {
|
|
||||||
disable: false,
|
|
||||||
labelWidth: "68px",
|
|
||||||
params: {
|
|
||||||
protocolType: "",
|
|
||||||
modelName: "",
|
|
||||||
},
|
|
||||||
page: {
|
|
||||||
pageSize: 10,
|
|
||||||
pageNum: 1,
|
|
||||||
total: 0,
|
|
||||||
},
|
|
||||||
inline: true,
|
|
||||||
queryChilds: [
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
placeholder: "型号名称",
|
|
||||||
clearable: true,
|
|
||||||
label: "型号名称",
|
|
||||||
type: "input",
|
|
||||||
key: "modelName",
|
|
||||||
size: "small",
|
|
||||||
value: "",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
placeholder: "协议类型",
|
|
||||||
clearable: true,
|
|
||||||
label: "协议类型",
|
|
||||||
type: "select",
|
|
||||||
key: "protocolType",
|
|
||||||
size: "small",
|
|
||||||
value: "",
|
|
||||||
options: [
|
|
||||||
// {
|
|
||||||
// key: "IOTOS",
|
|
||||||
// label: "iot平台",
|
|
||||||
// value: "IOTOS"
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// key: "ONENET",
|
|
||||||
// label: "ONENET",
|
|
||||||
// value: "ONENET"
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
key: "OFFICIAL",
|
|
||||||
label: "官方平台",
|
|
||||||
value: "OFFICIAL",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
optionKey: {
|
|
||||||
key: "key",
|
|
||||||
label: "label",
|
|
||||||
value: "value",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
tableOpt: {
|
|
||||||
loading: false,
|
|
||||||
rowKey: "deviceId",
|
|
||||||
selection: false,
|
|
||||||
maxHeight: "45vh",
|
|
||||||
childs: [
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "厂商名称",
|
|
||||||
type: "",
|
|
||||||
prop: "vendorName",
|
|
||||||
align: "left",
|
|
||||||
width: "200",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "型号名称",
|
|
||||||
type: "",
|
|
||||||
prop: "modelName",
|
|
||||||
align: "left",
|
|
||||||
width: "200",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "设备类型",
|
|
||||||
type: "",
|
|
||||||
prop: "deviceTypeName",
|
|
||||||
align: "left",
|
|
||||||
width: "120",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "产品PK",
|
|
||||||
type: "",
|
|
||||||
prop: "prodKey",
|
|
||||||
align: "left",
|
|
||||||
width: "",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "产品密钥",
|
|
||||||
type: "",
|
|
||||||
prop: "prodSecret",
|
|
||||||
align: "left",
|
|
||||||
width: "",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
tableList: {
|
|
||||||
type: Array,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
tableList: [],
|
|
||||||
};
|
|
||||||
this.selectTableShow = true;
|
|
||||||
},
|
|
||||||
// 打开设备选择窗口 ——表格
|
|
||||||
openTableSelectDialog() {
|
|
||||||
this.selectResult = {};
|
|
||||||
this.tableSelectOption = {
|
|
||||||
otherOption: {
|
|
||||||
tableType: "device",
|
|
||||||
},
|
|
||||||
queryOpt: {
|
|
||||||
disable: false,
|
|
||||||
labelWidth: "68px",
|
|
||||||
params: {
|
|
||||||
deviceName: "",
|
|
||||||
deviceType: "GATEWAY_CONTROLLER",
|
|
||||||
// parentId: '0'
|
|
||||||
},
|
|
||||||
page: {
|
|
||||||
pageSize: 10,
|
|
||||||
pageNum: 1,
|
|
||||||
total: 0,
|
|
||||||
},
|
|
||||||
inline: true,
|
|
||||||
queryChilds: [
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
placeholder: "设备名称",
|
|
||||||
clearable: true,
|
|
||||||
label: "设备名称",
|
|
||||||
type: "input",
|
|
||||||
key: "deviceName",
|
|
||||||
size: "small",
|
|
||||||
value: "",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
tableOpt: {
|
|
||||||
loading: false,
|
|
||||||
rowKey: "deviceId",
|
|
||||||
selection: false,
|
|
||||||
maxHeight: "45vh",
|
|
||||||
childs: [
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "所属型号",
|
|
||||||
type: "",
|
|
||||||
prop: "modelName",
|
|
||||||
align: "left",
|
|
||||||
width: "",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "设备名称",
|
|
||||||
type: "",
|
|
||||||
prop: "deviceName",
|
|
||||||
align: "left",
|
|
||||||
width: "",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "设备Key",
|
|
||||||
type: "",
|
|
||||||
prop: "deviceKey",
|
|
||||||
align: "left",
|
|
||||||
width: "",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "创建时间",
|
|
||||||
type: "time",
|
|
||||||
prop: "createTime",
|
|
||||||
align: "center",
|
|
||||||
width: "160",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
tableList: {
|
|
||||||
type: Array,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
tableList: [],
|
|
||||||
};
|
|
||||||
this.selectTableShow = true;
|
|
||||||
},
|
|
||||||
// 查询回调
|
|
||||||
childGetList(data) {
|
|
||||||
if (data.otherOption.tableType === "device") {
|
|
||||||
this.deviceChildList(data);
|
|
||||||
} else if (data.otherOption.tableType === "model") {
|
|
||||||
this.modelChildList(data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
initGetModelList() {
|
|
||||||
listModel({
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 99999,
|
|
||||||
}).then((response) => {
|
|
||||||
this.queryModelOpt = response.rows;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
modelChildList(data) {
|
|
||||||
listModel(Object.assign(data.page, data.param, { selected: 1 })).then(
|
|
||||||
(response) => {
|
|
||||||
this.tableSelectOption.tableList = response.rows;
|
|
||||||
this.tableSelectOption.queryOpt.page.total = Number(response.total);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
deviceChildList(data) {
|
|
||||||
listDevice(Object.assign(data.page, data.param, { selected: 1 })).then(
|
|
||||||
(response) => {
|
|
||||||
this.tableSelectOption.tableList = response.rows;
|
|
||||||
this.tableSelectOption.queryOpt.page.total = Number(response.total);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
// 根据 型号id 获取 型号详情
|
// 根据 型号id 获取 型号详情
|
||||||
getModelInfoById(modelId) {
|
getModelInfoById(modelId) {
|
||||||
getModel(modelId).then((res) => {
|
getModel(modelId).then((res) => {
|
||||||
this.$refs.paramWrap.setList(res.data.paramList || []);
|
this.$refs.paramWrap.setList(res.data.paramList || []);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 点击或者双击数据回调
|
|
||||||
returnEvent(data) {
|
|
||||||
if (data.type === "dblclick") {
|
|
||||||
if (data.otherOption.tableType === "device") {
|
|
||||||
this.form.parentId = data.value.deviceId;
|
|
||||||
this.form.parentName = data.value.deviceName;
|
|
||||||
} else if (data.otherOption.tableType === "model") {
|
|
||||||
this.getModelInfoById(data.value.modelId);
|
|
||||||
this.form.modelId = data.value.modelId;
|
|
||||||
this.form.modelName = data.value.modelName;
|
|
||||||
this.form.deviceType = data.value.deviceType;
|
|
||||||
this.form.prodKey = data.value.prodKey;
|
|
||||||
this.deviceTypeChange(this.form.deviceType);
|
|
||||||
}
|
|
||||||
this.selectTableShow = false;
|
|
||||||
} else if (data.type === "click") {
|
|
||||||
this.selectResult = {};
|
|
||||||
if (data.otherOption.tableType === "device") {
|
|
||||||
this.selectResult.parentId = data.value.deviceId;
|
|
||||||
this.selectResult.parentName = data.value.deviceName;
|
|
||||||
} else if (data.otherOption.tableType === "model") {
|
|
||||||
this.selectResult.modelId = data.value.modelId;
|
|
||||||
this.selectResult.modelName = data.value.modelName;
|
|
||||||
this.selectResult.deviceType = data.value.deviceType;
|
|
||||||
// this.selectResult.paramList = data.value.paramList;
|
|
||||||
this.selectResult.prodKey = data.value.prodKey;
|
|
||||||
}
|
|
||||||
this.selectResult.tableType = data.otherOption.tableType;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 点击确定按钮
|
|
||||||
resuleClick() {
|
|
||||||
if (this.selectResult.tableType === "device") {
|
|
||||||
this.form.parentId = this.selectResult.parentId;
|
|
||||||
this.form.parentName = this.selectResult.parentName;
|
|
||||||
} else if (this.selectResult.tableType === "model") {
|
|
||||||
this.form.modelId = this.selectResult.modelId;
|
|
||||||
this.form.prodKey = this.selectResult.prodKey;
|
|
||||||
this.form.modelName = this.selectResult.modelName;
|
|
||||||
this.form.deviceType = this.selectResult.deviceType;
|
|
||||||
this.deviceTypeChange(this.form.deviceType);
|
|
||||||
this.getModelInfoById(this.selectResult.modelId);
|
|
||||||
// this.$refs.paramWrap.setList(this.selectResult.paramList || []);
|
|
||||||
}
|
|
||||||
this.selectTableShow = false;
|
|
||||||
},
|
|
||||||
deviceTypeChange(val) {
|
deviceTypeChange(val) {
|
||||||
if (val !== "MINIATURE_BREAKER") {
|
if (val !== "MINIATURE_BREAKER") {
|
||||||
this.form.parentId = 0;
|
this.form.parentId = 0;
|
||||||
|
@ -916,7 +795,7 @@ export default {
|
||||||
paramList: [],
|
paramList: [],
|
||||||
deviceKey: "",
|
deviceKey: "",
|
||||||
lineType: undefined,
|
lineType: undefined,
|
||||||
deviceTag: '',
|
deviceTag: "",
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container iot-project">
|
<div class="app-container iot-project">
|
||||||
<component :is="componectVal" :sourceId="sourceId" @linkToTable="linkToTable"></component>
|
<component
|
||||||
|
:is="componectVal"
|
||||||
|
:sourceId="sourceId"
|
||||||
|
@linkToTable="linkToTable"
|
||||||
|
></component>
|
||||||
|
|
||||||
<div v-show="componectVal === ''">
|
<div v-show="componectVal === ''">
|
||||||
<el-form
|
<el-form
|
||||||
|
@ -20,7 +24,12 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目类型" prop="industry">
|
<el-form-item label="项目类型" prop="industry">
|
||||||
<el-select v-model="queryParams.industry" placeholder="请选择项目类型" clearable size="small">
|
<el-select
|
||||||
|
v-model="queryParams.industry"
|
||||||
|
placeholder="请选择项目类型"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in projectTypeOptions"
|
v-for="dict in projectTypeOptions"
|
||||||
:key="dict.dictValue"
|
:key="dict.dictValue"
|
||||||
|
@ -30,8 +39,16 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
@ -44,15 +61,19 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['iot:project:add']"
|
v-hasPermi="['iot:project:add']"
|
||||||
>新增</el-button>
|
>新增</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="projectList"
|
:data="projectList"
|
||||||
:default-sort="{prop: 'createTime', order: 'descending'}"
|
:default-sort="{ prop: 'createTime', order: 'descending' }"
|
||||||
@sort-change="sortChange"
|
@sort-change="sortChange"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -62,7 +83,12 @@
|
||||||
:index="indexFormatter"
|
:index="indexFormatter"
|
||||||
width="80px"
|
width="80px"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column label="项目名称" width="200px" align="left" prop="projectName" />
|
<el-table-column
|
||||||
|
label="项目名称"
|
||||||
|
width="200px"
|
||||||
|
align="left"
|
||||||
|
prop="projectName"
|
||||||
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="项目类型"
|
label="项目类型"
|
||||||
align="center"
|
align="center"
|
||||||
|
@ -70,8 +96,13 @@
|
||||||
:formatter="statusFormat"
|
:formatter="statusFormat"
|
||||||
prop="industry"
|
prop="industry"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="行政区划" align="left" width="250" prop="regionalismFullName" />
|
<el-table-column
|
||||||
<el-table-column label="项目地址" align="left" prop="projectAddress" >
|
label="行政区划"
|
||||||
|
align="left"
|
||||||
|
width="250"
|
||||||
|
prop="regionalismFullName"
|
||||||
|
/>
|
||||||
|
<el-table-column label="项目地址" align="left" prop="projectAddress">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span class="lay-table-textarea" :title="scope.row.projectAddress">
|
<span class="lay-table-textarea" :title="scope.row.projectAddress">
|
||||||
{{ scope.row.projectAddress }}
|
{{ scope.row.projectAddress }}
|
||||||
|
@ -97,21 +128,24 @@
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
@click="handleDetails(scope.row)"
|
@click="handleDetails(scope.row)"
|
||||||
>详情</el-button>
|
>详情</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['iot:project:edit']"
|
v-hasPermi="['iot:project:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['iot:project:remove']"
|
v-hasPermi="['iot:project:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -125,23 +159,37 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改项目对话框 -->
|
<!-- 添加或修改项目对话框 -->
|
||||||
<dialog-template :title="title" :visible="open" @close="open = false"
|
<dialog-template
|
||||||
class="eldialog-wrap"
|
:title="title"
|
||||||
|
:visible="open"
|
||||||
width="720px"
|
@close="open = false"
|
||||||
|
class="eldialog-wrap"
|
||||||
|
width="720px"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="100px"
|
||||||
|
slot="dialog-center"
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px" slot="dialog-center">
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="项目名称:" prop="projectName">
|
<el-form-item label="项目名称:" prop="projectName">
|
||||||
<el-input v-model="form.projectName" placeholder="请输入项目名称" />
|
<el-input
|
||||||
|
v-model="form.projectName"
|
||||||
|
placeholder="请输入项目名称"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="项目类型:" prop="industry">
|
<el-form-item label="项目类型:" prop="industry">
|
||||||
<el-select v-model="form.industry" style="width: 100%;" placeholder="请选择项目类型">
|
<el-select
|
||||||
|
v-model="form.industry"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请选择项目类型"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in projectTypeOptions"
|
v-for="dict in projectTypeOptions"
|
||||||
:key="dict.dictValue"
|
:key="dict.dictValue"
|
||||||
|
@ -153,11 +201,19 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-form-item label="电价合同:" >
|
<el-form-item label="电价合同:">
|
||||||
<el-input v-model="form.contractName" suffix-icon="el-icon-caret-bottom" @focus="inputFocusContract()" placeholder="请输入电价合同" />
|
<e-dialog-table-input
|
||||||
|
:table="selectPriceTable"
|
||||||
|
:refurbishFun="listContract"
|
||||||
|
showFileName="contractName"
|
||||||
|
fileName="contractId,contractName"
|
||||||
|
v-model="form.contractName"
|
||||||
|
title="合同"
|
||||||
|
psize="small"
|
||||||
|
@change="handleProiceDialogEvent"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
<el-form-item label="行政区划" prop="regionalismId">
|
<el-form-item label="行政区划" prop="regionalismId">
|
||||||
<!-- <el-input v-model="form.regionalismId" placeholder="请输入行政区划代码" /> -->
|
<!-- <el-input v-model="form.regionalismId" placeholder="请输入行政区划代码" /> -->
|
||||||
<treeselect
|
<treeselect
|
||||||
|
@ -173,13 +229,21 @@
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="项目经度" prop="projectLng">
|
<el-form-item label="项目经度" prop="projectLng">
|
||||||
<el-input v-model="form.projectLng" disabled placeholder="请输入项目经度" />
|
<el-input
|
||||||
|
v-model="form.projectLng"
|
||||||
|
disabled
|
||||||
|
placeholder="请输入项目经度"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="项目纬度" prop="projectLat">
|
<el-form-item label="项目纬度" prop="projectLat">
|
||||||
<el-input v-model="form.projectLat" disabled placeholder="请输入项目纬度" />
|
<el-input
|
||||||
|
v-model="form.projectLat"
|
||||||
|
disabled
|
||||||
|
placeholder="请输入项目纬度"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -200,24 +264,28 @@
|
||||||
trigger="manual"
|
trigger="manual"
|
||||||
v-model="visible"
|
v-model="visible"
|
||||||
>
|
>
|
||||||
<i slot="reference" class="el-icon-map-location" @click="mapClick"></i>
|
<i
|
||||||
|
slot="reference"
|
||||||
|
class="el-icon-map-location"
|
||||||
|
@click="mapClick"
|
||||||
|
></i>
|
||||||
<!-- 地图模块选择和设置 -->
|
<!-- 地图模块选择和设置 -->
|
||||||
<slot>
|
<slot>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="7">
|
<el-col :span="7">
|
||||||
<span>经度:{{mapForm.lng}}</span>
|
<span>经度:{{ mapForm.lng }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7">
|
<el-col :span="7">
|
||||||
<span>纬度:{{mapForm.lat}}</span>
|
<span>纬度:{{ mapForm.lat }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<span>地址:{{mapForm.address}}</span>
|
<span>地址:{{ mapForm.address }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<shop-location
|
<shop-location
|
||||||
v-if="visible === true"
|
v-if="visible === true"
|
||||||
style="height: 300px;"
|
style="height: 300px"
|
||||||
:mapCenter="mapCenter"
|
:mapCenter="mapCenter"
|
||||||
:draggable="true"
|
:draggable="true"
|
||||||
@mapEvent="mapEvent"
|
@mapEvent="mapEvent"
|
||||||
|
@ -232,9 +300,11 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<el-button type="primary" @click="mapSureClick">确 定</el-button>
|
<el-button type="primary" @click="mapSureClick"
|
||||||
|
>确 定</el-button
|
||||||
|
>
|
||||||
<el-button @click="visible = false">取 消</el-button>
|
<el-button @click="visible = false">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</slot>
|
</slot>
|
||||||
|
@ -247,60 +317,54 @@
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="联系方式1" prop="contacts1">
|
<el-form-item label="联系方式1" prop="contacts1">
|
||||||
<el-input v-model="form.contacts1" placeholder="请输入联系方式1" />
|
<el-input
|
||||||
|
v-model="form.contacts1"
|
||||||
|
placeholder="请输入联系方式1"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="联系方式2" prop="contacts2">
|
<el-form-item label="联系方式2" prop="contacts2">
|
||||||
<el-input v-model="form.contacts2" placeholder="请输入联系方式2" />
|
<el-input
|
||||||
|
v-model="form.contacts2"
|
||||||
|
placeholder="请输入联系方式2"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="联系方式3" prop="contacts3">
|
<el-form-item label="联系方式3" prop="contacts3">
|
||||||
<el-input v-model="form.contacts3" placeholder="请输入联系方式3" />
|
<el-input
|
||||||
|
v-model="form.contacts3"
|
||||||
|
placeholder="请输入联系方式3"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-form-item label="总路设备:" >
|
<el-form-item label="总路设备:">
|
||||||
<el-input v-model="form.projectDeviceName" suffix-icon="el-icon-caret-bottom" @focus="openTableSelectDialog()" placeholder="请输入总路设备" />
|
<e-dialog-table-input
|
||||||
|
:table="selectDeviceTable"
|
||||||
|
:refurbishFun="listDevice"
|
||||||
|
showFileName="deviceName"
|
||||||
|
fileName="deviceId,deviceName"
|
||||||
|
v-model="form.projectDeviceName"
|
||||||
|
title="设备"
|
||||||
|
psize="small"
|
||||||
|
@change="handleDeviceDialogEvent"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="dialog-footer" class="dialog-footer">
|
<div slot="dialog-footer" class="dialog-footer">
|
||||||
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
<el-button size="mini" type="primary" @click="submitForm"
|
||||||
|
>确 定</el-button
|
||||||
|
>
|
||||||
<el-button size="mini" @click="cancel">取 消</el-button>
|
<el-button size="mini" @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</dialog-template>
|
</dialog-template>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog
|
|
||||||
title="选择"
|
|
||||||
:visible.sync="selectTableShow"
|
|
||||||
width="75%"
|
|
||||||
top="10vh"
|
|
||||||
class="select-table-dialog"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<select-table-wrap
|
|
||||||
v-if="selectTableShow"
|
|
||||||
:tableOption="tableSelectOption.tableOpt"
|
|
||||||
:queryOption="tableSelectOption.queryOpt"
|
|
||||||
:tableList="tableSelectOption.tableList"
|
|
||||||
@parentGetList="childGetList($event)"
|
|
||||||
:otherOption="tableSelectOption.otherOption"
|
|
||||||
@returnEvent="returnEvent($event)"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button size="mini" type="primary" @click="resultClick">确 定</el-button>
|
|
||||||
<el-button size="mini" @click="() =>{selectTableShow = false}">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
<!-- <div class="to-home-wrap2" @click="linkToTable" v-show="componectVal !== ''">
|
<!-- <div class="to-home-wrap2" @click="linkToTable" v-show="componectVal !== ''">
|
||||||
<el-button icon="el-icon-d-arrow-left" title="返回列表" circle>返回列表</el-button>
|
<el-button icon="el-icon-d-arrow-left" title="返回列表" circle>返回列表</el-button>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
@ -314,25 +378,172 @@ import {
|
||||||
delProject,
|
delProject,
|
||||||
addProject,
|
addProject,
|
||||||
updateProject,
|
updateProject,
|
||||||
exportProject
|
exportProject,
|
||||||
} from "@/api/iot/project";
|
} from "@/api/iot/project";
|
||||||
import {
|
import { listDevice } from "@/api/iot/device";
|
||||||
listDevice
|
import { listContract } from "@/api/iot/contract";
|
||||||
} from "@/api/iot/device";
|
|
||||||
import {
|
|
||||||
listContract
|
|
||||||
} from "@/api/iot/contract";
|
|
||||||
import { listRegionalism } from "@/api/system/regionalism";
|
import { listRegionalism } from "@/api/system/regionalism";
|
||||||
import { initMap, gjzCode } from "@/utils/latlngFromAddress.js";
|
import { initMap, gjzCode } from "@/utils/latlngFromAddress.js";
|
||||||
import ShopLocation from "@/components/Amap/components/shopLocation/index";
|
import ShopLocation from "@/components/Amap/components/shopLocation/index";
|
||||||
import DetailsWrap from "./profile/details";
|
import DetailsWrap from "./profile/details";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
import SelectTableWrap from "@/components/SelectTable/index";
|
|
||||||
import DialogTemplate from "@/components/DialogTemplate/index";
|
import DialogTemplate from "@/components/DialogTemplate/index";
|
||||||
|
|
||||||
|
import EDialogTableInput from "@/components/EDialogTableInput";
|
||||||
|
|
||||||
/////、、、、、、、、、、、、、、、、、、、、
|
/////、、、、、、、、、、、、、、、、、、、、
|
||||||
import DetailsWrapNew from './profileV2/details'
|
import EDetailsWrap from "./profileV2/details";
|
||||||
|
|
||||||
|
const selectDeviceTable = {
|
||||||
|
otherOption: {
|
||||||
|
tableType: "device",
|
||||||
|
},
|
||||||
|
queryOption: {
|
||||||
|
disable: false,
|
||||||
|
labelWidth: "68px",
|
||||||
|
params: {
|
||||||
|
deviceName: "",
|
||||||
|
parentId: 0,
|
||||||
|
deviceType: "MINIATURE_BREAKER",
|
||||||
|
},
|
||||||
|
inline: true,
|
||||||
|
queryChilds: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
placeholder: "设备名称",
|
||||||
|
clearable: true,
|
||||||
|
label: "设备名称",
|
||||||
|
type: "input",
|
||||||
|
key: "deviceName",
|
||||||
|
size: "small",
|
||||||
|
value: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
tableOption: {
|
||||||
|
loading: false,
|
||||||
|
rowKey: "deviceId",
|
||||||
|
selection: false,
|
||||||
|
maxHeight: "45vh",
|
||||||
|
childs: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "所属型号",
|
||||||
|
type: "",
|
||||||
|
prop: "modelName",
|
||||||
|
align: "left",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "设备名称",
|
||||||
|
type: "",
|
||||||
|
prop: "deviceName",
|
||||||
|
align: "left",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "设备Key",
|
||||||
|
type: "",
|
||||||
|
prop: "deviceKey",
|
||||||
|
align: "left",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "创建时间",
|
||||||
|
type: "time",
|
||||||
|
prop: "createTime",
|
||||||
|
align: "center",
|
||||||
|
width: "160",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const selectPriceTable = {
|
||||||
|
otherOption: {
|
||||||
|
tableType: "project",
|
||||||
|
},
|
||||||
|
queryOption: {
|
||||||
|
disable: false,
|
||||||
|
labelWidth: "68px",
|
||||||
|
params: {
|
||||||
|
contractName: "",
|
||||||
|
modelCode: "",
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
pageSize: 10,
|
||||||
|
pageNum: 1,
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
inline: true,
|
||||||
|
queryChilds: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
placeholder: "合同名称",
|
||||||
|
clearable: true,
|
||||||
|
label: "合同名称",
|
||||||
|
type: "input",
|
||||||
|
key: "contractName",
|
||||||
|
size: "small",
|
||||||
|
value: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
tableOption: {
|
||||||
|
loading: false,
|
||||||
|
rowKey: "deviceId",
|
||||||
|
selection: false,
|
||||||
|
maxHeight: "45vh",
|
||||||
|
childs: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "合同名称",
|
||||||
|
type: "",
|
||||||
|
prop: "contractName",
|
||||||
|
align: "left",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "计价类型",
|
||||||
|
type: "",
|
||||||
|
prop: "contractType",
|
||||||
|
align: "left",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "strType",
|
||||||
|
option: {
|
||||||
|
PEAK_VALLEY: "峰谷时段计价",
|
||||||
|
LADDER: "阶梯计价",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "状态",
|
||||||
|
type: "",
|
||||||
|
prop: "status",
|
||||||
|
align: "left",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "text1",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Project",
|
name: "Project",
|
||||||
|
@ -340,12 +551,14 @@ export default {
|
||||||
ShopLocation,
|
ShopLocation,
|
||||||
Treeselect,
|
Treeselect,
|
||||||
DetailsWrap,
|
DetailsWrap,
|
||||||
SelectTableWrap,
|
EDetailsWrap,
|
||||||
DetailsWrapNew,
|
DialogTemplate,
|
||||||
DialogTemplate
|
EDialogTableInput,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
selectPriceTable,
|
||||||
|
selectDeviceTable,
|
||||||
selectTableShow: false,
|
selectTableShow: false,
|
||||||
tableSelectOption: {},
|
tableSelectOption: {},
|
||||||
selectResult: {},
|
selectResult: {},
|
||||||
|
@ -377,35 +590,35 @@ export default {
|
||||||
projectAddress: null,
|
projectAddress: null,
|
||||||
projectStatus: null,
|
projectStatus: null,
|
||||||
orderByColumn: "createTime",
|
orderByColumn: "createTime",
|
||||||
isAsc: "desc"
|
isAsc: "desc",
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
projectName: [
|
projectName: [
|
||||||
{ required: true, message: "项目名称不能为空", trigger: "blur" }
|
{ required: true, message: "项目名称不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
industry: [
|
industry: [
|
||||||
{ required: true, message: "项目类型不能为空", trigger: "blur" }
|
{ required: true, message: "项目类型不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
regionalismId: [
|
regionalismId: [
|
||||||
{ required: true, message: "行政区划不能为空", trigger: "change" }
|
{ required: true, message: "行政区划不能为空", trigger: "change" },
|
||||||
],
|
],
|
||||||
projectAddress: [
|
projectAddress: [
|
||||||
{ required: true, message: "项目地址不能为空", trigger: "change" }
|
{ required: true, message: "项目地址不能为空", trigger: "change" },
|
||||||
],
|
],
|
||||||
projectLng: [
|
projectLng: [
|
||||||
{ required: true, message: "经度不能为空", trigger: "change" }
|
{ required: true, message: "经度不能为空", trigger: "change" },
|
||||||
],
|
],
|
||||||
projectLat: [
|
projectLat: [
|
||||||
{ required: true, message: "纬度不能为空", trigger: "change" }
|
{ required: true, message: "纬度不能为空", trigger: "change" },
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
projectTypeOptions: [],
|
projectTypeOptions: [],
|
||||||
mapCenter: {
|
mapCenter: {
|
||||||
lng: 119.459889,
|
lng: 119.459889,
|
||||||
lat: 25.98974
|
lat: 25.98974,
|
||||||
},
|
},
|
||||||
baiduMapKey: "N05AG95Umzs3fouk6WpFqtGxcDlw0fRn",
|
baiduMapKey: "N05AG95Umzs3fouk6WpFqtGxcDlw0fRn",
|
||||||
zoom: 15,
|
zoom: 15,
|
||||||
|
@ -417,255 +630,36 @@ export default {
|
||||||
regionalismOption: [],
|
regionalismOption: [],
|
||||||
componectVal: "",
|
componectVal: "",
|
||||||
sourceId: "",
|
sourceId: "",
|
||||||
userType: ''
|
userType: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (this.$route.query['projectId']) {
|
if (this.$route.query["projectId"]) {
|
||||||
this.handleDetails(this.$route.query)
|
this.handleDetails(this.$route.query);
|
||||||
}
|
}
|
||||||
this.getDicts("project_industry").then(response => {
|
this.getDicts("project_industry").then((response) => {
|
||||||
this.projectTypeOptions = response.data;
|
this.projectTypeOptions = response.data;
|
||||||
});
|
});
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getTreeselect();
|
this.getTreeselect();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 打开设备选择窗口 ——表格
|
listContract,
|
||||||
openTableSelectDialog() {
|
listDevice,
|
||||||
this.selectResult = {};
|
handleProiceDialogEvent(e) {
|
||||||
this.tableSelectOption = {
|
this.form.contractId = e.contractId;
|
||||||
otherOption: {
|
this.form.contractName = e.contractName;
|
||||||
tableType: "device"
|
this.$forceUpdate();
|
||||||
},
|
|
||||||
queryOpt: {
|
|
||||||
disable: false,
|
|
||||||
labelWidth: "68px",
|
|
||||||
params: {
|
|
||||||
deviceName: "",
|
|
||||||
modelId: "",
|
|
||||||
parentId: 0,
|
|
||||||
deviceType: "MINIATURE_BREAKER"
|
|
||||||
},
|
|
||||||
page: {
|
|
||||||
pageSize: 10,
|
|
||||||
pageNum: 1,
|
|
||||||
total: 0
|
|
||||||
},
|
|
||||||
inline: true,
|
|
||||||
queryChilds: [
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
placeholder: "设备名称",
|
|
||||||
clearable: true,
|
|
||||||
label: "设备名称",
|
|
||||||
type: "input",
|
|
||||||
key: "deviceName",
|
|
||||||
size: "small",
|
|
||||||
value: ""
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
tableOpt: {
|
|
||||||
loading: false,
|
|
||||||
rowKey: "deviceId",
|
|
||||||
selection: false,
|
|
||||||
maxHeight: "45vh",
|
|
||||||
childs: [
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "所属型号",
|
|
||||||
type: "",
|
|
||||||
prop: "modelName",
|
|
||||||
align: "left",
|
|
||||||
width: "",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "设备名称",
|
|
||||||
type: "",
|
|
||||||
prop: "deviceName",
|
|
||||||
align: "left",
|
|
||||||
width: "",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "设备Key",
|
|
||||||
type: "",
|
|
||||||
prop: "deviceKey",
|
|
||||||
align: "left",
|
|
||||||
width: "",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "创建时间",
|
|
||||||
type: "time",
|
|
||||||
prop: "createTime",
|
|
||||||
align: "center",
|
|
||||||
width: "160",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
tableList: {
|
|
||||||
type: Array
|
|
||||||
}
|
|
||||||
},
|
|
||||||
tableList: []
|
|
||||||
};
|
|
||||||
this.selectTableShow = true;
|
|
||||||
},
|
},
|
||||||
// 开启 电价合同选择的 弹窗
|
handleDeviceDialogEvent(e) {
|
||||||
inputFocusContract() {
|
this.form.projectDevice = e.deviceId;
|
||||||
this.selectResult = {};
|
this.form.projectDeviceName = e.deviceName;
|
||||||
this.tableSelectOption = {
|
this.$forceUpdate();
|
||||||
otherOption: {
|
|
||||||
tableType: "model"
|
|
||||||
},
|
|
||||||
queryOpt: {
|
|
||||||
disable: false,
|
|
||||||
labelWidth: "68px",
|
|
||||||
params: {
|
|
||||||
contractName: "",
|
|
||||||
modelCode: ""
|
|
||||||
},
|
|
||||||
page: {
|
|
||||||
pageSize: 10,
|
|
||||||
pageNum: 1,
|
|
||||||
total: 0
|
|
||||||
},
|
|
||||||
inline: true,
|
|
||||||
queryChilds: [
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
placeholder: "合同名称",
|
|
||||||
clearable: true,
|
|
||||||
label: "合同名称",
|
|
||||||
type: "input",
|
|
||||||
key: "contractName",
|
|
||||||
size: "small",
|
|
||||||
value: ""
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
tableOpt: {
|
|
||||||
loading: false,
|
|
||||||
rowKey: "deviceId",
|
|
||||||
selection: false,
|
|
||||||
maxHeight: "45vh",
|
|
||||||
childs: [
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "合同名称",
|
|
||||||
type: "",
|
|
||||||
prop: "contractName",
|
|
||||||
align: "left",
|
|
||||||
width: "",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "计价类型",
|
|
||||||
type: "",
|
|
||||||
prop: "contractType",
|
|
||||||
align: "left",
|
|
||||||
width: "",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "strType",
|
|
||||||
option: {
|
|
||||||
PEAK_VALLEY: "峰谷时段计价",
|
|
||||||
LADDER: "阶梯计价"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "状态",
|
|
||||||
type: "",
|
|
||||||
prop: "status",
|
|
||||||
align: "left",
|
|
||||||
width: "",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "text1"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
tableList: {
|
|
||||||
type: Array
|
|
||||||
}
|
|
||||||
},
|
|
||||||
tableList: []
|
|
||||||
};
|
|
||||||
this.selectTableShow = true;
|
|
||||||
},
|
|
||||||
// 查询回调
|
|
||||||
childGetList(data) {
|
|
||||||
if (data.otherOption.tableType === "device") {
|
|
||||||
this.deviceChildList(data);
|
|
||||||
} else if (data.otherOption.tableType === "model") {
|
|
||||||
this.getListContract(data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 电价合同查询
|
|
||||||
getListContract(data) {
|
|
||||||
listContract(Object.assign(data.page, data.param, { selected: 1 })).then(
|
|
||||||
response => {
|
|
||||||
this.tableSelectOption.tableList = response.rows;
|
|
||||||
this.tableSelectOption.queryOpt.page.total = Number(response.total);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
deviceChildList(data) {
|
|
||||||
listDevice(Object.assign(data.page, data.param, { selected: 1 })).then(
|
|
||||||
response => {
|
|
||||||
this.tableSelectOption.tableList = response.rows;
|
|
||||||
this.tableSelectOption.queryOpt.page.total = Number(response.total);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
// 点击或者双击数据回调
|
|
||||||
returnEvent(data) {
|
|
||||||
if (data.type === "dblclick") {
|
|
||||||
if (data.otherOption.tableType === "device") {
|
|
||||||
this.form.projectDevice = data.value.deviceId;
|
|
||||||
this.form.projectDeviceName = data.value.deviceName;
|
|
||||||
} else if (data.otherOption.tableType === "model") {
|
|
||||||
this.form.contractId = data.value.contractId;
|
|
||||||
this.form.contractName = data.value.contractName;
|
|
||||||
}
|
|
||||||
this.selectTableShow = false;
|
|
||||||
} else if (data.type === "click") {
|
|
||||||
this.selectResult = {};
|
|
||||||
if (data.otherOption.tableType === "device") {
|
|
||||||
this.selectResult.projectDevice = data.value.deviceId;
|
|
||||||
this.selectResult.projectDeviceName = data.value.deviceName;
|
|
||||||
} else if (data.otherOption.tableType === "model") {
|
|
||||||
this.selectResult.contractId = data.value.contractId;
|
|
||||||
this.selectResult.contractName = data.value.contractName;
|
|
||||||
}
|
|
||||||
this.selectResult.tableType = data.otherOption.tableType;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 点击确定按钮
|
|
||||||
resultClick() {
|
|
||||||
if (this.selectResult.tableType === "device") {
|
|
||||||
this.form.projectDevice = this.selectResult.projectDevice;
|
|
||||||
this.form.projectDeviceName = this.selectResult.projectDeviceName;
|
|
||||||
} else if (this.selectResult.tableType === "model") {
|
|
||||||
this.form.contractId = this.selectResult.contractId;
|
|
||||||
this.form.contractName = this.selectResult.contractName;
|
|
||||||
}
|
|
||||||
this.selectTableShow = false;
|
|
||||||
},
|
},
|
||||||
sortChange(column) {
|
sortChange(column) {
|
||||||
const sort = {
|
const sort = {
|
||||||
isAsc: column.order === "descending" ? "desc" : "asc",
|
isAsc: column.order === "descending" ? "desc" : "asc",
|
||||||
orderByColumn: column.prop
|
orderByColumn: column.prop,
|
||||||
};
|
};
|
||||||
this.queryParams = Object.assign(this.queryParams, sort);
|
this.queryParams = Object.assign(this.queryParams, sort);
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
|
@ -677,12 +671,12 @@ export default {
|
||||||
},
|
},
|
||||||
handleDetails(row) {
|
handleDetails(row) {
|
||||||
this.sourceId = row.projectId;
|
this.sourceId = row.projectId;
|
||||||
this.componectVal = "DetailsWrapNew";
|
this.componectVal = "EDetailsWrap";
|
||||||
},
|
},
|
||||||
// 跳转详情页
|
// 跳转详情页
|
||||||
linkToTable() {
|
linkToTable() {
|
||||||
if (this.$route.query['projectId']) {
|
if (this.$route.query["projectId"]) {
|
||||||
this.$router.push('/project/project')
|
this.$router.push("/project/project");
|
||||||
}
|
}
|
||||||
this.componectVal = "";
|
this.componectVal = "";
|
||||||
},
|
},
|
||||||
|
@ -692,12 +686,12 @@ export default {
|
||||||
},
|
},
|
||||||
/** 查询行政区划下拉树结构 */
|
/** 查询行政区划下拉树结构 */
|
||||||
getTreeselect() {
|
getTreeselect() {
|
||||||
listRegionalism().then(response => {
|
listRegionalism().then((response) => {
|
||||||
this.regionalismOption = [];
|
this.regionalismOption = [];
|
||||||
const data = {
|
const data = {
|
||||||
regionalismId: 0,
|
regionalismId: 0,
|
||||||
regionalismName: "中国",
|
regionalismName: "中国",
|
||||||
children: []
|
children: [],
|
||||||
};
|
};
|
||||||
data.children = this.handleTree(
|
data.children = this.handleTree(
|
||||||
response.data,
|
response.data,
|
||||||
|
@ -715,13 +709,13 @@ export default {
|
||||||
return {
|
return {
|
||||||
id: node.regionalismId,
|
id: node.regionalismId,
|
||||||
label: node.regionalismName,
|
label: node.regionalismName,
|
||||||
children: node.children
|
children: node.children,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
regionalismChange(val) {
|
regionalismChange(val) {
|
||||||
this.mapCenter = {
|
this.mapCenter = {
|
||||||
lng: val.stationLng,
|
lng: val.stationLng,
|
||||||
lat: val.stationLat
|
lat: val.stationLat,
|
||||||
};
|
};
|
||||||
this.form.projectLng = val.stationLng;
|
this.form.projectLng = val.stationLng;
|
||||||
this.form.projectLat = val.stationLat;
|
this.form.projectLat = val.stationLat;
|
||||||
|
@ -751,7 +745,7 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.mapCenter = {
|
this.mapCenter = {
|
||||||
lng: 119.459889,
|
lng: 119.459889,
|
||||||
lat: 25.98974
|
lat: 25.98974,
|
||||||
};
|
};
|
||||||
this.mapForm.lng = 119.459889;
|
this.mapForm.lng = 119.459889;
|
||||||
this.mapForm.lat = 25.98974;
|
this.mapForm.lat = 25.98974;
|
||||||
|
@ -774,7 +768,7 @@ export default {
|
||||||
gjzCode(this.form.projectAddress, this, {
|
gjzCode(this.form.projectAddress, this, {
|
||||||
form: "form",
|
form: "form",
|
||||||
lat: "shopLat",
|
lat: "shopLat",
|
||||||
lng: "shopLng"
|
lng: "shopLng",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -782,7 +776,7 @@ export default {
|
||||||
/** 查询项目列表 */
|
/** 查询项目列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listProject(this.queryParams).then(response => {
|
listProject(this.queryParams).then((response) => {
|
||||||
this.projectList = response.rows;
|
this.projectList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -802,7 +796,7 @@ export default {
|
||||||
projectAddress: null,
|
projectAddress: null,
|
||||||
projectLng: null,
|
projectLng: null,
|
||||||
projectLat: null,
|
projectLat: null,
|
||||||
projectDevice: '',
|
projectDevice: "",
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
@ -818,7 +812,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.projectId);
|
this.ids = selection.map((item) => item.projectId);
|
||||||
this.single = selection.length !== 1;
|
this.single = selection.length !== 1;
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
|
@ -832,7 +826,7 @@ export default {
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const projectId = row.projectId || this.ids;
|
const projectId = row.projectId || this.ids;
|
||||||
getProject(projectId).then(response => {
|
getProject(projectId).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改项目";
|
this.title = "修改项目";
|
||||||
|
@ -840,16 +834,16 @@ export default {
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.projectId != null) {
|
if (this.form.projectId != null) {
|
||||||
updateProject(this.form).then(response => {
|
updateProject(this.form).then((response) => {
|
||||||
this.msgSuccess("修改成功");
|
this.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addProject(this.form).then(response => {
|
addProject(this.form).then((response) => {
|
||||||
this.msgSuccess("新增成功");
|
this.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -864,9 +858,9 @@ export default {
|
||||||
this.$confirm("是否删除该选项?", "警告", {
|
this.$confirm("是否删除该选项?", "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(function() {
|
.then(function () {
|
||||||
return delProject(projectIds);
|
return delProject(projectIds);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
@ -880,16 +874,16 @@ export default {
|
||||||
this.$confirm("是否确认导出所有项目数据项?", "警告", {
|
this.$confirm("是否确认导出所有项目数据项?", "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(function() {
|
.then(function () {
|
||||||
return exportProject(queryParams);
|
return exportProject(queryParams);
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then((response) => {
|
||||||
this.download(response.msg);
|
this.download(response.msg);
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
|
@ -0,0 +1,311 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container el-compared-container">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
:inline="true"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
|
<el-form-item label="项目名称" prop="projectName">
|
||||||
|
<e-dialog-table-input
|
||||||
|
:table="selectTable"
|
||||||
|
:refurbishFun="listProject"
|
||||||
|
showFileName="projectName"
|
||||||
|
fileName="projectId,projectName"
|
||||||
|
v-model="queryParams.projectName"
|
||||||
|
:preference="true"
|
||||||
|
title="项目"
|
||||||
|
psize="small"
|
||||||
|
@change="handleDialogEvent"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="时间" prop="time">
|
||||||
|
<el-date-picker v-model="time" type="month" placeholder="选择年">
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<div class="main-echarts">
|
||||||
|
<e-echarts-bar
|
||||||
|
ref="echartsLineTrend"
|
||||||
|
:styles="echartsOption.styles"
|
||||||
|
:colorList="echartsOption.colorList"
|
||||||
|
:eId="echartsOption.eId"
|
||||||
|
:option="resultOption"
|
||||||
|
></e-echarts-bar>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="main-table">
|
||||||
|
<el-table v-loading="loading" :data="tableList">
|
||||||
|
<el-table-column
|
||||||
|
type="index"
|
||||||
|
label="序号"
|
||||||
|
align="center"
|
||||||
|
:index="
|
||||||
|
(val) => {
|
||||||
|
return val + 1 + (queryParams.pageNum - 1) * queryParams.pageSize;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
width="80px"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="项目名称" align="left" prop="projectName" />
|
||||||
|
<el-table-column label="日期" align="left" prop="projectName" />
|
||||||
|
<el-table-column label="本期用量" align="center" prop="industry" />
|
||||||
|
<el-table-column label="同期用量" align="center" prop="electric">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span class="lay-table-textarea">{{
|
||||||
|
Number(scope.row.electric).toFixed(2) || "--"
|
||||||
|
}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="增长值" align="center" prop="coal">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span class="lay-table-textarea">{{
|
||||||
|
Number(scope.row.coal).toFixed(2) || "--"
|
||||||
|
}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="增长率" align="center" prop="coal">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span class="lay-table-textarea">{{
|
||||||
|
Number(scope.row.coal).toFixed(2) || "--"
|
||||||
|
}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { listProject } from "@/api/iot/project";
|
||||||
|
import EDialogTableInput from "@/components/EDialogTableInput";
|
||||||
|
import EEchartsBar from "@/components/Echarts/EEchartsBar";
|
||||||
|
const selectTable = {
|
||||||
|
otherOption: {
|
||||||
|
tableType: "project",
|
||||||
|
},
|
||||||
|
queryOption: {
|
||||||
|
disable: false,
|
||||||
|
labelWidth: "68px",
|
||||||
|
params: {
|
||||||
|
projectName: "",
|
||||||
|
},
|
||||||
|
inline: true,
|
||||||
|
queryChilds: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
placeholder: "项目名称",
|
||||||
|
clearable: true,
|
||||||
|
label: "项目名称",
|
||||||
|
type: "input",
|
||||||
|
key: "projectName",
|
||||||
|
size: "small",
|
||||||
|
value: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
tableOption: {
|
||||||
|
loading: false,
|
||||||
|
rowKey: "projectId",
|
||||||
|
selection: false,
|
||||||
|
maxHeight: "45vh",
|
||||||
|
childs: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "项目名称",
|
||||||
|
type: "",
|
||||||
|
prop: "projectName",
|
||||||
|
align: "left",
|
||||||
|
width: "200",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "行政区划",
|
||||||
|
type: "",
|
||||||
|
prop: "regionalismFullName",
|
||||||
|
align: "left",
|
||||||
|
width: "200",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "项目地址",
|
||||||
|
type: "",
|
||||||
|
prop: "projectAddress",
|
||||||
|
align: "left",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "创建时间",
|
||||||
|
type: "",
|
||||||
|
prop: "createTime",
|
||||||
|
align: "left",
|
||||||
|
width: "160",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "StatisticsCompared",
|
||||||
|
components: {
|
||||||
|
EDialogTableInput,
|
||||||
|
EEchartsBar,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
selectTable,
|
||||||
|
total: 0,
|
||||||
|
queryParams: {
|
||||||
|
projectName: "",
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
time: "",
|
||||||
|
resultOption: {
|
||||||
|
tooltip: {
|
||||||
|
trigger: "axis",
|
||||||
|
axisPointer: {
|
||||||
|
type: "shadow",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
left: "3%",
|
||||||
|
right: "2%",
|
||||||
|
bottom: "2%",
|
||||||
|
top: '2%',
|
||||||
|
containLabel: true,
|
||||||
|
},
|
||||||
|
xAxis: [
|
||||||
|
{
|
||||||
|
type: "category",
|
||||||
|
data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
||||||
|
axisTick: {
|
||||||
|
alignWithLabel: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
type: "value",
|
||||||
|
name: "Kwh",
|
||||||
|
position: "left",
|
||||||
|
alignTicks: true,
|
||||||
|
axisLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: "#1890FF",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
formatter: "{value}",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: "去年",
|
||||||
|
type: "bar",
|
||||||
|
barWidth: "30%",
|
||||||
|
data: [
|
||||||
|
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4,
|
||||||
|
3.3,
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "同期",
|
||||||
|
type: "bar",
|
||||||
|
barWidth: "30%",
|
||||||
|
data: [
|
||||||
|
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0,
|
||||||
|
2.3,
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
echartsOption: {
|
||||||
|
styles: "width: 100%; height: 100%;",
|
||||||
|
colorList: ["#1890FF", "#EE6666", "#FFCC00"],
|
||||||
|
eId: "statisticsComparedEchartsBar",
|
||||||
|
},
|
||||||
|
loading: false,
|
||||||
|
tableList: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.time = new Date();
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
listProject,
|
||||||
|
updateEcharts() {
|
||||||
|
if (this.$refs.echartsLineTrend) {
|
||||||
|
this.$refs.echartsLineTrend.updateEchart();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleDialogEvent(e) {
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.time = this.parseTime(new Date(), "{y}:01:01 00:00:00");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
// console.log(this.time)
|
||||||
|
// console.log('compared-getList:', Object.assign(this.queryParams, {
|
||||||
|
// time: this.parseTime(this.time, '{y}:01:01 00:00:00')
|
||||||
|
// }))
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.el-compared-container {
|
||||||
|
.main-echarts {
|
||||||
|
height: 350px;
|
||||||
|
width: 100%;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
.main-table {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,312 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container el-compared-container">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
:inline="true"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
|
<el-form-item label="项目名称" prop="projectName">
|
||||||
|
<e-dialog-table-input
|
||||||
|
:table="selectTable"
|
||||||
|
:refurbishFun="listProject"
|
||||||
|
type="input"
|
||||||
|
showFileName="projectName"
|
||||||
|
fileName="projectId,projectName"
|
||||||
|
v-model="queryParams.projectName"
|
||||||
|
:preference="true"
|
||||||
|
title="项目"
|
||||||
|
psize="small"
|
||||||
|
@change="handleDialogEvent"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="时间" prop="time">
|
||||||
|
<el-date-picker v-model="time" type="year" placeholder="选择年">
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<div class="main-echarts">
|
||||||
|
<e-echarts-bar
|
||||||
|
ref="echartsLineTrend"
|
||||||
|
:styles="echartsOption.styles"
|
||||||
|
:colorList="echartsOption.colorList"
|
||||||
|
:eId="echartsOption.eId"
|
||||||
|
:option="resultOption"
|
||||||
|
></e-echarts-bar>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="main-table">
|
||||||
|
<el-table v-loading="loading" :data="tableList">
|
||||||
|
<el-table-column
|
||||||
|
type="index"
|
||||||
|
label="序号"
|
||||||
|
align="center"
|
||||||
|
:index="
|
||||||
|
(val) => {
|
||||||
|
return val + 1 + (queryParams.pageNum - 1) * queryParams.pageSize;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
width="80px"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="项目名称" align="left" prop="projectName" />
|
||||||
|
<el-table-column label="日期" align="left" prop="projectName" />
|
||||||
|
<el-table-column label="本期用量" align="center" prop="industry" />
|
||||||
|
<el-table-column label="同期用量" align="center" prop="electric">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span class="lay-table-textarea">{{
|
||||||
|
Number(scope.row.electric).toFixed(2) || "--"
|
||||||
|
}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="增长值" align="center" prop="coal">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span class="lay-table-textarea">{{
|
||||||
|
Number(scope.row.coal).toFixed(2) || "--"
|
||||||
|
}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="增长率" align="center" prop="coal">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span class="lay-table-textarea">{{
|
||||||
|
Number(scope.row.coal).toFixed(2) || "--"
|
||||||
|
}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { listProject } from "@/api/iot/project";
|
||||||
|
import EDialogTableInput from "@/components/EDialogTableInput";
|
||||||
|
import EEchartsBar from "@/components/Echarts/EEchartsBar";
|
||||||
|
const selectTable = {
|
||||||
|
otherOption: {
|
||||||
|
tableType: "project",
|
||||||
|
},
|
||||||
|
queryOption: {
|
||||||
|
disable: false,
|
||||||
|
labelWidth: "68px",
|
||||||
|
params: {
|
||||||
|
projectName: "",
|
||||||
|
},
|
||||||
|
inline: true,
|
||||||
|
queryChilds: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
placeholder: "项目名称",
|
||||||
|
clearable: true,
|
||||||
|
label: "项目名称",
|
||||||
|
type: "input",
|
||||||
|
key: "projectName",
|
||||||
|
size: "small",
|
||||||
|
value: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
tableOption: {
|
||||||
|
loading: false,
|
||||||
|
rowKey: "projectId",
|
||||||
|
selection: false,
|
||||||
|
maxHeight: "45vh",
|
||||||
|
childs: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "项目名称",
|
||||||
|
type: "",
|
||||||
|
prop: "projectName",
|
||||||
|
align: "left",
|
||||||
|
width: "200",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "行政区划",
|
||||||
|
type: "",
|
||||||
|
prop: "regionalismFullName",
|
||||||
|
align: "left",
|
||||||
|
width: "200",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "项目地址",
|
||||||
|
type: "",
|
||||||
|
prop: "projectAddress",
|
||||||
|
align: "left",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "创建时间",
|
||||||
|
type: "",
|
||||||
|
prop: "createTime",
|
||||||
|
align: "left",
|
||||||
|
width: "160",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "StatisticsCompared",
|
||||||
|
components: {
|
||||||
|
EDialogTableInput,
|
||||||
|
EEchartsBar,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
selectTable,
|
||||||
|
total: 0,
|
||||||
|
queryParams: {
|
||||||
|
projectName: "",
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
time: "",
|
||||||
|
resultOption: {
|
||||||
|
tooltip: {
|
||||||
|
trigger: "axis",
|
||||||
|
axisPointer: {
|
||||||
|
type: "shadow",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
left: "3%",
|
||||||
|
right: "2%",
|
||||||
|
bottom: "2%",
|
||||||
|
top: '2%',
|
||||||
|
containLabel: true,
|
||||||
|
},
|
||||||
|
xAxis: [
|
||||||
|
{
|
||||||
|
type: "category",
|
||||||
|
data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
||||||
|
axisTick: {
|
||||||
|
alignWithLabel: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
type: "value",
|
||||||
|
name: "Kwh",
|
||||||
|
position: "left",
|
||||||
|
alignTicks: true,
|
||||||
|
axisLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: "#1890FF",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
formatter: "{value}",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: "去年",
|
||||||
|
type: "bar",
|
||||||
|
barWidth: "30%",
|
||||||
|
data: [
|
||||||
|
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4,
|
||||||
|
3.3,
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "同期",
|
||||||
|
type: "bar",
|
||||||
|
barWidth: "30%",
|
||||||
|
data: [
|
||||||
|
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0,
|
||||||
|
2.3,
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
echartsOption: {
|
||||||
|
styles: "width: 100%; height: 100%;",
|
||||||
|
colorList: ["#1890FF", "#EE6666", "#FFCC00"],
|
||||||
|
eId: "statisticsComparedEchartsBar",
|
||||||
|
},
|
||||||
|
loading: false,
|
||||||
|
tableList: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.time = new Date();
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
listProject,
|
||||||
|
updateEcharts() {
|
||||||
|
if (this.$refs.echartsLineTrend) {
|
||||||
|
this.$refs.echartsLineTrend.updateEchart();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleDialogEvent(e) {
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.time = this.parseTime(new Date(), "{y}:01:01 00:00:00");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
console.log(this.queryParams)
|
||||||
|
// console.log('compared-getList:', Object.assign(this.queryParams, {
|
||||||
|
// time: this.parseTime(this.time, '{y}:01:01 00:00:00')
|
||||||
|
// }))
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.el-compared-container {
|
||||||
|
.main-echarts {
|
||||||
|
height: 350px;
|
||||||
|
width: 100%;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
.main-table {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,153 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
:inline="true"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
|
<el-form-item label="项目名称" prop="projectName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.projectName"
|
||||||
|
placeholder="请输入项目名称"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="时间" prop="time">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="time"
|
||||||
|
size="small"
|
||||||
|
type="datetimerange"
|
||||||
|
range-separator="至"
|
||||||
|
class="form-input"
|
||||||
|
start-placeholder="开始时间"
|
||||||
|
end-placeholder="结束时间"
|
||||||
|
@change="timeChange"
|
||||||
|
placeholder="选择时间范围"
|
||||||
|
></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
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableList"
|
||||||
|
>
|
||||||
|
<!-- :default-sort="{prop: 'createTime', order: 'descending'}"
|
||||||
|
@sort-change="sortChange" -->
|
||||||
|
<el-table-column
|
||||||
|
type="index"
|
||||||
|
label="序号"
|
||||||
|
align="center"
|
||||||
|
:index="(val) => {
|
||||||
|
return ( val + 1 + (queryParams.pageNum - 1) * queryParams.pageSize )
|
||||||
|
}"
|
||||||
|
width="80px"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="项目ID" align="left" prop="projectName" />
|
||||||
|
<el-table-column label="项目名称" align="left" prop="projectName" />
|
||||||
|
<el-table-column label="电用量 (kwh)" align="center" prop="electric" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span class="lay-table-textarea">{{ Number(scope.row.electric).toFixed(2) || '--' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="水用量 (吨)" align="center" prop="electric" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span class="lay-table-textarea">{{ Number(scope.row.electric).toFixed(2) || '--' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="气用量 (m³)" align="center" prop="electric" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span class="lay-table-textarea">{{ Number(scope.row.electric).toFixed(2) || '--' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="碳排放 (吨)" align="center" prop="coal" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span class="lay-table-textarea">{{ Number(scope.row.coal).toFixed(2) || '--' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { projectEnergy } from '@/api/iot/staistics'
|
||||||
|
export default {
|
||||||
|
name: 'EStatisticsEnergy',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
total: 0,
|
||||||
|
queryParams: {
|
||||||
|
projectName: '',
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
ed: '',
|
||||||
|
sd: ''
|
||||||
|
},
|
||||||
|
time: [],
|
||||||
|
loading: false,
|
||||||
|
tableList: []
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
timeChange(val) {
|
||||||
|
if (val) {
|
||||||
|
this.queryParams.sd = this.parseTime(val[0], '{y}:{m}:{d} {h}:{i}:{s}');
|
||||||
|
this.queryParams.ed = this.parseTime(val[1], '{y}:{m}:{d} {h}:{i}:{s}');
|
||||||
|
} else {
|
||||||
|
this.queryParams.sd = "";
|
||||||
|
this.queryParams.ed = "";
|
||||||
|
}
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
sortChange(column) {
|
||||||
|
const sort = {
|
||||||
|
isAsc: column.order === "descending" ? "desc" : "asc",
|
||||||
|
orderByColumn: column.prop
|
||||||
|
};
|
||||||
|
this.queryParams = Object.assign(this.queryParams, sort);
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.queryParams.sd = "";
|
||||||
|
this.queryParams.ed = "";
|
||||||
|
this.time = [];
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
projectEnergy(Object.assign(this.queryParams)).then(res => {
|
||||||
|
this.tableList = res.rows;
|
||||||
|
this.total = res.total;
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -12,6 +12,7 @@
|
||||||
ref="querySelectInput"
|
ref="querySelectInput"
|
||||||
@EventResult="eventResult($event)"
|
@EventResult="eventResult($event)"
|
||||||
></select-input>
|
></select-input>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="摄像头名称" prop="videoName">
|
<el-form-item label="摄像头名称" prop="videoName">
|
||||||
<el-input
|
<el-input
|
||||||
|
@ -31,22 +32,6 @@
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="状态" prop="videoStatus">
|
|
||||||
<el-select
|
|
||||||
v-model="queryParams.videoStatus"
|
|
||||||
placeholder="请选择站点状态"
|
|
||||||
size="mini"
|
|
||||||
clearable
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in statusOptions"
|
|
||||||
:key="dict.dictValue"
|
|
||||||
:label="dict.dictLabel"
|
|
||||||
:value="dict.dictValue"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item> -->
|
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
@ -117,7 +102,12 @@
|
||||||
width="200"
|
width="200"
|
||||||
prop="deviceName"
|
prop="deviceName"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="站点名称" align="left" width="210" prop="siteName" />
|
<el-table-column
|
||||||
|
label="站点名称"
|
||||||
|
align="left"
|
||||||
|
width="210"
|
||||||
|
prop="siteName"
|
||||||
|
/>
|
||||||
|
|
||||||
<el-table-column label="站点通道" align="left" width="200" prop="devId" />
|
<el-table-column label="站点通道" align="left" width="200" prop="devId" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -126,13 +116,11 @@
|
||||||
width="200"
|
width="200"
|
||||||
prop="devChannel"
|
prop="devChannel"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column label="摄像头地址" prop="videoAddress" align="left">
|
||||||
label="摄像头地址"
|
|
||||||
prop="videoAddress"
|
|
||||||
align="left"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span class="lay-table-textarea">{{ scope.row.videoAddress || '--'}}</span>
|
<span class="lay-table-textarea">{{
|
||||||
|
scope.row.videoAddress || "--"
|
||||||
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
@ -222,26 +210,32 @@
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="摄像头名称" prop="videoName">
|
<el-form-item label="摄像头名称" prop="videoName">
|
||||||
<el-input
|
<e-dialog-table-input
|
||||||
:disabled="tempType === 'distri'"
|
:disabled="tempType === 'distri'"
|
||||||
|
:table="selectDevieTable"
|
||||||
|
:refurbishFun="unbindVideoDev"
|
||||||
|
showFileName="deviceName"
|
||||||
|
fileName="deviceKey,deviceName"
|
||||||
v-model="form.videoName"
|
v-model="form.videoName"
|
||||||
type="text"
|
title="摄像头设备"
|
||||||
maxlength="30"
|
psize="small"
|
||||||
placeholder="请输入摄像头名称"
|
@change="handleDeviceDialogEvent"
|
||||||
suffix-icon="el-icon-arrow-down"
|
|
||||||
@focus="openTableSelectDeviceDialog()"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="站点名称" prop="siteName">
|
<el-form-item label="站点名称" prop="siteName">
|
||||||
<el-input
|
<e-dialog-table-input
|
||||||
v-model="form.siteName"
|
|
||||||
:disabled="tempType === 'distri'"
|
:disabled="tempType === 'distri'"
|
||||||
placeholder="点击选择站点"
|
:table="selectSiteTable"
|
||||||
suffix-icon="el-icon-arrow-down"
|
:refurbishFun="listSite"
|
||||||
@focus="openTableSelectDialog()"
|
showFileName="siteName"
|
||||||
|
fileName="recordId,devId,siteLng,siteLat,siteAddress,siteName"
|
||||||
|
v-model="form.siteName"
|
||||||
|
title="站点"
|
||||||
|
psize="small"
|
||||||
|
@change="handleSiteDialogEvent"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -292,23 +286,6 @@
|
||||||
<el-input v-model="form.sortNum" placeholder="请输入排序" />
|
<el-input v-model="form.sortNum" placeholder="请输入排序" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="12">
|
|
||||||
<el-form-item label="服务类型" prop="serverType">
|
|
||||||
<el-select
|
|
||||||
:disabled="tempType === 'distri'"
|
|
||||||
v-model="form.serverType"
|
|
||||||
placeholder="请选择服务类型"
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="(itemKey, itemVal) in serverTypeOpt"
|
|
||||||
:key="itemKey"
|
|
||||||
:label="itemKey"
|
|
||||||
:value="itemVal"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col> -->
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
|
@ -424,47 +401,6 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- <el-row :gutter="20">
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="分配角色">
|
|
||||||
<el-select
|
|
||||||
style="width: 100%"
|
|
||||||
v-model="roleIds"
|
|
||||||
multiple
|
|
||||||
placeholder="请选择"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in roleOptions"
|
|
||||||
:key="item.roleId"
|
|
||||||
:label="item.roleName"
|
|
||||||
:value="item.roleId"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row> -->
|
|
||||||
|
|
||||||
<!-- <el-row :gutter="20">
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="选择用户" prop="videoLat">
|
|
||||||
<el-select
|
|
||||||
v-model="form.tenantId"
|
|
||||||
style="width: 100%"
|
|
||||||
filterable
|
|
||||||
placeholder="请选择"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in tenantList"
|
|
||||||
:key="item.tenantId"
|
|
||||||
:label="item.tenantName"
|
|
||||||
:value="item.tenantId"
|
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row> -->
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" size="mini" @click="submitForm"
|
<el-button type="primary" size="mini" @click="submitForm"
|
||||||
|
@ -474,40 +410,6 @@
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog
|
|
||||||
:title="selectDialogTitle"
|
|
||||||
:visible.sync="selectTableShow"
|
|
||||||
width="75%"
|
|
||||||
top="10vh"
|
|
||||||
class="select-table-dialog"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<select-table-wrap
|
|
||||||
v-if="selectTableShow"
|
|
||||||
:tableOption="tableSelectOption.tableOpt"
|
|
||||||
:queryOption="tableSelectOption.queryOpt"
|
|
||||||
:tableList="tableSelectOption.tableList"
|
|
||||||
@parentGetList="childGetList($event)"
|
|
||||||
:otherOption="tableSelectOption.otherOption"
|
|
||||||
@returnEvent="returnEvent($event)"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button size="mini" type="primary" @click="resuleClick"
|
|
||||||
>确 定</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
selectTableShow = false;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>取 消</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
<!-- 摄像头导入对话框 -->
|
<!-- 摄像头导入对话框 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="upload.title"
|
:title="upload.title"
|
||||||
|
@ -557,19 +459,23 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listInfo, getInfo, delInfo, addInfo, updateInfo, unbindVideoDev } from "@/api/video/camera";
|
import {
|
||||||
|
listInfo,
|
||||||
|
getInfo,
|
||||||
|
delInfo,
|
||||||
|
addInfo,
|
||||||
|
updateInfo,
|
||||||
|
unbindVideoDev,
|
||||||
|
} from "@/api/video/camera";
|
||||||
import { getUser } from "@/api/system/user";
|
import { getUser } from "@/api/system/user";
|
||||||
import { listSite } from "@/api/iot/site";
|
import { listSite } from "@/api/iot/site";
|
||||||
import { initMap, gjzCode } from "@/utils/latlngFromAddress";
|
import { initMap, gjzCode } from "@/utils/latlngFromAddress";
|
||||||
import { listTenant } from "@/api/system/tenant";
|
import { listTenant } from "@/api/system/tenant";
|
||||||
|
|
||||||
import SelectTableWrap from "@/components/SelectTable/index";
|
|
||||||
import ShopLocation from "@/components/Amap/components/shopLocation/index";
|
import ShopLocation from "@/components/Amap/components/shopLocation/index";
|
||||||
import SelectInput from "../profile/SelectInput/index";
|
import SelectInput from "../profile/SelectInput/index";
|
||||||
|
|
||||||
|
import EDialogTableInput from "@/components/EDialogTableInput";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
// import {
|
|
||||||
// listDevice,
|
|
||||||
// } from "@/api/iot/device";
|
|
||||||
|
|
||||||
const joinTypeOpt = {
|
const joinTypeOpt = {
|
||||||
CAMERA: "摄像头直连",
|
CAMERA: "摄像头直连",
|
||||||
|
@ -580,17 +486,179 @@ const serverTypeOpt = {
|
||||||
QI_NIU: "七牛",
|
QI_NIU: "七牛",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const selectDevieTable = {
|
||||||
|
otherOption: {
|
||||||
|
tableType: "device",
|
||||||
|
},
|
||||||
|
queryOption: {
|
||||||
|
disable: false,
|
||||||
|
labelWidth: "68px",
|
||||||
|
params: {
|
||||||
|
deviceName: "",
|
||||||
|
deviceType: "VIDEO_MONITOR",
|
||||||
|
},
|
||||||
|
inline: true,
|
||||||
|
queryChilds: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
placeholder: "设备名称",
|
||||||
|
clearable: true,
|
||||||
|
label: "设备名称",
|
||||||
|
type: "input",
|
||||||
|
key: "deviceName",
|
||||||
|
size: "small",
|
||||||
|
value: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
tableOption: {
|
||||||
|
loading: false,
|
||||||
|
rowKey: "recordId",
|
||||||
|
selection: false,
|
||||||
|
maxHeight: "45vh",
|
||||||
|
childs: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "设备名称",
|
||||||
|
type: "",
|
||||||
|
prop: "deviceName",
|
||||||
|
align: "center",
|
||||||
|
width: "200",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "站点通道",
|
||||||
|
type: "",
|
||||||
|
prop: "deviceId",
|
||||||
|
align: "center",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "tagStatus",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "设备Key",
|
||||||
|
type: "",
|
||||||
|
prop: "deviceKey",
|
||||||
|
align: "left",
|
||||||
|
width: "200",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "设备类型",
|
||||||
|
type: "",
|
||||||
|
prop: "deviceTypeName",
|
||||||
|
align: "left",
|
||||||
|
width: "120",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "创建时间",
|
||||||
|
type: "",
|
||||||
|
prop: "createTime",
|
||||||
|
align: "center",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const selectSiteTable = {
|
||||||
|
otherOption: {
|
||||||
|
tableType: "site",
|
||||||
|
},
|
||||||
|
queryOption: {
|
||||||
|
disable: false,
|
||||||
|
labelWidth: "68px",
|
||||||
|
params: {
|
||||||
|
siteName: "",
|
||||||
|
siteStatus: "0",
|
||||||
|
},
|
||||||
|
inline: true,
|
||||||
|
queryChilds: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
placeholder: "站点名称",
|
||||||
|
clearable: true,
|
||||||
|
label: "站点名称",
|
||||||
|
type: "input",
|
||||||
|
key: "siteName",
|
||||||
|
size: "small",
|
||||||
|
value: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
tableOption: {
|
||||||
|
loading: false,
|
||||||
|
rowKey: "recordId",
|
||||||
|
selection: false,
|
||||||
|
maxHeight: "45vh",
|
||||||
|
childs: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "站点名称",
|
||||||
|
type: "",
|
||||||
|
prop: "siteName",
|
||||||
|
align: "left",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "项目名称",
|
||||||
|
type: "",
|
||||||
|
prop: "projectName",
|
||||||
|
align: "left",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "状态",
|
||||||
|
type: "",
|
||||||
|
prop: "siteStatus",
|
||||||
|
align: "center",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "tagStatus",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "创建时间",
|
||||||
|
type: "",
|
||||||
|
prop: "createTime",
|
||||||
|
align: "center",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Info",
|
name: "Info",
|
||||||
components: {
|
components: {
|
||||||
SelectTableWrap,
|
|
||||||
ShopLocation,
|
ShopLocation,
|
||||||
SelectInput,
|
SelectInput,
|
||||||
|
EDialogTableInput,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
joinTypeOpt,
|
joinTypeOpt,
|
||||||
serverTypeOpt,
|
serverTypeOpt,
|
||||||
|
selectDevieTable,
|
||||||
|
selectSiteTable,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
|
@ -669,15 +737,23 @@ export default {
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
siteName: [{ required: true, message: "站点不能为空, 请选择", trigger: "blur" }],
|
siteName: [
|
||||||
videoProtocol: [{ required: true, message: "接入协议不能为空", trigger: "blur" }],
|
{ required: true, message: "站点不能为空, 请选择", trigger: "blur" },
|
||||||
videoLng: [{ required: true, message: "经度不能为空", trigger: "blur" }],
|
],
|
||||||
videoLat: [{ required: true, message: "纬度不能为空", trigger: "blur" }],
|
videoProtocol: [
|
||||||
|
{ required: true, message: "接入协议不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
videoLng: [
|
||||||
|
{ required: true, message: "经度不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
videoLat: [
|
||||||
|
{ required: true, message: "纬度不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
// serverType: [{ required: true, message: "服务类型不能为空", trigger: "blur" }],
|
// serverType: [{ required: true, message: "服务类型不能为空", trigger: "blur" }],
|
||||||
joinType: [{ required: true, message: "接入方式不能为空", trigger: "blur" }],
|
joinType: [
|
||||||
|
{ required: true, message: "接入方式不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
selectTableShow: false,
|
|
||||||
tableSelectOption: {},
|
|
||||||
selectResult: {},
|
selectResult: {},
|
||||||
// 地图 弹窗
|
// 地图 弹窗
|
||||||
visible: false,
|
visible: false,
|
||||||
|
@ -700,17 +776,28 @@ export default {
|
||||||
dictValue: "GUN_MACHINE",
|
dictValue: "GUN_MACHINE",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
// 角色列表
|
|
||||||
roleOptions: [],
|
|
||||||
roleIds: [],
|
roleIds: [],
|
||||||
selectDialogTitle: ''
|
selectDialogTitle: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getRole();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
unbindVideoDev,
|
||||||
|
listSite,
|
||||||
|
handleDeviceDialogEvent(e) {
|
||||||
|
this.form.videoName = e.deviceName;
|
||||||
|
this.form.devChannel = e.deviceKey;
|
||||||
|
},
|
||||||
|
handleSiteDialogEvent(e) {
|
||||||
|
this.form.siteId = e.recordId;
|
||||||
|
this.form.devId = e.devId;
|
||||||
|
this.form.videoLng = e.siteLng;
|
||||||
|
this.form.videoLat = e.siteLat;
|
||||||
|
this.form.videoAddress = e.siteAddress;
|
||||||
|
this.form.siteName = e.siteName;
|
||||||
|
},
|
||||||
eventResult(...data) {
|
eventResult(...data) {
|
||||||
this.queryParams.siteId = data[0].val;
|
this.queryParams.siteId = data[0].val;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -734,7 +821,7 @@ export default {
|
||||||
this.mapForm.lng = data.lng;
|
this.mapForm.lng = data.lng;
|
||||||
this.mapForm.lat = data.lat;
|
this.mapForm.lat = data.lat;
|
||||||
this.mapForm.address = data.address;
|
this.mapForm.address = data.address;
|
||||||
console.log('map-event--', data)
|
console.log("map-event--", data);
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
},
|
},
|
||||||
// 使用地图方式定位
|
// 使用地图方式定位
|
||||||
|
@ -777,269 +864,6 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* 选择摄像头设备
|
|
||||||
*/
|
|
||||||
openTableSelectDeviceDialog() {
|
|
||||||
this.selectResult = {};
|
|
||||||
this.selectDialogTitle = '选择设备'
|
|
||||||
this.tableSelectOption = {
|
|
||||||
otherOption: {
|
|
||||||
tableType: "device",
|
|
||||||
},
|
|
||||||
queryOpt: {
|
|
||||||
disable: false,
|
|
||||||
labelWidth: "68px",
|
|
||||||
params: {
|
|
||||||
deviceName: "",
|
|
||||||
deviceType: "VIDEO_MONITOR",
|
|
||||||
},
|
|
||||||
page: {
|
|
||||||
pageSize: 10,
|
|
||||||
pageNum: 1,
|
|
||||||
total: 0,
|
|
||||||
},
|
|
||||||
inline: true,
|
|
||||||
queryChilds: [
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
placeholder: "设备名称",
|
|
||||||
clearable: true,
|
|
||||||
label: "设备名称",
|
|
||||||
type: "input",
|
|
||||||
key: "deviceName",
|
|
||||||
size: "small",
|
|
||||||
value: "",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
tableOpt: {
|
|
||||||
loading: false,
|
|
||||||
rowKey: "recordId",
|
|
||||||
selection: false,
|
|
||||||
maxHeight: "45vh",
|
|
||||||
childs: [
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "设备名称",
|
|
||||||
type: "",
|
|
||||||
prop: "deviceName",
|
|
||||||
align: "center",
|
|
||||||
width: "200",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "站点通道",
|
|
||||||
type: "",
|
|
||||||
prop: "deviceId",
|
|
||||||
align: "center",
|
|
||||||
width: "",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "tagStatus",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "设备Key",
|
|
||||||
type: "",
|
|
||||||
prop: "deviceKey",
|
|
||||||
align: "left",
|
|
||||||
width: "200",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "设备类型",
|
|
||||||
type: "",
|
|
||||||
prop: "deviceTypeName",
|
|
||||||
align: "left",
|
|
||||||
width: "120",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "创建时间",
|
|
||||||
type: "",
|
|
||||||
prop: "createTime",
|
|
||||||
align: "center",
|
|
||||||
width: "",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
tableList: {
|
|
||||||
type: Array,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
tableList: [],
|
|
||||||
};
|
|
||||||
this.selectTableShow = true;
|
|
||||||
},
|
|
||||||
// 开启 筛选表格
|
|
||||||
openTableSelectDialog() {
|
|
||||||
this.selectResult = {};
|
|
||||||
this.selectDialogTitle = '选择站点'
|
|
||||||
this.tableSelectOption = {
|
|
||||||
otherOption: {
|
|
||||||
tableType: "site",
|
|
||||||
},
|
|
||||||
queryOpt: {
|
|
||||||
disable: false,
|
|
||||||
labelWidth: "68px",
|
|
||||||
params: {
|
|
||||||
siteName: "",
|
|
||||||
siteStatus: "0",
|
|
||||||
},
|
|
||||||
page: {
|
|
||||||
pageSize: 10,
|
|
||||||
pageNum: 1,
|
|
||||||
total: 0,
|
|
||||||
},
|
|
||||||
inline: true,
|
|
||||||
queryChilds: [
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
placeholder: "站点名称",
|
|
||||||
clearable: true,
|
|
||||||
label: "站点名称",
|
|
||||||
type: "input",
|
|
||||||
key: "siteName",
|
|
||||||
size: "small",
|
|
||||||
value: "",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
tableOpt: {
|
|
||||||
loading: false,
|
|
||||||
rowKey: "recordId",
|
|
||||||
selection: false,
|
|
||||||
maxHeight: "45vh",
|
|
||||||
childs: [
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "站点名称",
|
|
||||||
type: "",
|
|
||||||
prop: "siteName",
|
|
||||||
align: "left",
|
|
||||||
width: "",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "项目名称",
|
|
||||||
type: "",
|
|
||||||
prop: "projectName",
|
|
||||||
align: "left",
|
|
||||||
width: "",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "状态",
|
|
||||||
type: "",
|
|
||||||
prop: "siteStatus",
|
|
||||||
align: "center",
|
|
||||||
width: "",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "tagStatus",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "创建时间",
|
|
||||||
type: "",
|
|
||||||
prop: "createTime",
|
|
||||||
align: "center",
|
|
||||||
width: "",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
tableList: {
|
|
||||||
type: Array,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
tableList: [],
|
|
||||||
};
|
|
||||||
this.selectTableShow = true;
|
|
||||||
},
|
|
||||||
// 查询回调
|
|
||||||
childGetList(data) {
|
|
||||||
if (data.otherOption.tableType === "site") {
|
|
||||||
this.getSiteChildList(data);
|
|
||||||
} else if (data.otherOption.tableType === "device") {
|
|
||||||
this.getDeviceChildList(data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 查詢 设备列表 接口
|
|
||||||
getDeviceChildList(data) {
|
|
||||||
unbindVideoDev(Object.assign(JSON.parse(JSON.stringify(data.page)), JSON.parse(JSON.stringify(data.param)))).then(res => {
|
|
||||||
this.tableSelectOption.tableList = res.rows;
|
|
||||||
this.tableSelectOption.queryOpt.page.total = Number(res.total);
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 查询站点列表接口
|
|
||||||
getSiteChildList(data) {
|
|
||||||
listSite(data.page, data.param).then((response) => {
|
|
||||||
this.tableSelectOption.tableList = response.rows;
|
|
||||||
this.tableSelectOption.queryOpt.page.total = Number(response.total);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 点击或者双击数据回调
|
|
||||||
returnEvent(data) {
|
|
||||||
this.selectResult = {};
|
|
||||||
if (data.type === "dblclick") {
|
|
||||||
if (data.otherOption.tableType === "site") {
|
|
||||||
this.form.siteId = data.value.recordId;
|
|
||||||
this.form.devId = data.value.devId;
|
|
||||||
this.form.videoLng = data.value.siteLng;
|
|
||||||
this.form.videoLat = data.value.siteLat;
|
|
||||||
this.form.videoAddress = data.value.siteAddress;
|
|
||||||
this.form.siteName = data.value.siteName;
|
|
||||||
} else if (data.otherOption.tableType === "device") {
|
|
||||||
this.form.videoName = data.value.deviceName;
|
|
||||||
this.form.devChannel = data.value.deviceKey;
|
|
||||||
// this.form.device = data.value.deviceKey;
|
|
||||||
}
|
|
||||||
this.selectTableShow = false;
|
|
||||||
} else if (data.type === "click") {
|
|
||||||
if (data.otherOption.tableType === "site") {
|
|
||||||
this.selectResult = {
|
|
||||||
siteId: data.value.recordId,
|
|
||||||
devId: data.value.devId,
|
|
||||||
videoLng: data.value.videoLng,
|
|
||||||
videoLat: data.value.videoLat,
|
|
||||||
videoAddress: data.value.siteAddress,
|
|
||||||
siteName: data.value.siteName,
|
|
||||||
};
|
|
||||||
} else if (data.otherOption.tableType === "device") {
|
|
||||||
this.selectResult = {
|
|
||||||
videoName: data.value.deviceName,
|
|
||||||
devChannel: data.value.deviceKey,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.selectResult.tableType = data.otherOption.tableType;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 点击确定按钮
|
|
||||||
resuleClick() {
|
|
||||||
if (this.selectResult.tableType === "site") {
|
|
||||||
this.form.siteId = this.selectResult.siteId;
|
|
||||||
this.form.devId = this.selectResult.devId;
|
|
||||||
this.form.videoLng = this.selectResult.videoLng;
|
|
||||||
this.form.videoLat = this.selectResult.videoLat;
|
|
||||||
this.form.videoAddress = this.selectResult.videoAddress;
|
|
||||||
this.form.siteName = this.selectResult.siteName;
|
|
||||||
} else if (this.selectResult.tableType === "device") {
|
|
||||||
this.form.videoName = this.selectResult.videoName;
|
|
||||||
this.form.devChannel = this.selectResult.deviceKey;
|
|
||||||
}
|
|
||||||
this.selectTableShow = false;
|
|
||||||
},
|
|
||||||
/** 查询监控详情列表 */
|
/** 查询监控详情列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -1086,7 +910,7 @@ export default {
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
if(this.$refs.querySelectInput) {
|
if (this.$refs.querySelectInput) {
|
||||||
this.$refs.querySelectInput.close();
|
this.$refs.querySelectInput.close();
|
||||||
}
|
}
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
|
@ -1130,7 +954,7 @@ export default {
|
||||||
this.tempType = "distri";
|
this.tempType = "distri";
|
||||||
this.reset();
|
this.reset();
|
||||||
// this.getTenantList();
|
// this.getTenantList();
|
||||||
const recordId = row.recordId
|
const recordId = row.recordId;
|
||||||
getInfo(recordId).then((response) => {
|
getInfo(recordId).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
|
@ -1236,13 +1060,6 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 查询角色 */
|
|
||||||
getRole() {
|
|
||||||
getUser().then((res) => {
|
|
||||||
this.roleOptions = res.roles;
|
|
||||||
this.roleOptions.splice(0, 1);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container video-site">
|
<div class="app-container video-site">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
:inline="true"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
<el-form-item label="站点名称" prop="siteName">
|
<el-form-item label="站点名称" prop="siteName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.siteName"
|
v-model="queryParams.siteName"
|
||||||
|
@ -10,30 +15,6 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- <el-form-item label="行政区划" prop="regionalismId">
|
|
||||||
<treeselect
|
|
||||||
:disable-branch-nodes="true"
|
|
||||||
v-model="queryParams.regionalismId"
|
|
||||||
:options="regionalismOption"
|
|
||||||
:normalizer="normalizer"
|
|
||||||
placeholder="行政区划"
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
</el-form-item> -->
|
|
||||||
<!-- <el-form-item label="站点状态" prop="siteStatus">
|
|
||||||
<el-select
|
|
||||||
v-model="queryParams.siteStatus"
|
|
||||||
placeholder="请选择站点状态"
|
|
||||||
clearable
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in statusOptions"
|
|
||||||
:key="dict.dictValue"
|
|
||||||
:label="dict.dictLabel"
|
|
||||||
:value="dict.dictValue"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"
|
||||||
>搜索</el-button
|
>搜索</el-button
|
||||||
|
@ -53,17 +34,6 @@
|
||||||
>新增</el-button
|
>新增</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['iot:site:remove']"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</el-col> -->
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -71,45 +41,56 @@
|
||||||
:data="siteList"
|
:data="siteList"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="index"
|
type="index"
|
||||||
label="序号"
|
label="序号"
|
||||||
align="center"
|
align="center"
|
||||||
:index="indexFormatter"
|
:index="indexFormatter"
|
||||||
width="80px"
|
width="80px"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
|
|
||||||
<el-table-column label="站点名称" align="left" width="200" prop="siteName" />
|
<el-table-column
|
||||||
<!-- <el-table-column
|
label="站点名称"
|
||||||
label="行政区划"
|
|
||||||
align="left"
|
align="left"
|
||||||
width="180"
|
width="200"
|
||||||
prop="regionalismFullName"
|
prop="siteName"
|
||||||
/> -->
|
/>
|
||||||
<el-table-column label="项目名称" align="left" width="150" prop="projectName" />
|
<el-table-column
|
||||||
<el-table-column label="站点地址" align="left" prop="siteAddress" >
|
label="项目名称"
|
||||||
|
align="left"
|
||||||
|
width="150"
|
||||||
|
prop="projectName"
|
||||||
|
/>
|
||||||
|
<el-table-column label="站点地址" align="left" prop="siteAddress">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span :title="scope.row.siteAddress" class="lay-table-textarea">{{ scope.row.siteAddress || '--'}}</span>
|
<span :title="scope.row.siteAddress" class="lay-table-textarea">{{
|
||||||
|
scope.row.siteAddress || "--"
|
||||||
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="站点状态" align="center" width="100" prop="siteStatus">
|
<el-table-column
|
||||||
<template slot-scope="scope">
|
label="接入协议"
|
||||||
<div class="list-row">
|
align="left"
|
||||||
<span class="notice-item" :class="noticeState(scope.row.siteStatus)"></span>
|
width="100"
|
||||||
<span
|
prop="videoProtocol"
|
||||||
class="notice-text"
|
/>
|
||||||
v-text="scope.row.siteStatus === '1' ? '在线' : '离线'"
|
|
||||||
></span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column> -->
|
|
||||||
<el-table-column label="接入协议" align="left" width="100" prop="videoProtocol" />
|
|
||||||
<el-table-column label="站点通道" align="left" width="200" prop="devId" />
|
<el-table-column label="站点通道" align="left" width="200" prop="devId" />
|
||||||
<el-table-column label="设备编码" align="left" width="150" prop="devCode" />
|
<el-table-column
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="160">
|
label="设备编码"
|
||||||
|
align="left"
|
||||||
|
width="150"
|
||||||
|
prop="devCode"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
align="center"
|
||||||
|
prop="createTime"
|
||||||
|
width="160"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}</span>
|
<span>{{
|
||||||
|
parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}:{s}")
|
||||||
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -161,10 +142,15 @@
|
||||||
<el-row :gutter="20" v-show="tempType !== 'distri'">
|
<el-row :gutter="20" v-show="tempType !== 'distri'">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="所属项目" prop="projectName">
|
<el-form-item label="所属项目" prop="projectName">
|
||||||
<el-input
|
<e-dialog-table-input
|
||||||
|
:table="selectProjectTable"
|
||||||
|
:refurbishFun="listProject"
|
||||||
|
showFileName="projectName"
|
||||||
|
fileName="projectId,projectName,projectLat,projectLng,projectAddress"
|
||||||
v-model="form.projectName"
|
v-model="form.projectName"
|
||||||
placeholder="点击选择厂商"
|
title="项目"
|
||||||
@focus="handleOpenTableSelect()"
|
psize="small"
|
||||||
|
@change="handleDialogEvent"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -201,14 +187,6 @@
|
||||||
<el-row :gutter="20" v-show="tempType !== 'distri'">
|
<el-row :gutter="20" v-show="tempType !== 'distri'">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="启用https" prop="https">
|
<el-form-item label="启用https" prop="https">
|
||||||
<!-- <el-switch
|
|
||||||
v-model="form.https"
|
|
||||||
active-color="#13ce66"
|
|
||||||
inactive-color="#ff4949"
|
|
||||||
:active-value="true"
|
|
||||||
:inactive-value="false"
|
|
||||||
>
|
|
||||||
</el-switch> -->
|
|
||||||
<el-switch
|
<el-switch
|
||||||
size="mini"
|
size="mini"
|
||||||
v-model="form.https"
|
v-model="form.https"
|
||||||
|
@ -219,7 +197,7 @@
|
||||||
active-color="#13ce66"
|
active-color="#13ce66"
|
||||||
inactive-color="#dcdfe6"
|
inactive-color="#dcdfe6"
|
||||||
class="e-switch-c"
|
class="e-switch-c"
|
||||||
>
|
>
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -240,31 +218,26 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="24">
|
|
||||||
<el-form-item label="行政区划" prop="regionalismId">
|
|
||||||
<treeselect
|
|
||||||
:disabled="tempType === 'distri'"
|
|
||||||
@select="regionalismChange"
|
|
||||||
:disable-branch-nodes="true"
|
|
||||||
v-model="form.regionalismId"
|
|
||||||
:options="regionalismOption"
|
|
||||||
:normalizer="normalizer"
|
|
||||||
placeholder="请选择上级行政区划"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col> -->
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="20" v-show="tempType !== 'distri'">
|
<el-row :gutter="20" v-show="tempType !== 'distri'">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="站点经度" prop="siteLng">
|
<el-form-item label="站点经度" prop="siteLng">
|
||||||
<el-input v-model="form.siteLng" disabled placeholder="请输入站点经度" />
|
<el-input
|
||||||
|
v-model="form.siteLng"
|
||||||
|
disabled
|
||||||
|
placeholder="请输入站点经度"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="站点纬度" prop="siteLat">
|
<el-form-item label="站点纬度" prop="siteLat">
|
||||||
<el-input v-model="form.siteLat" disabled placeholder="请输入站点纬度" />
|
<el-input
|
||||||
|
v-model="form.siteLat"
|
||||||
|
disabled
|
||||||
|
placeholder="请输入站点纬度"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -324,7 +297,9 @@
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<el-button type="primary" @click="mapSureClick">确 定</el-button>
|
<el-button type="primary" @click="mapSureClick"
|
||||||
|
>确 定</el-button
|
||||||
|
>
|
||||||
<el-button @click="visible = false">取 消</el-button>
|
<el-button @click="visible = false">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</slot>
|
</slot>
|
||||||
|
@ -334,14 +309,22 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-form-item label="站点通道" prop="devId" v-show="tempType !== 'distri'">
|
<el-form-item
|
||||||
|
label="站点通道"
|
||||||
|
prop="devId"
|
||||||
|
v-show="tempType !== 'distri'"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.devId"
|
v-model="form.devId"
|
||||||
:disabled="tempType === 'distri'"
|
:disabled="tempType === 'distri'"
|
||||||
placeholder="请输入站点通道"
|
placeholder="请输入站点通道"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备编码" prop="devCode" v-show="tempType !== 'distri'">
|
<el-form-item
|
||||||
|
label="设备编码"
|
||||||
|
prop="devCode"
|
||||||
|
v-show="tempType !== 'distri'"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.devCode"
|
v-model="form.devCode"
|
||||||
:disabled="tempType === 'distri'"
|
:disabled="tempType === 'distri'"
|
||||||
|
@ -363,17 +346,26 @@
|
||||||
<!-- <template> -->
|
<!-- <template> -->
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="七牛访问秘钥" prop="qnAccessKey">
|
<el-form-item label="七牛访问秘钥" prop="qnAccessKey">
|
||||||
<el-input v-model="form.qnAccessKey" placeholder="请输入七牛访问秘钥" />
|
<el-input
|
||||||
|
v-model="form.qnAccessKey"
|
||||||
|
placeholder="请输入七牛访问秘钥"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="七牛秘钥" prop="qnSecretKey">
|
<el-form-item label="七牛秘钥" prop="qnSecretKey">
|
||||||
<el-input v-model="form.qnSecretKey" placeholder="请输入七牛秘钥" />
|
<el-input
|
||||||
|
v-model="form.qnSecretKey"
|
||||||
|
placeholder="请输入七牛秘钥"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="七牛空间ID" prop="qnNamespaceId">
|
<el-form-item label="七牛空间ID" prop="qnNamespaceId">
|
||||||
<el-input v-model="form.qnNamespaceId" placeholder="请输入七牛空间ID" />
|
<el-input
|
||||||
|
v-model="form.qnNamespaceId"
|
||||||
|
placeholder="请输入七牛空间ID"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
@ -423,63 +415,113 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer form-button-div">
|
<div slot="footer" class="dialog-footer form-button-div">
|
||||||
<el-button type="primary" size="mini" @click="submitForm">确 定</el-button>
|
<el-button type="primary" size="mini" @click="submitForm"
|
||||||
|
>确 定</el-button
|
||||||
|
>
|
||||||
<el-button size="mini" @click="cancel">取 消</el-button>
|
<el-button size="mini" @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog
|
|
||||||
title="选择"
|
|
||||||
:visible.sync="selectTableShow"
|
|
||||||
width="75%"
|
|
||||||
top="10vh"
|
|
||||||
class="select-table-dialog"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<select-table-wrap
|
|
||||||
v-if="selectTableShow"
|
|
||||||
:tableOption="tableSelectOption.tableOpt"
|
|
||||||
:queryOption="tableSelectOption.queryOpt"
|
|
||||||
:tableList="tableSelectOption.tableList"
|
|
||||||
@parentGetList="childGetList($event)"
|
|
||||||
:otherOption="tableSelectOption.otherOption"
|
|
||||||
@returnEvent="returnEvent($event)"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button size="mini" type="primary" @click="resuleClick"
|
|
||||||
>确 定</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
selectTableShow = false;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>取 消</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listSite, getSite, delSite, addSite, updateSite } from "@/api/iot/site";
|
|
||||||
import {
|
import {
|
||||||
listProject
|
listSite,
|
||||||
} from "@/api/iot/project";
|
getSite,
|
||||||
|
delSite,
|
||||||
|
addSite,
|
||||||
|
updateSite,
|
||||||
|
} from "@/api/iot/site";
|
||||||
|
import { listProject } from "@/api/iot/project";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
import { initMap, gjzCode } from "@/utils/latlngFromAddress";
|
import { initMap, gjzCode } from "@/utils/latlngFromAddress";
|
||||||
import ShopLocation from "@/components/Amap/components/shopLocation/index";
|
import ShopLocation from "@/components/Amap/components/shopLocation/index";
|
||||||
import SelectTableWrap from "@/components/SelectTable/index";
|
import EDialogTableInput from "@/components/EDialogTableInput";
|
||||||
import { serviceApiDesc } from '@/config/dvr.config'
|
import { serviceApiDesc } from "@/config/dvr.config";
|
||||||
const serverTypeOpt = {
|
const serverTypeOpt = {
|
||||||
SRS: "SRS",
|
SRS: "SRS",
|
||||||
QI_NIU: "七牛",
|
QI_NIU: "七牛",
|
||||||
M7S:"M7S"
|
M7S: "M7S",
|
||||||
|
};
|
||||||
|
const selectProjectTable = {
|
||||||
|
otherOption: {
|
||||||
|
tableType: "project",
|
||||||
|
},
|
||||||
|
queryOption: {
|
||||||
|
disable: false,
|
||||||
|
labelWidth: "68px",
|
||||||
|
params: {
|
||||||
|
projectName: "",
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
pageSize: 10,
|
||||||
|
pageNum: 1,
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
inline: true,
|
||||||
|
queryChilds: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
placeholder: "项目名称",
|
||||||
|
clearable: true,
|
||||||
|
label: "项目名称",
|
||||||
|
type: "input",
|
||||||
|
key: "projectName",
|
||||||
|
size: "small",
|
||||||
|
value: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
tableOption: {
|
||||||
|
loading: false,
|
||||||
|
rowKey: "projectId",
|
||||||
|
selection: false,
|
||||||
|
maxHeight: "45vh",
|
||||||
|
childs: [
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "项目名称",
|
||||||
|
type: "",
|
||||||
|
prop: "projectName",
|
||||||
|
align: "left",
|
||||||
|
width: "",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "行政区划",
|
||||||
|
type: "",
|
||||||
|
prop: "regionalismFullName",
|
||||||
|
align: "left",
|
||||||
|
width: "250",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "项目地址",
|
||||||
|
type: "",
|
||||||
|
prop: "projectAddress",
|
||||||
|
align: "left",
|
||||||
|
width: "250",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
style: "",
|
||||||
|
label: "创建时间",
|
||||||
|
type: "",
|
||||||
|
prop: "createTime",
|
||||||
|
align: "left",
|
||||||
|
width: "160",
|
||||||
|
"show-overflow-tooltip": false,
|
||||||
|
tempType: "span",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -487,12 +529,13 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
Treeselect,
|
Treeselect,
|
||||||
ShopLocation,
|
ShopLocation,
|
||||||
SelectTableWrap,
|
EDialogTableInput,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
serverTypeOpt,
|
serverTypeOpt,
|
||||||
serviceApiDesc,
|
serviceApiDesc,
|
||||||
|
selectProjectTable,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
|
@ -537,24 +580,42 @@ export default {
|
||||||
message: "格式不正确; (a-Z , 0-9) 组合 6 - 45个字符",
|
message: "格式不正确; (a-Z , 0-9) 组合 6 - 45个字符",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
projectName: [{ required: true, message: "项目名称不能为空", trigger: "change" }],
|
projectName: [
|
||||||
siteName: [{ required: true, message: "站点名称不能为空", trigger: "blur" }],
|
{ required: true, message: "项目名称不能为空", trigger: "change" },
|
||||||
videoProtocol: [{ required: true, message: "接入协议不能为空", trigger: "blur" }],
|
],
|
||||||
serverType: [{ required: true, message: "服务类型不能为空", trigger: "blur" }],
|
siteName: [
|
||||||
|
{ required: true, message: "站点名称不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
videoProtocol: [
|
||||||
|
{ required: true, message: "接入协议不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
serverType: [
|
||||||
|
{ required: true, message: "服务类型不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
siteLng: [{ required: true, message: "经度不能为空", trigger: "blur" }],
|
siteLng: [{ required: true, message: "经度不能为空", trigger: "blur" }],
|
||||||
siteLat: [{ required: true, message: "纬度不能为空", trigger: "blur" }],
|
siteLat: [{ required: true, message: "纬度不能为空", trigger: "blur" }],
|
||||||
qnAccessKey: [
|
qnAccessKey: [
|
||||||
{ required: true, message: "七牛访问秘钥不能为空", trigger: "blur" },
|
{ required: true, message: "七牛访问秘钥不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
qnSecretKey: [{ required: true, message: "七牛秘钥不能为空", trigger: "blur" }],
|
qnSecretKey: [
|
||||||
|
{ required: true, message: "七牛秘钥不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
qnNamespaceId: [
|
qnNamespaceId: [
|
||||||
{ required: true, message: "七牛空间ID不能为空", trigger: "blur" },
|
{ required: true, message: "七牛空间ID不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
qnHost: [{ required: true, message: "七牛host不能为空", trigger: "blur" }],
|
qnHost: [
|
||||||
qnPort: [{ required: true, message: "七牛port不能为空", trigger: "blur" }],
|
{ required: true, message: "七牛host不能为空", trigger: "blur" },
|
||||||
m7sHost: [{ required: true, message: "ip地址不能为空", trigger: "blur" }],
|
],
|
||||||
|
qnPort: [
|
||||||
|
{ required: true, message: "七牛port不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
m7sHost: [
|
||||||
|
{ required: true, message: "ip地址不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
m7sPort: [{ required: true, message: "端口不能为空", trigger: "blur" }],
|
m7sPort: [{ required: true, message: "端口不能为空", trigger: "blur" }],
|
||||||
m7sVersion: [{ required: true, message: "服务版本不能为空", trigger: "blur" }]
|
m7sVersion: [
|
||||||
|
{ required: true, message: "服务版本不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
// 地图 弹窗
|
// 地图 弹窗
|
||||||
visible: false,
|
visible: false,
|
||||||
|
@ -591,149 +652,20 @@ export default {
|
||||||
this.videoProtocolOptions = response.data;
|
this.videoProtocolOptions = response.data;
|
||||||
});
|
});
|
||||||
this.getList();
|
this.getList();
|
||||||
// this.getRegionalisTree();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
listProject,
|
||||||
indexFormatter(val) {
|
indexFormatter(val) {
|
||||||
return (
|
return (
|
||||||
val + 1 + (this.queryParams.pageNum - 1) * this.queryParams.pageSize
|
val + 1 + (this.queryParams.pageNum - 1) * this.queryParams.pageSize
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
// 打开 表单选择 弹窗
|
handleDialogEvent(e) {
|
||||||
handleOpenTableSelect() {
|
this.form.projectId = e.projectId;
|
||||||
this.selectResult = {};
|
this.form.projectName = e.projectName;
|
||||||
this.tableSelectOption = {
|
this.form.siteLat = e.projectLat;
|
||||||
otherOption: {
|
this.form.siteLng = e.projectLng;
|
||||||
tableType: "project",
|
this.form.siteAddress = e.projectAddress;
|
||||||
},
|
|
||||||
queryOpt: {
|
|
||||||
disable: false,
|
|
||||||
labelWidth: "68px",
|
|
||||||
params: {
|
|
||||||
projectName: '',
|
|
||||||
},
|
|
||||||
page: {
|
|
||||||
pageSize: 10,
|
|
||||||
pageNum: 1,
|
|
||||||
total: 0,
|
|
||||||
},
|
|
||||||
inline: true,
|
|
||||||
queryChilds: [
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
placeholder: "项目名称",
|
|
||||||
clearable: true,
|
|
||||||
label: "项目名称",
|
|
||||||
type: "input",
|
|
||||||
key: "projectName",
|
|
||||||
size: "small",
|
|
||||||
value: "",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
tableOpt: {
|
|
||||||
loading: false,
|
|
||||||
rowKey: "projectId",
|
|
||||||
selection: false,
|
|
||||||
maxHeight: "45vh",
|
|
||||||
childs: [
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "项目名称",
|
|
||||||
type: "",
|
|
||||||
prop: "projectName",
|
|
||||||
align: "left",
|
|
||||||
width: "",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "行政区划",
|
|
||||||
type: "",
|
|
||||||
prop: "regionalismFullName",
|
|
||||||
align: "left",
|
|
||||||
width: "250",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "项目地址",
|
|
||||||
type: "",
|
|
||||||
prop: "projectAddress",
|
|
||||||
align: "left",
|
|
||||||
width: "250",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
style: "",
|
|
||||||
label: "创建时间",
|
|
||||||
type: "",
|
|
||||||
prop: "createTime",
|
|
||||||
align: "left",
|
|
||||||
width: "160",
|
|
||||||
"show-overflow-tooltip": false,
|
|
||||||
tempType: "span",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
tableList: {
|
|
||||||
type: Array,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
tableList: [],
|
|
||||||
};
|
|
||||||
this.selectTableShow = true;
|
|
||||||
},
|
|
||||||
// 查询回调
|
|
||||||
childGetList(data) {
|
|
||||||
if (data.otherOption.tableType === "project") {
|
|
||||||
this.handleQueryProject(data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 查询项目列表
|
|
||||||
handleQueryProject(data) {
|
|
||||||
listProject(Object.assign(data.page, data.param, { selected: 1 })).then(
|
|
||||||
(response) => {
|
|
||||||
this.tableSelectOption.tableList = response.rows;
|
|
||||||
this.tableSelectOption.queryOpt.page.total = Number(response.total);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
// 点击或者双击数据回调
|
|
||||||
returnEvent(data) {
|
|
||||||
this.selectResult = {};
|
|
||||||
if (data.type === "dblclick") {
|
|
||||||
if (data.otherOption.tableType === "project") {
|
|
||||||
this.form.projectId = data.value.projectId;
|
|
||||||
this.form.projectName = data.value.projectName;
|
|
||||||
this.form.siteLat = data.value.projectLat;
|
|
||||||
this.form.siteLng = data.value.projectLng;
|
|
||||||
this.form.siteAddress = data.value.projectAddress;
|
|
||||||
}
|
|
||||||
this.selectTableShow = false;
|
|
||||||
} else if (data.type === "click") {
|
|
||||||
if (data.otherOption.tableType === "project") {
|
|
||||||
this.selectResult.projectId = data.value.projectId;
|
|
||||||
this.selectResult.projectName = data.value.projectName;
|
|
||||||
this.selectResult.siteLat = data.value.projectLat;
|
|
||||||
this.selectResult.siteLng = data.value.projectLng;
|
|
||||||
this.selectResult.siteAddress = data.value.projectAddress;
|
|
||||||
}
|
|
||||||
this.selectResult.tableType = data.otherOption.tableType;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 点击确定按钮
|
|
||||||
resuleClick() {
|
|
||||||
if (this.selectResult.tableType === "project") {
|
|
||||||
this.form.projectId = this.selectResult.projectId;
|
|
||||||
this.form.projectName = this.selectResult.projectName;
|
|
||||||
this.form.siteLat = this.selectResult.projectLat;
|
|
||||||
this.form.siteLng = this.selectResult.projectLng;
|
|
||||||
this.form.siteAddress = this.selectResult.projectAddress;
|
|
||||||
}
|
|
||||||
this.selectTableShow = false;
|
|
||||||
},
|
},
|
||||||
noticeState(state) {
|
noticeState(state) {
|
||||||
let className = "";
|
let className = "";
|
||||||
|
@ -818,19 +750,6 @@ export default {
|
||||||
children: node.children,
|
children: node.children,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/** 查询行政区划下拉树结构 */
|
|
||||||
// getRegionalisTree() {
|
|
||||||
// listRegionalism().then((response) => {
|
|
||||||
// this.regionalismOption = [];
|
|
||||||
// const data = {
|
|
||||||
// regionalismId: 0,
|
|
||||||
// regionalismName: "中国",
|
|
||||||
// children: [],
|
|
||||||
// };
|
|
||||||
// data.children = this.handleTree(response.data, "regionalismId", "parentId");
|
|
||||||
// this.regionalismOption.push(data);
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// 行政区划 下拉变化
|
// 行政区划 下拉变化
|
||||||
regionalismChange(val) {
|
regionalismChange(val) {
|
||||||
this.mapCenter = {
|
this.mapCenter = {
|
||||||
|
@ -877,7 +796,7 @@ export default {
|
||||||
updateBy: undefined,
|
updateBy: undefined,
|
||||||
updateTime: undefined,
|
updateTime: undefined,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
m7sVersion: 'v3',
|
m7sVersion: "v3",
|
||||||
https: false,
|
https: false,
|
||||||
serverType: "M7S",
|
serverType: "M7S",
|
||||||
};
|
};
|
||||||
|
@ -961,8 +880,8 @@ export default {
|
||||||
return delSite(recordIds);
|
return delSite(recordIds);
|
||||||
})
|
})
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
if (data.msg === 'ok') {
|
if (data.msg === "ok") {
|
||||||
this.msgSuccess('删除成功');
|
this.msgSuccess("删除成功");
|
||||||
} else {
|
} else {
|
||||||
this.msgError(data.msg);
|
this.msgError(data.msg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue