From b9203dcca6cda96e568d4ba78a4705625c7f7345 Mon Sep 17 00:00:00 2001 From: guoweilong Date: Wed, 12 Jun 2024 17:50:06 +0800 Subject: [PATCH] fix:修改bug --- App.vue | 4 +++- pages/charge/visitsAndFees/createaVisit.vue | 36 ++++++++++++++++++++++-------------- pages/charge/visitsAndFees/detail.vue | 2 +- pages/charge/visitsAndFees/index.vue | 8 +++++--- pages/charge/visitsAndFees/processFlow.vue | 4 ++-- pages/login/workbench.vue | 55 +++++++++++++++++++++++++++---------------------------- store/mudules/tabBar.js | 5 ++--- store/mudules/user.js | 2 ++ 8 files changed, 64 insertions(+), 52 deletions(-) diff --git a/App.vue b/App.vue index 8274a37..e098cd9 100644 --- a/App.vue +++ b/App.vue @@ -20,7 +20,9 @@ console.log(this); this.$store.dispatch('GetInfo') let workName = uni.getStorageSync('tabName'); - this.$store.dispatch('setTab', {data: workName}); + if(workName){ + this.$store.dispatch('setTab', {data: workName}); + } uni.hideTabBar(); console.log('App Show') }, diff --git a/pages/charge/visitsAndFees/createaVisit.vue b/pages/charge/visitsAndFees/createaVisit.vue index 7b04f84..277b75b 100644 --- a/pages/charge/visitsAndFees/createaVisit.vue +++ b/pages/charge/visitsAndFees/createaVisit.vue @@ -12,7 +12,7 @@ + disabled disabledColor="#fff"> @@ -21,7 +21,7 @@ v-if="item.type === 'input'" :prop="item.key"> + :maxlength="item.max" disabledColor="#fff" border="none"> @@ -29,8 +29,7 @@ v-if="item.type === 'select'" :disabled="operationStatus ==='YD'" :prop="item.key"> + inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff" border="none"> {{getDictDataLabel(item.dict,model[item.key])}} @@ -65,7 +64,7 @@ + :disabled="operationStatus ==='YD' || item.disabled" border="none"> @@ -513,7 +512,7 @@ type: "select", required: true, key: "vlgOrCmty", - disabled:true + disabled: true }, { label: '户名', placeholder: "请选择或输入", @@ -631,10 +630,12 @@ }, { label: '当前地址', required: true, - placeholder: "请输入", + placeholder: "自动定位获取", + // placeholder: "请输入", type: "input", key: "visitDetailedAddress", show: true, + disabled:true }, { label: '上传图片', required: true, @@ -785,9 +786,13 @@ this.model.address = `${this.model.userProvince}${this.model.userCity}${this.model.userDistrict}${this.model.userStreet}` this.model.isCharged = this.model.isCharged === 'Y' ? '是' : '否'; - this.model.isIntent = this.model.isIntent === 'Y' ? '是' : '否'; + // this.model.isIntent = this.model.isIntent === 'Y' ? '是' : '否'; this.model.isVisited = this.model.isVisited === 'Y' ? '是' : '否'; this.model.hasDm = this.model.hasDm === 'Y' ? '是' : '否'; + this.model.chargeAmt = String(this.model.chargeAmt); + if (this.model.entryTime.includes(' 00:00:00')) { + this.model.entryTime = this.model.entryTime.slice(0, -9); + } if (this.model.isCharged === '否') { this.chargeData.slice(1).map(item => { item.show = false; @@ -826,7 +831,7 @@ } }) } - + console.log("填充数据", this.model); }, async init() { console.log(this.$store); @@ -850,9 +855,12 @@ if (!this.$isDing) { return } - console.log("钉钉定位") + var host= window.location.origin + '/'; + // let currentUrl = window.location.href; + console.log("钉钉定位",host) + // let currentUrl = "http://192.168.0.53:8001/" let data = { - url: "http://192.168.0.53:8001/" + url: host } let that = this; const result = await getDingtalkConfig(data); @@ -979,7 +987,7 @@ let col = result.data.map(item => ({ value: item.vlgOrCmty, label: item.vlgOrCmty, - urbRurCls:item.urbRurCls + urbRurCls: item.urbRurCls })); this.columns = [col]; } else if (item.key === 'userName') { @@ -1327,11 +1335,11 @@ copyMethods() { // this.copyModel.fieldPhotoFile = this.fileList.map(item => item.uuid).join(","); this.copyModel.isCharged = this.copyModel.isCharged === '是' ? 'Y' : 'N'; - this.copyModel.isIntent = this.copyModel.isIntent === '是' ? 'Y' : 'N'; + // this.copyModel.isIntent = this.copyModel.isIntent === '是' ? 'Y' : 'N'; this.copyModel.isVisited = this.copyModel.isVisited === '是' ? 'Y' : 'N'; this.copyModel.hasDm = this.copyModel.hasDm === '是' ? 'Y' : 'N'; if (!this.copyModel.entryTime.includes(' 00:00:00')) { - this.copyModel.entryTime += ' 00:00:00'; + this.copyModel.entryTime += ' 00:00:00'; } // this.copyModel.attachmentFile = this.attachmentList.map(item => item.uuid).join(","); }, diff --git a/pages/charge/visitsAndFees/detail.vue b/pages/charge/visitsAndFees/detail.vue index 86058f9..551c44a 100644 --- a/pages/charge/visitsAndFees/detail.vue +++ b/pages/charge/visitsAndFees/detail.vue @@ -109,7 +109,7 @@ name: "是否有意向", value: "", key: "isIntent", - dict:'sys_yes_no' + dict:'sys_mc_visit_intent' },{ name: "房屋情况", value: "", diff --git a/pages/charge/visitsAndFees/index.vue b/pages/charge/visitsAndFees/index.vue index 8b80a12..a2ccffb 100644 --- a/pages/charge/visitsAndFees/index.vue +++ b/pages/charge/visitsAndFees/index.vue @@ -85,7 +85,7 @@ - + @@ -108,7 +108,7 @@ 更多操作 - + 查看详情 @@ -318,9 +318,11 @@ onLoad() { this.initData(); this.getCompanyCascader(); + let that = this; // 监听其他页面返回后刷新 uni.$on('update', function(data) { - this.initData(); + console.log("检测刷新"); + that.initData(); }) }, onShow() {}, diff --git a/pages/charge/visitsAndFees/processFlow.vue b/pages/charge/visitsAndFees/processFlow.vue index 23eeba7..cb5835b 100644 --- a/pages/charge/visitsAndFees/processFlow.vue +++ b/pages/charge/visitsAndFees/processFlow.vue @@ -49,7 +49,7 @@ }, methods: { descMethods(item){ - return `提交与${item.procTime}\n意见:${item.opRemark?item.opRemark:'无'}` + return `提交与${item.procTime}\n操作:${item.opName?item.opName:'无'}\n意见:${item.opRemark?item.opRemark:'无'}` }, async init() { let data = { @@ -62,7 +62,7 @@ rows } = await getMcOperationLogList(data); console.log(rows); - this.list = rows + this.list = rows.reverse(); } } } diff --git a/pages/login/workbench.vue b/pages/login/workbench.vue index 6f2bb2d..bf2c9a7 100644 --- a/pages/login/workbench.vue +++ b/pages/login/workbench.vue @@ -7,7 +7,7 @@ 市场洞察平台 - 市场化收费工具 @@ -25,47 +25,46 @@ }, data() { return { - + toolPermissions: ['schsf:mcVisit:list', 'schsf:mcIgnition:list', 'schsf:mcConstruction:list'] } }, - computed: { + onShow() { }, onLoad() { - if (!this.validate()) { - this.handleClick('insight'); - // setTimeout(()=>{ - // uni.switchTab({ - // url: '/pages/market/index' - // }) - // },500) + this.$store.dispatch('GetInfo').then(()=>{ + console.log("getters",this.$store.getters); + const hasPermission = this.hasPermission; + console.log("是否有工具权限",hasPermission); + if (!hasPermission) { + this.handleClick('insight'); + } + }) + }, + computed: { + hasPermission() { + return this.toolPermissions.some(permission => { + return this.$checkPermi([permission]); + }); } }, methods: { // 验证是否需要显示工具菜单 - validate() { - let toolPermissions = ['schsf:mcVisit:list', 'schsf:mcIgnition:list', 'schsf:mcConstruction:list'] - console.log(this); - // 假设 this.$checkPermi 是一个返回布尔值的方法 - let hasPermission = toolPermissions.some(permission => { - return this.$checkPermi([permission]); - }); - return hasPermission - }, handleClick(workName) { console.log(workName); this.$store.dispatch('setTab', { data: workName + }).then(() => { + let tabList = this.$store.state.tabbar.list + let urls = tabList[0].pagePath + console.log("跳转", urls); + setTimeout(() => { + uni.switchTab({ + url: `/${urls}` + }) + console.log(this.$store.state); + }, 300) }); - let tabList = this.$store.state.tabbar.list - let urls = tabList[0].pagePath - console.log("跳转", urls); - setTimeout(() => { - uni.switchTab({ - url: `/${urls}` - }) - console.log(this.$store.state); - }, 500) } } } diff --git a/store/mudules/tabBar.js b/store/mudules/tabBar.js index 58ddc31..4d00445 100644 --- a/store/mudules/tabBar.js +++ b/store/mudules/tabBar.js @@ -34,10 +34,9 @@ const tabbar = { }, { data }) { - console.log(tabBars); - console.log(111,data); + console.log("设置tab",data); + commit('SET_USER_TAB', data); uni.setStorageSync('tabName',data); - commit('SET_USER_TAB', data) } } } diff --git a/store/mudules/user.js b/store/mudules/user.js index 5b6df6e..9bb319d 100644 --- a/store/mudules/user.js +++ b/store/mudules/user.js @@ -102,6 +102,8 @@ const user = { CLEAR_LOGIN_INFO(state) { uni.removeStorageSync(AccessTokenKey) uni.removeStorageSync(RefreshTokenKey) + uni.removeStorageSync('storage_data') + uni.removeStorageSync('tabName') state.accessToken = '' state.refreshToken = '' state.userInfo = {} -- libgit2 0.21.2