diff --git a/.env.development b/.env.development index 21df1b5..963657b 100644 --- a/.env.development +++ b/.env.development @@ -6,7 +6,10 @@ ENV = 'development' # 电动车租赁系统/开发环境 # VUE_APP_BASE_API = '/dev-api' -VUE_APP_BASE_API = 'http://192.168.2.21:8090' +# VUE_APP_BASE_API = 'http://192.168.2.21:8090' +# VUE_APP_BASE_API = 'https://zc.chuangtewl.com' +VUE_APP_BASE_API = 'https://zc.chuangtewl.com/prod-api' + # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/.env.production b/.env.production index 257931e..7b03b96 100644 --- a/.env.production +++ b/.env.production @@ -6,4 +6,6 @@ ENV = 'production' # 电动车租赁系统/生产环境 # VUE_APP_BASE_API = '/prod-api' +# VUE_APP_BASE_API = 'http://192.168.2.21:8090' +# VUE_APP_BASE_API = 'https://zc.chuangtewl.com' VUE_APP_BASE_API = 'https://zc.chuangtewl.com/prod-api' diff --git a/.env.staging b/.env.staging index 394d610..6545377 100644 --- a/.env.staging +++ b/.env.staging @@ -8,4 +8,6 @@ ENV = 'staging' # 电动车租赁系统/测试环境 # VUE_APP_BASE_API = '/stage-api' -VUE_APP_BASE_API = 'http://192.168.2.21:8090' +# VUE_APP_BASE_API = 'http://192.168.2.21:8090' +VUE_APP_BASE_API = 'https://zc.chuangtewl.com/prod-api' + diff --git a/src/components/AreaMap/index.vue b/src/components/AreaMap/index.vue new file mode 100644 index 0000000..9a1c241 --- /dev/null +++ b/src/components/AreaMap/index.vue @@ -0,0 +1,235 @@ + + + + + tips:双击区域可重新编辑 + 点击新建--左键开始建立停车区--右键完成建立--点击结束编辑才会最终生效 + + + 新建 + + 结束编辑 + 切换地图 + 清除多边形 + + + + + + + diff --git a/src/views/system/area/index.vue b/src/views/system/area/index.vue index 77907c1..3c77c79 100644 --- a/src/views/system/area/index.vue +++ b/src/views/system/area/index.vue @@ -129,6 +129,16 @@ + @@ -160,10 +170,12 @@ diff --git a/src/views/system/device/index.vue b/src/views/system/device/index.vue index 994ea9c..45ed543 100644 --- a/src/views/system/device/index.vue +++ b/src/views/system/device/index.vue @@ -42,7 +42,7 @@ /> - + 更新 + 上架 + 下架 + - + - + - + - - + + @@ -235,7 +243,7 @@ - + item.roleKey !== 'common' && item.roleKey !== 'agent'); - }, - }, components: { Treeselect }, data() { return { @@ -318,7 +321,6 @@ export default { form: { dividendStatus: "0" }, - inputDividendProportion: 30, // 用于输入的百分比 defaultProps: { children: "children", label: "label" @@ -367,11 +369,9 @@ export default { agentList:[], // 表单校验 rules: { - agentId: [ - { required: true, message: "请选择代理商", trigger: "blur" }, - ], dividendProportion: [ { required: true, message: "分账比例不能为空", trigger: "blur" }, + { pattern: /^\d+$/, message: '分账比例必须为正整数', trigger: 'blur' } ], cityId: [ { required: true, message: "代理城市不能为空", trigger: "blur" }, @@ -409,7 +409,7 @@ export default { setTimeout(() => { console.log(this.dicts,'dictsdicts'); }, 200); - + // this.getDeptTree(); this.getConfigKey("sys.user.initPassword").then(response => { this.initPassword = response.msg; @@ -418,20 +418,11 @@ export default { this.getAgentList() }, methods: { - handleInput() { - // 当输入时,将输入的百分比转换为原始值 - console.log(111111111111) - const proportion = parseFloat(this.inputDividendProportion); - if (!isNaN(proportion)) { - console.log(22222222222) - this.form.dividendProportion = proportion / 100; - } - }, getAgentList() { let data = { pageNum: 1, pageSize: 30, - + } listAgent(this.addDateRange(data)).then(response => { console.log(response,'responseresponseresponse'); @@ -442,7 +433,7 @@ export default { // })); console.log( this.options,' this.options this.options'); }); - + }, formatDividendProportion(row) { let dividendProportion = row.dividendProportion; @@ -576,11 +567,9 @@ export default { this.roleOptions = response.roles; this.areaOptions = response.areas; this.$set(this.form, "postIds", response.postIds); - this.$set(this.form, "roleIds", response.roleIds[0]); + this.$set(this.form, "roleIds", response.roleIds); + // console.log(1111111111111) this.$set(this.form, "areas", response.areas); - this.form.roleIds = response.roleIds[0]; // 取出第一个角色 ID - console.log("回显-=====roleIds[0]",response.roleIds[0]) - this.inputDividendProportion = this.form.dividendProportion * 100; this.open = true; this.title = "修改系统用户"; this.form.password = ""; @@ -614,10 +603,6 @@ export default { submitForm: function() { this.$refs["form"].validate(valid => { this.form.userType = '03'; - this.form.roleIds = [this.form.roleIds]; - console.log("提交roleIds=========="+this.form.roleIds) - this.form.dividendProportion = this.inputDividendProportion; // 转换为0.3 - // console.log('保存的分账比例:', this.form.dividendProportion); this.form.dividendStatus = this.form.dividendStatus === "1" ? 1:0; if (valid) { if (this.form.userId != undefined) {