diff --git a/App.vue b/App.vue
index c5d4298..a032cd6 100644
--- a/App.vue
+++ b/App.vue
@@ -30,7 +30,6 @@ export default {
diff --git a/pages/charge/visitsAndFees/index.vue b/pages/charge/visitsAndFees/index.vue
index 66bd9a1..59a25aa 100644
--- a/pages/charge/visitsAndFees/index.vue
+++ b/pages/charge/visitsAndFees/index.vue
@@ -1,7 +1,12 @@
- 退出
+
+
+
+ 退出
+
+
@@ -9,7 +14,7 @@
:actionStyle="actionStyle" @custom="onSearch">
-
+
@@ -72,13 +77,11 @@
当前审批节点:项目公司_市场负责人
-
-
- 您当前确定要退出吗?
-
-
-
+
+
+
+
+
@@ -109,7 +112,7 @@
approval: [{
name: "待我审批"
}],
- title:'同意'
+ titles: '同意'
}
},
computed: {
@@ -131,38 +134,43 @@
})
},
// 拒绝按钮
- handleRefuse(){
- this.title = "拒绝";
+ handleRefuse() {
+ this.titles = "拒绝";
this.$refs.popUpComponentRef.open();
},
// 同意按钮
- handleAgree(){
- this.title = "同意";
+ handleAgree() {
+ this.titles = "同意";
this.$refs.popUpComponentRef.open();
},
- loginOutMethod() {
- this.loginOutShow = true
+ //创建拜访/收费
+ createaVisit() {
+ uni.navigateTo({
+ url: '/pages/charge/visitsAndFees/createaVisit'
+ })
},
loginOut() {
- // this.$modal.confirm('确定注销并退出系统吗?').then(() => {
- //钉钉直接退出微应用
- if (this.$isDing) {
- dd.biz.navigation.close({
- onSuccess: function(result) {
- console.log(result, 'result')
- },
- onFail: function(err) {
- console.log(err, 'err')
- }
- });
- } else {
- this.$store.dispatch('Logout').then((res) => {
- this.loginOutShow = false;
- uni.reLaunch({
- url: '/pages/login/mobile'
+ this.$modal.confirm('您当前确定要退出吗?', '退出登录').then(() => {
+ //钉钉直接退出微应用
+ if (this.$isDing) {
+ dd.biz.navigation.close({
+ onSuccess: function(result) {
+ console.log(result, 'result')
+ },
+ onFail: function(err) {
+ console.log(err, 'err')
+ }
+ });
+ } else {
+ this.$store.dispatch('Logout').then((res) => {
+ uni.reLaunch({
+ url: '/pages/login/mobile'
+ })
})
- })
- }
+ }
+ }).catch(() => {
+ console.log("取消");
+ });
}
}
}
@@ -206,4 +214,17 @@
border: 1px solid #EFF1FD;
border-style: none none solid solid;
}
+
+ .fixBtnCss {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ border-radius: 50%;
+ width: 120rpx;
+ height: 120rpx;
+ position: fixed;
+ background: #5875EB;
+ right: 20rpx;
+ bottom: 150rpx;
+ }
diff --git a/pages/market/index.vue b/pages/market/index.vue
index 8110cea..53ddd65 100644
--- a/pages/market/index.vue
+++ b/pages/market/index.vue
@@ -4,7 +4,7 @@
-
+
退出登录
@@ -20,12 +20,6 @@
-
-
- 您当前确定要退出吗?
-
-
@@ -166,29 +160,28 @@
console.log(this.current);
this.updateList()
},
- loginOutMethod() {
- this.loginOutShow = true
- },
loginOut() {
- // this.$modal.confirm('确定注销并退出系统吗?').then(() => {
+ this.$modal.confirm('您当前确定要退出吗?', '退出登录').then(() => {
//钉钉直接退出微应用
- if (this.$isDing) {
- dd.biz.navigation.close({
- onSuccess: function(result) {
- console.log(result, 'result')
- },
- onFail: function(err) {
- console.log(err, 'err')
- }
- });
- } else {
- this.$store.dispatch('Logout').then((res) => {
- this.loginOutShow = false;
- uni.reLaunch({
- url: '/pages/login/mobile'
+ if (this.$isDing) {
+ dd.biz.navigation.close({
+ onSuccess: function(result) {
+ console.log(result, 'result')
+ },
+ onFail: function(err) {
+ console.log(err, 'err')
+ }
+ });
+ } else {
+ this.$store.dispatch('Logout').then((res) => {
+ uni.reLaunch({
+ url: '/pages/login/mobile'
+ })
})
- })
- }
+ }
+ }).catch(() => {
+ console.log("取消");
+ });
}
}
}
diff --git a/pages/market/insight.vue b/pages/market/insight.vue
index 97e6f15..fc6f0f4 100644
--- a/pages/market/insight.vue
+++ b/pages/market/insight.vue
@@ -55,7 +55,7 @@
-
+
{{item.reportName || ""}}
预算主体:{{item.budgetSubject || ""}}
填报人: {{item.createBy || ""}}
@@ -63,7 +63,7 @@
{{$u.timeFormat(item.validityTimeEnd, 'yyyy年mm月dd日 hh:MM:ss') || ""}}
-
+
{{item.statusName}}
0) {
+ return permissions.some(v => {
+ return all_permission === v || v === permission
+ })
+ } else {
+ return false
+ }
+}
+
+function authRole(role) {
+ const super_admin = "admin"
+ const roles = store.getters && store.getters.roles
+ if (role && role.length > 0) {
+ return roles.some(v => {
+ return super_admin === v || v === role
+ })
+ } else {
+ return false
+ }
+}
+
+export default {
+ // 验证用户是否具备某权限
+ hasPermi(permission) {
+ return authPermission(permission)
+ },
+ // 验证用户是否含有指定权限,只需包含其中一个
+ hasPermiOr(permissions) {
+ return permissions.some(item => {
+ return authPermission(item)
+ })
+ },
+ // 验证用户是否含有指定权限,必须全部拥有
+ hasPermiAnd(permissions) {
+ return permissions.every(item => {
+ return authPermission(item)
+ })
+ },
+ // 验证用户是否具备某角色
+ hasRole(role) {
+ return authRole(role)
+ },
+ // 验证用户是否含有指定角色,只需包含其中一个
+ hasRoleOr(roles) {
+ return roles.some(item => {
+ return authRole(item)
+ })
+ },
+ // 验证用户是否含有指定角色,必须全部拥有
+ hasRoleAnd(roles) {
+ return roles.every(item => {
+ return authRole(item)
+ })
+ }
+}
diff --git a/plugins/index.js b/plugins/index.js
new file mode 100644
index 0000000..efbae15
--- /dev/null
+++ b/plugins/index.js
@@ -0,0 +1,14 @@
+import tab from './tab'
+import auth from './auth'
+import modal from './modal'
+
+export default {
+ install(Vue) {
+ // 页签操作
+ Vue.prototype.$tab = tab
+ // 认证对象
+ Vue.prototype.$auth = auth
+ // 模态框对象
+ Vue.prototype.$modal = modal
+ }
+}
diff --git a/plugins/modal.js b/plugins/modal.js
new file mode 100644
index 0000000..0cdb0a0
--- /dev/null
+++ b/plugins/modal.js
@@ -0,0 +1,112 @@
+export default {
+ // 消息提示
+ msg(content) {
+ uni.showToast({
+ title: content,
+ icon: 'none'
+ })
+ },
+ // 错误消息
+ msgError(content) {
+ uni.showToast({
+ title: content,
+ icon: 'error'
+ })
+ },
+ // 成功消息
+ msgSuccess(content) {
+ uni.showToast({
+ title: content,
+ icon: 'success'
+ })
+ },
+ // 隐藏消息
+ hideMsg(content) {
+ uni.hideToast()
+ },
+ // 弹出提示
+ alert(content, title) {
+ uni.showModal({
+ title: title || '系统提示',
+ content: content,
+ showCancel: false
+ })
+ },
+ // 确认窗体
+ confirm(content, title, option = {
+ confirmText: "确认",
+ cancelText: "取消",
+ delCancel: false
+ }) {
+ return new Promise((resolve, reject) => {
+ // #ifdef APP
+ Vue.prototype.$showModal({
+ title: title || '系统提示',
+ concent: content,
+ cancelVal: option.cancelText,
+ confirmVal: option.confirmText,
+ delCancel: option.delCancel,
+ }).then(res => {
+ console.log(res);
+ // uni.hideLoading()
+ //确认
+ resolve(res)
+ }).catch(res => {
+ //取消
+ reject()
+ console.log(res);
+ })
+ // #endif
+
+ // #ifndef APP
+ uni.showModal({
+ title: title || '系统提示',
+ content: content,
+ cancelText: option.cancelText,
+ confirmText: option.confirmText,
+ showCancel: option.showCancel,
+ confirmColor: "#EA5504",
+ success: function(res) {
+ if (res.confirm) {
+ resolve(res.confirm)
+ }
+
+ if (res.cancel) {
+ reject()
+ }
+ }
+ })
+ // #endif
+ })
+ },
+
+ // 提示信息
+ showToast(option) {
+ if (typeof option === "object") {
+ uni.showToast(option)
+ } else {
+ uni.showToast({
+ title: option,
+ icon: "none",
+ duration: 2500
+ })
+ }
+ },
+ // 打开遮罩层
+ loading(content) {
+ uni.showLoading({
+ title: content,
+ icon: 'none'
+ })
+ },
+ showLoading(content) {
+ uni.showLoading({
+ title: content,
+ icon: 'loading'
+ })
+ },
+ // 关闭遮罩层
+ closeLoading() {
+ uni.hideLoading()
+ }
+}
\ No newline at end of file
diff --git a/plugins/tab.js b/plugins/tab.js
new file mode 100644
index 0000000..5d1b305
--- /dev/null
+++ b/plugins/tab.js
@@ -0,0 +1,30 @@
+export default {
+ // 关闭所有页面,打开到应用内的某个页面
+ reLaunch(url) {
+ return uni.reLaunch({
+ url: url
+ })
+ },
+ // 跳转到tabBar页面,并关闭其他所有非tabBar页面
+ switchTab(url) {
+ return uni.switchTab({
+ url: url
+ })
+ },
+ // 关闭当前页面,跳转到应用内的某个页面
+ redirectTo(url) {
+ return uni.redirectTo({
+ url: url
+ })
+ },
+ // 保留当前页面,跳转到应用内的某个页面
+ navigateTo(url) {
+ return uni.navigateTo({
+ url: url
+ })
+ },
+ // 关闭当前页面,返回上一页面或多级页面
+ navigateBack() {
+ return uni.navigateBack()
+ }
+}
--
libgit2 0.21.2