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> <script>
export default { export default {
name: 'AppMain', name: "AppMain",
computed: { computed: {
cachedViews() { cachedViews() {
return this.$store.state.tagsView.cachedViews return this.$store.state.tagsView.cachedViews;
}, },
key() { key() {
return this.$route.path return this.$route.path;
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -28,10 +28,12 @@ export default {
min-height: calc(100vh - 50px); min-height: calc(100vh - 50px);
width: 100%; width: 100%;
position: relative; position: relative;
overflow: hidden; overflow: auto;
height: calc(100vh - 84px);
min-height: calc(100vh - 84px);
} }
.fixed-header+.app-main { .fixed-header + .app-main {
padding-top: 50px; padding-top: 50px;
} }
@ -41,10 +43,28 @@ export default {
min-height: calc(100vh - 84px); min-height: calc(100vh - 84px);
} }
.fixed-header+.app-main { .fixed-header + .app-main {
padding-top: 84px; 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>
<style lang="scss"> <style lang="scss">
@ -54,4 +74,24 @@ export default {
padding-right: 15px; 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> </style>

View File

@ -133,9 +133,15 @@ export default {
watch: { watch: {
$route(to, from) { $route(to, from) {
if (from.fullPath === "/index") { if (from.fullPath === "/index") {
debugger
document.getElementById("con_lf_top_div").style.background = "#fff"; 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") { } else if (to.fullPath === "/index") {
debugger
document.getElementById("con_lf_top_div").style.background = "#010e45"; 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("app").style.background = "#fff";
document.getElementById("con_lf_top_div").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.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; document.getElementById("con_lf_top_div").scrollTop = this.thisScrollTopY;
if (this.setIntervalGetCountOpt) { if (this.setIntervalGetCountOpt) {
clearInterval(this.setIntervalGetCountOpt); clearInterval(this.setIntervalGetCountOpt);

View File

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

View File

@ -238,6 +238,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </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> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" @click="submitForm"> </el-button> <el-button size="mini" type="primary" @click="submitForm"> </el-button>
@ -265,7 +269,7 @@
/> />
<div slot="footer" class="dialog-footer"> <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> <el-button size="mini" @click="() =>{selectTableShow = false}"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -285,6 +289,9 @@ import {
updateProject, updateProject,
exportProject exportProject
} from "@/api/iot/project"; } from "@/api/iot/project";
import {
listDevice
} from "@/api/iot/device";
import { import {
listContract listContract
} from "@/api/iot/contract"; } from "@/api/iot/contract";
@ -350,16 +357,16 @@ export default {
{ required: true, message: "项目类型不能为空", trigger: "blur" } { required: true, message: "项目类型不能为空", trigger: "blur" }
], ],
regionalismId: [ regionalismId: [
{ required: true, message: "行政区划不能为空", trigger: "blur" } { required: true, message: "行政区划不能为空", trigger: "change" }
], ],
projectAddress: [ projectAddress: [
{ required: true, message: "项目地址不能为空", trigger: "blur" } { required: true, message: "项目地址不能为空", trigger: "change" }
], ],
projectLng: [ projectLng: [
{ required: true, message: "经度不能为空", trigger: "blur" } { required: true, message: "经度不能为空", trigger: "change" }
], ],
projectLat: [ projectLat: [
{ required: true, message: "纬度不能为空", trigger: "blur" } { required: true, message: "纬度不能为空", trigger: "change" }
] ]
}, },
projectTypeOptions: [], projectTypeOptions: [],
@ -390,6 +397,96 @@ export default {
this.getTreeselect(); this.getTreeselect();
}, },
methods: { 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() { inputFocusContract() {
this.selectResult = {}; this.selectResult = {};
@ -474,6 +571,14 @@ export default {
}, },
// //
childGetList(data) { 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( listContract(Object.assign(data.page, data.param, { selected: 1 })).then(
response => { response => {
this.tableSelectOption.tableList = response.rows; 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) { returnEvent(data) {
if (data.type === "dblclick") { 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.contractId = data.value.contractId;
this.form.contractName = data.value.contractName; this.form.contractName = data.value.contractName;
this.selectTableShow = false; }
this.selectTableShow = false;
} else if (data.type === "click") { } else if (data.type === "click") {
this.selectResult = {}; this.selectResult = {};
this.selectResult.contractId = data.value.contractId; if (data.otherOption.tableType === "device") {
this.selectResult.contractName = data.value.contractName; 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() {
this.form.contractId = this.selectResult.contractId; if (this.selectResult.tableType === "device") {
this.form.contractName = this.selectResult.contractName; 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; this.selectTableShow = false;
}, },
sortChange(column) { sortChange(column) {
@ -638,7 +767,8 @@ export default {
regionalismId: null, regionalismId: null,
projectAddress: null, projectAddress: null,
projectLng: null, projectLng: null,
projectLat: null projectLat: null,
projectDevice: '',
}; };
this.resetForm("form"); this.resetForm("form");
}, },

View File

@ -51,6 +51,11 @@
</div> </div>
<div class="table-row"> <div class="table-row">
<div class="table-row-col"> <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="title">项目地址</div>
<div class="content"> <div class="content">
<span class="centent">{{infoData.projectAddress}}</span> <span class="centent">{{infoData.projectAddress}}</span>