This commit is contained in:
23688nl 2022-04-20 10:24:59 +08:00
parent f91f935d2f
commit 460babe265
5 changed files with 205 additions and 22 deletions

View File

@ -10,16 +10,16 @@
<script>
export default {
name: 'AppMain',
name: "AppMain",
computed: {
cachedViews() {
return this.$store.state.tagsView.cachedViews
return this.$store.state.tagsView.cachedViews;
},
key() {
return this.$route.path
}
}
}
return this.$route.path;
},
},
};
</script>
<style lang="scss" scoped>
@ -28,7 +28,9 @@ export default {
min-height: calc(100vh - 50px);
width: 100%;
position: relative;
overflow: hidden;
overflow: auto;
height: calc(100vh - 84px);
min-height: calc(100vh - 84px);
}
.fixed-header + .app-main {
@ -45,6 +47,24 @@ export default {
padding-top: 84px;
}
}
.app-main::-webkit-scrollbar {
/*滚动条整体样式*/
width: 8px; /*高宽分别对应横竖滚动条的尺寸*/
height: 5px;
}
.app-main::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 10px;
// box-shadow: inset 0 0 5px #c4c4c4;
background: #929292a6;
}
.app-main::-webkit-scrollbar-track {
/*滚动条里面轨道*/
// -webkit-box-shadow:
box-shadow: inset 0 0 5px #f6f6f6;
border-radius: 10px;
background: #ffffff;
}
</style>
<style lang="scss">
@ -54,4 +74,24 @@ export default {
padding-right: 15px;
}
}
// ::-webkit-scrollbar {
// /**/
// width: 8px; /**/
// height: 5px;
// }
// ::-webkit-scrollbar-thumb {
// /**/
// border-radius: 10px;
// // box-shadow: inset 0 0 5px #c4c4c4;
// background: #929292a6;
// }
// ::-webkit-scrollbar-track {
// /**/
// // -webkit-box-shadow:
// box-shadow: inset 0 0 5px #f6f6f6;
// border-radius: 10px;
// background: #ffffff;
// }
</style>

View File

@ -133,9 +133,15 @@ export default {
watch: {
$route(to, from) {
if (from.fullPath === "/index") {
debugger
document.getElementById("con_lf_top_div").style.background = "#fff";
document.getElementById("con_lf_top_div").style.height = "calc(100vh - 84px)";
document.getElementById("con_lf_top_div").style.minHeight = "calc(100vh - 84px)";
} else if (to.fullPath === "/index") {
debugger
document.getElementById("con_lf_top_div").style.background = "#010e45";
document.getElementById("con_lf_top_div").style.height = "calc(100vh - 84px)";
document.getElementById("con_lf_top_div").style.minHeight = "calc(100vh - 84px)";
}
},
},
@ -249,6 +255,8 @@ export default {
document.getElementById("app").style.background = "#fff";
document.getElementById("con_lf_top_div").style.background = "#fff";
document.getElementById("con_lf_top_div").style.overflow = "auto";
document.getElementById("con_lf_top_div").style.height = "calc(100vh - 84px)";
document.getElementById("con_lf_top_div").style.minHeight = "calc(100vh - 84px)";
document.getElementById("con_lf_top_div").scrollTop = this.thisScrollTopY;
if (this.setIntervalGetCountOpt) {
clearInterval(this.setIntervalGetCountOpt);

View File

@ -21,7 +21,7 @@ export default {
type: String,
},
value: {
type: String,
type: [String, Number],
},
},
};

View File

@ -238,6 +238,10 @@
</el-form-item>
</el-col>
</el-row>
<el-form-item label="总路设备:" >
<el-input v-model="form.projectDeviceName" suffix-icon="el-icon-caret-bottom" @focus="openTableSelectDialog()" placeholder="请输入电价合同" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" @click="submitForm"> </el-button>
@ -265,7 +269,7 @@
/>
<div slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" @click="resuleClick"> </el-button>
<el-button size="mini" type="primary" @click="resultClick"> </el-button>
<el-button size="mini" @click="() =>{selectTableShow = false}"> </el-button>
</div>
</el-dialog>
@ -285,6 +289,9 @@ import {
updateProject,
exportProject
} from "@/api/iot/project";
import {
listDevice
} from "@/api/iot/device";
import {
listContract
} from "@/api/iot/contract";
@ -350,16 +357,16 @@ export default {
{ required: true, message: "项目类型不能为空", trigger: "blur" }
],
regionalismId: [
{ required: true, message: "行政区划不能为空", trigger: "blur" }
{ required: true, message: "行政区划不能为空", trigger: "change" }
],
projectAddress: [
{ required: true, message: "项目地址不能为空", trigger: "blur" }
{ required: true, message: "项目地址不能为空", trigger: "change" }
],
projectLng: [
{ required: true, message: "经度不能为空", trigger: "blur" }
{ required: true, message: "经度不能为空", trigger: "change" }
],
projectLat: [
{ required: true, message: "纬度不能为空", trigger: "blur" }
{ required: true, message: "纬度不能为空", trigger: "change" }
]
},
projectTypeOptions: [],
@ -390,6 +397,96 @@ export default {
this.getTreeselect();
},
methods: {
//
openTableSelectDialog() {
this.selectResult = {};
this.tableSelectOption = {
otherOption: {
tableType: "device"
},
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;
},
//
inputFocusContract() {
this.selectResult = {};
@ -474,6 +571,14 @@ export default {
},
//
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;
@ -481,22 +586,46 @@ export default {
}
);
},
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;
}
},
//
resuleClick() {
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) {
@ -638,7 +767,8 @@ export default {
regionalismId: null,
projectAddress: null,
projectLng: null,
projectLat: null
projectLat: null,
projectDevice: '',
};
this.resetForm("form");
},

View File

@ -51,6 +51,11 @@
</div>
<div class="table-row">
<div class="table-row-col">
<div class="title">总路设备</div>
<div class="content">{{infoData.projectDeviceName || '--' }}</div>
</div>
<div class="table-row-col" style="flex: 2 0 0%;">
<div class="title">项目地址</div>
<div class="content">
<span class="centent">{{infoData.projectAddress}}</span>