This commit is contained in:
邱贞招 2024-08-17 13:47:37 +08:00
parent 5bd18b982a
commit 8ec0cf4b9a
4 changed files with 42 additions and 22 deletions

View File

@ -63,7 +63,7 @@ export default {
// province: '',
// city: '',
},
area:{},
// area:{},
parkingList:[],
noParkingList:[],
noridingList:[],
@ -72,7 +72,9 @@ export default {
},
mounted() {
// this.initAMap();
this.getAreas(this.areaId)
setTimeout(() =>{
this.getAreas(this.areaId)
},1000)
},
beforeDestroy() {
console.log("轨迹=====组件将被销毁");
@ -99,11 +101,11 @@ export default {
// },
async getAreas(areaId) {
getArea(this.areaId).then(response => {
console.log(response,'responseresponse');
this.area = response.data;
listParking({ areaId: this.area.areaId }).then(response => {
let list = response.rows;
console.log(list,'listlistlist');
@ -116,7 +118,7 @@ export default {
this.noridingList.push(item);
}
});
this.initAMap();
});
});
@ -128,7 +130,7 @@ export default {
plugins: ["AMap.PlaceSearch"], // 使'AMap.Scale'
}).then((AMap) => {
this.AMap = AMap;
this.map = new AMap.Map("container", {
this.map = new AMap.Map("container", {
// id
viewMode: "3D", // 3D
zoom: 16, //
@ -337,7 +339,7 @@ export default {
});
this.map.add(polygon);
},
addArea(data) {
let polygon = new AMap.Polygon({
path: data,

View File

@ -225,11 +225,11 @@
</el-row>
<div v-if="form.parentId != 0">
<el-row>
<el-col :span="12">
<el-form-item label="是否开启分账" label-width="120" prop="isProfitSharing">
<el-switch v-model="form.isProfitSharing" class="drawer-switch" />
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="是否开启分账" label-width="120" prop="isProfitSharing">-->
<!-- <el-switch v-model="form.isProfitSharing" class="drawer-switch" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12">
<el-form-item label="是否有独立支付账户" label-width="120" prop="separateAccount">
<el-radio-group v-model="form.separateAccount">
@ -497,7 +497,7 @@ export default {
},
//
form: {
isProfitSharing: 'N'
// isProfitSharing: 'N'
},
form2: {
method: '1'
@ -652,7 +652,7 @@ export default {
phone: undefined,
email: undefined,
status: "0",
isProfitSharing: false,
// isProfitSharing: false,
separateAccount: 'N',
platformServiceFee: '4',
handlingCharge: '5.4',
@ -715,7 +715,7 @@ export default {
this.$set(this.form, "areaIds", response.areaIds);
this.open = true;
this.title = "修改运营商";
this.form.isProfitSharing = this.form.isProfitSharing === 'true';
// this.form.isProfitSharing = this.form.isProfitSharing === 'true';
this.form.isUsePlatformApp = this.form.isUsePlatformApp === 'true';
console.log("userName==========="+response.data.userName)
this.appUserId = this.form.appUserId;

View File

@ -414,8 +414,8 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="硬件版本" prop="deviceName" v-if="hardwareVersionOptions.length > 0" disabled="username != 'admin'" >
<el-select v-model="form.hardwareVersionId" clearable placeholder="请选择硬件版本">
<el-form-item label="硬件版本" prop="deviceName" v-if="hardwareVersionOptions.length > 0">
<el-select v-model="form.hardwareVersionId" clearable placeholder="请选择硬件版本" :disabled="userName != 'admin'">
<el-option
v-for="item in hardwareVersionOptions"
:key="item.id"
@ -525,7 +525,6 @@
:device-sn="form.sn"
:areaId="form.areaId"
/>
</el-col>
</el-row>
<el-row>
@ -560,7 +559,7 @@
updateDevice,
handleLock,
handleUnlocking,
ring,
ring,
oneClickOnline,
oneClickOffline,
reboot,
@ -1067,7 +1066,9 @@ export default {
/** 详情按钮 */
handleView(row) {
this.open2 = true;
console.log("row======"+JSON.stringify(row))
this.form.areaId = row.areaId;
this.form = row;
console.log(this.form,'this.formthis.formthis.form');
this.showPlaceSearchMap = true;

View File

@ -381,7 +381,7 @@ import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUs
import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { listArea } from '@/api/system/area'
import { listArea, selectAreaListByDeptId } from '@/api/system/area'
import { bandSystemUser, fastSearch, unbindSystemUser } from '@/api/user/user'
export default {
@ -495,11 +495,17 @@ export default {
message: "请输入正确的手机号码",
trigger: "blur"
}
],
deptId: [
{ required: true, message: "所属运营商不能为空", trigger: "blur" }
]
}
};
},
watch: {
'form.deptId': function(newVal) {
this.getAreaListByDeptId(newVal);
},
//
deptName(val) {
this.$refs.tree.filter(val);
@ -515,6 +521,15 @@ export default {
});
},
methods: {
getAreaListByDeptId(deptId){
if(deptId) {
selectAreaListByDeptId(deptId).then(response => {
console.log("根据运营商id获取运营区和型号=========", response.data)
this.areaOptions = response.data.areaList;
console.log("this.areaOptions", this.areaOptions)
});
}
},
formatRealName(user) {
return user.realName ? user.realName : user.userName;
},
@ -556,6 +571,8 @@ export default {
role = '3';
}else if(roleKey == 'repair'){
role = '2';
}else if(roleKey == "leader" || roleKey == "admin"){
role = '9';
}
}
console.log("role",role)