Commit 2e3171ca authored by 纪泽龙's avatar 纪泽龙

Merge branch 'develop_jzl'

parents 1b36e54c 40f47753
......@@ -8,17 +8,17 @@
<el-form ref="form" :model="form" :rules="rules" label-width="135px">
<el-row>
<el-col :span="11">
<el-form-item label="所属管道" prop="pipeCode">
<el-form-item label="所属管道" prop="pipeId">
<el-select
v-model="form.pipeCode"
v-model="form.pipeId"
placeholder="请选择所属管道"
style="width: 100%"
>
<el-option
v-for="item in pipeList"
:key="item.pipeCode"
:key="item.pipeId"
:label="item.pipeName"
:value="item.pipeCode"
:value="item.pipeId"
>
</el-option>
</el-select>
......@@ -163,7 +163,7 @@ export default {
pipeList: [],
rules: {
pipeCode: [
pipeId: [
{ required: true, message: "请选择所属管道", trigger: "blur" },
// { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
],
......@@ -211,6 +211,8 @@ export default {
},
submitForm() {
this.$refs["form"].validate((valid) => {
// console.log("this.form流量计",this.form)
// return;
if (valid) {
if (this.form.deviceId != null) {
updateDeviceInfo(this.form).then((response) => {
......
......@@ -8,17 +8,17 @@
<el-form ref="form" :model="form" :rules="rules" label-width="135px">
<el-row>
<el-col :span="11">
<el-form-item label="所属管道" prop="pipeCode">
<el-form-item label="所属管道" prop="pipeId">
<el-select
v-model="form.pipeCode"
v-model="form.pipeId"
placeholder="请选择所属管道"
style="width: 100%"
>
<el-option
<el-option
v-for="item in pipeList"
:key="item.pipeCode"
:key="item.pipeId"
:label="item.pipeName"
:value="item.pipeCode"
:value="item.pipeId"
>
</el-option>
</el-select>
......@@ -156,7 +156,7 @@ export default {
fileList: [],
// 表单校验
rules: {
pipeCode: [
pipeId: [
{ required: true, message: "请选择所属管道", trigger: "blur" },
// { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
],
......@@ -209,6 +209,8 @@ export default {
},
submitForm() {
this.$refs["form"].validate((valid) => {
// console.log("this.form)",this.form)
if (valid) {
if (this.form.deviceId != null) {
updateDeviceInfo(this.form).then((response) => {
......
......@@ -8,17 +8,17 @@
<el-form ref="form" :model="form" :rules="rules" label-width="135px">
<el-row>
<el-col :span="11">
<el-form-item label="所属管道" prop="pipeCode">
<el-form-item label="所属管道" prop="pipeId">
<el-select
v-model="form.pipeCode"
v-model="form.pipeId"
placeholder="请选择所属管道"
style="width: 100%"
>
<el-option
<el-option
v-for="item in pipeList"
:key="item.pipeCode"
:key="item.pipeId"
:label="item.pipeName"
:value="item.pipeCode"
:value="item.pipeId"
>
</el-option>
</el-select>
......@@ -160,7 +160,7 @@ export default {
fileArr: [],
pipeList: [],
rules: {
pipeCode: [
pipeId: [
{ required: true, message: "请选择所属管道", trigger: "blur" },
// { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
],
......@@ -209,6 +209,7 @@ export default {
},
submitForm() {
this.$refs["form"].validate((valid) => {
// console.log("this.form",this.form)
if (valid) {
if (this.form.deviceId != null) {
updateDeviceInfo(this.form).then((response) => {
......
......@@ -132,9 +132,10 @@ export default {
deviceMore() {
console.log(this.obj.polyline.getExtData().lineData)
this.obj.polyline.getExtData().class.view.$router.push({
path: "/realtimeData/realtimedetail",
path: "/dataMonitoring/realtimedetail",
query: {
deviceId: this.obj.polyline.getExtData().lineData.pipeId,
deviceType:"0"
},
});
},
......
......@@ -54,8 +54,11 @@ router.afterEach((to, from) => {
// console.log('全局后置钩子',to, from)
if (to.path == "/enterprise/mapView") {
store.dispatch("app/toggleDevice", "mobile");
store.dispatch("app/closeSideBar", { withoutAnimation: true });
} else {
store.dispatch("app/toggleDevice", "desktop");
store.dispatch("app/closeSideBar", { withoutAnimation: false });
}
NProgress.done();
});
This diff is collapsed.
......@@ -342,6 +342,7 @@ export default {
created() {
// 让左边的框隐藏
this.$store.dispatch("app/toggleDevice", "mobile");
console.log("sasdasdas")
},
mounted() {
......@@ -396,7 +397,6 @@ export default {
}
});
},
getDeviceInfo(queryParams) {
this.loading = true;
return getAllDeviceInfo(queryParams).then((response) => {
......
......@@ -81,7 +81,7 @@ export default {
code: [{ required: true, trigger: "change", message: "验证码不能为空" }]
},
loading: false,
redirect: "/index"
redirect: ""
};
},
watch: {
......@@ -134,7 +134,9 @@ export default {
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
this.$store.dispatch("Login", this.loginForm).then(() => {
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
// this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
// console.log(this.redirect)
this.$router.push({ path: "/enterprise/mapView" || "/" }).catch(()=>{});
}).catch(() => {
this.loading = false;
this.getCode();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment