diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/WxBuildingInfo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/WxBuildingInfo.java
index 000f7853..ee814d5d 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/WxBuildingInfo.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/WxBuildingInfo.java
@@ -80,8 +80,8 @@ public class WxBuildingInfo extends BaseEntity
private String defaultPicture;
/** 是否支持在线 */
- @Excel(name = "是否支持在线")
- private Long isSupportlive;
+ @Excel(name = "支持在线")
+ private Boolean isSupportlive;
/** 球馆状态 */
@Excel(name = "球馆状态")
@@ -93,7 +93,7 @@ public class WxBuildingInfo extends BaseEntity
/** 是否开放 */
@Excel(name = "是否开放")
- private Long isOpen;
+ private Boolean isOpen;
/** 人均价格 */
@Excel(name = "人均价格")
@@ -246,12 +246,12 @@ public class WxBuildingInfo extends BaseEntity
{
return defaultPicture;
}
- public void setIsSupportlive(Long isSupportlive)
+ public void setIsSupportlive(Boolean isSupportlive)
{
this.isSupportlive = isSupportlive;
}
- public Long getIsSupportlive()
+ public Boolean getIsSupportlive()
{
return isSupportlive;
}
@@ -273,12 +273,12 @@ public class WxBuildingInfo extends BaseEntity
{
return rejectReason;
}
- public void setIsOpen(Long isOpen)
+ public void setIsOpen(Boolean isOpen)
{
this.isOpen = isOpen;
}
- public Long getIsOpen()
+ public Boolean getIsOpen()
{
return isOpen;
}
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/WxBuildingInfoMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/WxBuildingInfoMapper.xml
index ec52a449..cd0c443b 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/WxBuildingInfoMapper.xml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/WxBuildingInfoMapper.xml
@@ -52,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and CITY_NAME like concat('%', #{cityName}, '%')
and STATUS = #{status}
and IS_OPEN = #{isOpen}
+ and IS_SUPPORTLIVE = #{isSupportlive}
and CREATED_ID = #{createdId}
diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json
index 52a63650..5a8c7106 100644
--- a/ruoyi-ui/package.json
+++ b/ruoyi-ui/package.json
@@ -39,11 +39,13 @@
"url": "https://gitee.com/y_project/RuoYi-Cloud.git"
},
"dependencies": {
+ "@amap/amap-jsapi-loader": "^1.0.1",
"@riophae/vue-treeselect": "0.4.0",
"axios": "0.24.0",
"clipboard": "2.0.8",
"core-js": "3.19.1",
"echarts": "4.9.0",
+ "element-china-area-data": "^5.0.2",
"element-ui": "2.15.8",
"file-saver": "2.0.5",
"fuse.js": "6.4.3",
@@ -52,14 +54,17 @@
"js-cookie": "3.0.1",
"jsencrypt": "3.0.0-rc.1",
"nprogress": "0.2.0",
+ "qqmap": "^1.0.1",
"quill": "1.3.7",
"screenfull": "5.0.2",
"sortablejs": "1.10.2",
"vue": "2.6.12",
- "vue-qr": "^2.3.0",
+ "vue-amap": "^0.5.10",
+ "vue-baidu-map": "^0.21.22",
"vue-count-to": "1.0.13",
"vue-cropper": "0.5.5",
"vue-meta": "2.4.0",
+ "vue-qr": "^2.3.0",
"vue-router": "3.4.9",
"vuedraggable": "2.24.3",
"vuex": "3.6.0"
diff --git a/ruoyi-ui/src/api/system/WxBuilding.js b/ruoyi-ui/src/api/system/WxBuilding.js
index 29c1e3fe..2eb3ff1d 100644
--- a/ruoyi-ui/src/api/system/WxBuilding.js
+++ b/ruoyi-ui/src/api/system/WxBuilding.js
@@ -25,7 +25,14 @@ export function addWxBuilding(data) {
data: data
})
}
-
+// 批量上传图片
+export function batchUploadFiles(data,url) {
+ return request({
+ url: url,
+ method: 'post',
+ data: data
+ })
+}
// 修改球场管理
export function updateWxBuilding(data) {
return request({
diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js
index ebd94b9d..a43b8507 100644
--- a/ruoyi-ui/src/main.js
+++ b/ruoyi-ui/src/main.js
@@ -1,86 +1,109 @@
-import Vue from 'vue'
-
-import Cookies from 'js-cookie'
-
-import Element from 'element-ui'
-import './assets/styles/element-variables.scss'
-
-import '@/assets/styles/index.scss' // global css
-import '@/assets/styles/ruoyi.scss' // ruoyi css
-import App from './App'
-import store from './store'
-import router from './router'
-import directive from './directive' // directive
-import plugins from './plugins' // plugins
-import { download } from '@/utils/request'
-
-import './assets/icons' // icon
-import './permission' // permission control
-import { getDicts } from "@/api/system/dict/data";
-import { getConfigKey } from "@/api/system/config";
-import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
-// 分页组件
-import Pagination from "@/components/Pagination";
-// 自定义表格工具组件
-import RightToolbar from "@/components/RightToolbar"
-// 富文本组件
-import Editor from "@/components/Editor"
-// 文件上传组件
-import FileUpload from "@/components/FileUpload"
-// 图片上传组件
-import ImageUpload from "@/components/ImageUpload"
-// 图片预览组件
-import ImagePreview from "@/components/ImagePreview"
-// 字典标签组件
-import DictTag from '@/components/DictTag'
-// 头部标签组件
-import VueMeta from 'vue-meta'
-// 字典数据组件
-import DictData from '@/components/DictData'
-
-// 全局方法挂载
-Vue.prototype.getDicts = getDicts
-Vue.prototype.getConfigKey = getConfigKey
-Vue.prototype.parseTime = parseTime
-Vue.prototype.resetForm = resetForm
-Vue.prototype.addDateRange = addDateRange
-Vue.prototype.selectDictLabel = selectDictLabel
-Vue.prototype.selectDictLabels = selectDictLabels
-Vue.prototype.download = download
-Vue.prototype.handleTree = handleTree
-
-// 全局组件挂载
-Vue.component('DictTag', DictTag)
-Vue.component('Pagination', Pagination)
-Vue.component('RightToolbar', RightToolbar)
-Vue.component('Editor', Editor)
-Vue.component('FileUpload', FileUpload)
-Vue.component('ImageUpload', ImageUpload)
-Vue.component('ImagePreview', ImagePreview)
-
-Vue.use(directive)
-Vue.use(plugins)
-Vue.use(VueMeta)
-DictData.install()
-
-/**
- * If you don't want to use mock-server
- * you want to use MockJs for mock api
- * you can execute: mockXHR()
- *
- * Currently MockJs will be used in the production environment,
- * please remove it before going online! ! !
- */
-
-Vue.use(Element, {
- size: Cookies.get('size') || 'medium' // set element-ui default size
-})
-
-Vue.config.productionTip = false
-
-new Vue({
- el: '#app',
- router,
- store,
- render: h => h(App)
-})
+import Vue from 'vue'
+
+import Cookies from 'js-cookie'
+
+import Element from 'element-ui'
+import './assets/styles/element-variables.scss'
+
+import '@/assets/styles/index.scss' // global css
+import '@/assets/styles/ruoyi.scss' // ruoyi css
+import App from './App'
+import store from './store'
+import router from './router'
+import directive from './directive' // directive
+import plugins from './plugins' // plugins
+import { download } from '@/utils/request'
+
+import './assets/icons' // icon
+import './permission' // permission control
+import { getDicts } from "@/api/system/dict/data";
+import { getConfigKey } from "@/api/system/config";
+import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
+// 分页组件
+import Pagination from "@/components/Pagination";
+// 自定义表格工具组件
+import RightToolbar from "@/components/RightToolbar"
+// 富文本组件
+import Editor from "@/components/Editor"
+// 文件上传组件
+import FileUpload from "@/components/FileUpload"
+// 图片上传组件
+import ImageUpload from "@/components/ImageUpload"
+// 图片预览组件
+import ImagePreview from "@/components/ImagePreview"
+// 字典标签组件
+import DictTag from '@/components/DictTag'
+// 头部标签组件
+import VueMeta from 'vue-meta'
+// 字典数据组件
+import DictData from '@/components/DictData'
+import VueAMap from 'vue-amap';
+
+// 全局方法挂载
+Vue.prototype.getDicts = getDicts
+Vue.prototype.getConfigKey = getConfigKey
+Vue.prototype.parseTime = parseTime
+Vue.prototype.resetForm = resetForm
+Vue.prototype.addDateRange = addDateRange
+Vue.prototype.selectDictLabel = selectDictLabel
+Vue.prototype.selectDictLabels = selectDictLabels
+Vue.prototype.download = download
+Vue.prototype.handleTree = handleTree
+
+// 全局组件挂载
+Vue.component('DictTag', DictTag)
+Vue.component('Pagination', Pagination)
+Vue.component('RightToolbar', RightToolbar)
+Vue.component('Editor', Editor)
+Vue.component('FileUpload', FileUpload)
+Vue.component('ImageUpload', ImageUpload)
+Vue.component('ImagePreview', ImagePreview)
+Vue.use(VueAMap)
+// 初始化地图
+
+VueAMap.initAMapApiLoader({
+ key: '0ecbb910088383bb6661f414b08b7156',
+//这些是引入的插件
+ plugin: ['AMap.Autocomplete',
+ 'AMap.PlaceSearch',
+ 'AMap.Scale',
+ 'AMap.ToolBar',
+ 'AMap.MapType',
+ 'AMap.Geolocation',
+ 'AMap.Geocoder',
+ 'AMap.AutoComplete ',
+ 'AMap.PlaceSearch',
+ 'AMap.Scale',
+ 'AMap.OverView',
+ 'AMap.PolyEditor',
+ 'AMap.CircleEditor',
+ ],
+//版本
+ v: '1.4.4'
+});
+Vue.use(directive)
+Vue.use(plugins)
+Vue.use(VueMeta)
+DictData.install()
+
+/**
+ * If you don't want to use mock-server
+ * you want to use MockJs for mock api
+ * you can execute: mockXHR()
+ *
+ * Currently MockJs will be used in the production environment,
+ * please remove it before going online! ! !
+ */
+
+Vue.use(Element, {
+ size: Cookies.get('size') || 'medium' // set element-ui default size
+})
+
+Vue.config.productionTip = false
+
+new Vue({
+ el: '#app',
+ router,
+ store,
+ render: h => h(App)
+})
diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js
index 4030aad7..e69205bc 100644
--- a/ruoyi-ui/src/utils/request.js
+++ b/ruoyi-ui/src/utils/request.js
@@ -1,158 +1,158 @@
-import axios from 'axios'
-import { Notification, MessageBox, Message, Loading } from 'element-ui'
-import store from '@/store'
-import { getToken } from '@/utils/auth'
-import errorCode from '@/utils/errorCode'
-import { tansParams, blobValidate } from "@/utils/ruoyi";
-import cache from '@/plugins/cache'
-import { saveAs } from 'file-saver'
-
-let downloadLoadingInstance;
-// 是否显示重新登录
-export let isRelogin = { show: false };
-
-axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
-// 创建axios实例
-const service = axios.create({
- // axios中请求配置有baseURL选项,表示请求URL公共部分
- baseURL: process.env.VUE_APP_BASE_API,
- // 超时
- timeout: 10000
-})
-
-// request拦截器
-service.interceptors.request.use(config => {
- // 是否需要设置 token
- const isToken = (config.headers || {}).isToken === false
- // 是否需要防止数据重复提交
- const isRepeatSubmit = (config.headers || {}).repeatSubmit === false
- if (getToken() && !isToken) {
- config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
- }
- // get请求映射params参数
- if (config.method === 'get' && config.params) {
- let url = config.url + '?' + tansParams(config.params);
- url = url.slice(0, -1);
- config.params = {};
- config.url = url;
- }
- if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) {
- const requestObj = {
- url: config.url,
- data: typeof config.data === 'object' ? JSON.stringify(config.data) : config.data,
- time: new Date().getTime()
- }
- const sessionObj = cache.session.getJSON('sessionObj')
- if (sessionObj === undefined || sessionObj === null || sessionObj === '') {
- cache.session.setJSON('sessionObj', requestObj)
- } else {
- const s_url = sessionObj.url; // 请求地址
- const s_data = sessionObj.data; // 请求数据
- const s_time = sessionObj.time; // 请求时间
- const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交
- if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
- const message = '数据正在处理,请勿重复提交';
- console.warn(`[${s_url}]: ` + message)
- return Promise.reject(new Error(message))
- } else {
- cache.session.setJSON('sessionObj', requestObj)
- }
- }
- }
- return config
-}, error => {
- console.log(error)
- Promise.reject(error)
-})
-
-// 响应拦截器
-service.interceptors.response.use(res => {
- // 未设置状态码则默认成功状态
- const code = res.data.code || 200;
- // 获取错误信息
- const msg = errorCode[code] || res.data.msg || errorCode['default']
- // 二进制数据则直接返回
- if(res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer'){
- return res.data
- }
- if (code === 401) {
- if (!isRelogin.show) {
- isRelogin.show = true;
- MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
- confirmButtonText: '重新登录',
- cancelButtonText: '取消',
- type: 'warning'
- }
- ).then(() => {
- isRelogin.show = false;
- store.dispatch('LogOut').then(() => {
- location.href = '/index';
- })
- }).catch(() => {
- isRelogin.show = false;
- });
- }
- return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
- } else if (code === 500) {
- Message({
- message: msg,
- type: 'error'
- })
- return Promise.reject(new Error(msg))
- } else if (code !== 200) {
- Notification.error({
- title: msg
- })
- return Promise.reject('error')
- } else {
- return res.data
- }
- },
- error => {
- console.log('err' + error)
- let { message } = error;
- if (message == "Network Error") {
- message = "后端接口连接异常";
- }
- else if (message.includes("timeout")) {
- message = "系统接口请求超时";
- }
- else if (message.includes("Request failed with status code")) {
- message = "系统接口" + message.substr(message.length - 3) + "异常";
- }
- Message({
- message: message,
- type: 'error',
- duration: 5 * 1000
- })
- return Promise.reject(error)
- }
-)
-
-// 通用下载方法
-export function download(url, params, filename) {
- downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
- return service.post(url, params, {
- transformRequest: [(params) => { return tansParams(params) }],
- headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
- responseType: 'blob'
- }).then(async (data) => {
- const isLogin = await blobValidate(data);
- if (isLogin) {
- const blob = new Blob([data])
- saveAs(blob, filename)
- } else {
- const resText = await data.text();
- const rspObj = JSON.parse(resText);
- const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']
- Message.error(errMsg);
- }
- downloadLoadingInstance.close();
- }).catch((r) => {
- console.error(r)
- Message.error('下载文件出现错误,请联系管理员!')
- downloadLoadingInstance.close();
- })
-}
-
-export default service
+import axios from 'axios'
+import { Notification, MessageBox, Message, Loading } from 'element-ui'
+import store from '@/store'
+import { getToken } from '@/utils/auth'
+import errorCode from '@/utils/errorCode'
+import { tansParams, blobValidate } from "@/utils/ruoyi";
+import cache from '@/plugins/cache'
+import { saveAs } from 'file-saver'
+
+let downloadLoadingInstance;
+// 是否显示重新登录
+export let isRelogin = { show: false };
+
+axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
+// 创建axios实例
+const service = axios.create({
+ // axios中请求配置有baseURL选项,表示请求URL公共部分
+ baseURL: process.env.VUE_APP_BASE_API,
+ // 超时
+ timeout: 10000
+})
+
+// request拦截器
+service.interceptors.request.use(config => {
+ // 是否需要设置 token
+ const isToken = (config.headers || {}).isToken === false
+ // 是否需要防止数据重复提交
+ const isRepeatSubmit = (config.headers || {}).repeatSubmit === false
+ if (getToken() && !isToken) {
+ config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
+ }
+ // get请求映射params参数
+ if (config.method === 'get' && config.params) {
+ let url = config.url + '?' + tansParams(config.params);
+ url = url.slice(0, -1);
+ config.params = {};
+ config.url = url;
+ }
+ if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) {
+ const requestObj = {
+ url: config.url,
+ data: typeof config.data === 'object' ? JSON.stringify(config.data) : config.data,
+ time: new Date().getTime()
+ }
+ const sessionObj = cache.session.getJSON('sessionObj')
+ if (sessionObj === undefined || sessionObj === null || sessionObj === '') {
+ cache.session.setJSON('sessionObj', requestObj)
+ } else {
+ const s_url = sessionObj.url; // 请求地址
+ const s_data = sessionObj.data; // 请求数据
+ const s_time = sessionObj.time; // 请求时间
+ const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交
+ if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
+ const message = '数据正在处理,请勿重复提交';
+ console.warn(`[${s_url}]: ` + message)
+ return Promise.reject(new Error(message))
+ } else {
+ cache.session.setJSON('sessionObj', requestObj)
+ }
+ }
+ }
+ return config
+}, error => {
+ console.log(error)
+ Promise.reject(error)
+})
+
+// 响应拦截器
+service.interceptors.response.use(res => {
+ // 未设置状态码则默认成功状态
+ const code = res.data.code || 200;
+ // 获取错误信息
+ const msg = errorCode[code] || res.data.msg || errorCode['default']
+ // 二进制数据则直接返回
+ if(res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer'){
+ return res.data
+ }
+ if (code === 401) {
+ if (!isRelogin.show) {
+ isRelogin.show = true;
+ MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
+ confirmButtonText: '重新登录',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }
+ ).then(() => {
+ isRelogin.show = false;
+ store.dispatch('LogOut').then(() => {
+ location.href = '/index';
+ })
+ }).catch(() => {
+ isRelogin.show = false;
+ });
+ }
+ return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
+ } else if (code === 500) {
+ Message({
+ message: msg,
+ type: 'error'
+ })
+ return Promise.reject(new Error(msg))
+ } else if (code !== 200) {
+ Notification.error({
+ title: msg
+ })
+ return Promise.reject('error')
+ } else {
+ return res.data
+ }
+ },
+ error => {
+ console.log('err' + error)
+ let { message } = error;
+ if (message == "Network Error") {
+ message = "后端接口连接异常";
+ }
+ else if (message.includes("timeout")) {
+ message = "系统接口请求超时";
+ }
+ else if (message.includes("Request failed with status code")) {
+ message = "系统接口" + message.substr(message.length - 3) + "异常";
+ }
+ Message({
+ message: message,
+ type: 'error',
+ duration: 5 * 1000
+ })
+ return Promise.reject(error)
+ }
+)
+
+// 通用下载方法
+export function download(url, params, filename) {
+ downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
+ return service.post(url, params, {
+ transformRequest: [(params) => { return tansParams(params) }],
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
+ responseType: 'blob'
+ }).then(async (data) => {
+ const isLogin = await blobValidate(data);
+ if (isLogin) {
+ const blob = new Blob([data])
+ saveAs(blob, filename)
+ } else {
+ const resText = await data.text();
+ const rspObj = JSON.parse(resText);
+ const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']
+ Message.error(errMsg);
+ }
+ downloadLoadingInstance.close();
+ }).catch((r) => {
+ console.error(r)
+ Message.error('下载文件出现错误,请联系管理员!')
+ downloadLoadingInstance.close();
+ })
+}
+
+export default service
diff --git a/ruoyi-ui/src/views/system/WxBuilding/index.vue b/ruoyi-ui/src/views/system/WxBuilding/index.vue
index 03d9b7b8..ceb3291f 100644
--- a/ruoyi-ui/src/views/system/WxBuilding/index.vue
+++ b/ruoyi-ui/src/views/system/WxBuilding/index.vue
@@ -1,14 +1,6 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
搜索
重置
@@ -97,14 +110,14 @@
-
+
-
+
@@ -115,13 +128,33 @@
-->
-
-
+
+
+
+
+
+
+
+ 待审核
+ 审核通过
+ 审核拒绝
+
+
-
+
+
+
+
+
-
+
-
-
+
+
@@ -190,29 +223,82 @@
+
+
+
+
+
+
+
+
-
-
+
+
+ 选取文件
+ 上传到服务器
+ 只能上传jpg/png文件,且不超过2M
+
+
+
+
+
-
-
+
+
+
+
+
-
+
-
-
+
+
+
+
+
@@ -223,16 +309,110 @@
取 消
+
+
+
+
+
diff --git a/ruoyi-ui/src/views/system/competition/index.vue b/ruoyi-ui/src/views/system/competition/index.vue
index 2565437b..07674df5 100644
--- a/ruoyi-ui/src/views/system/competition/index.vue
+++ b/ruoyi-ui/src/views/system/competition/index.vue
@@ -530,6 +530,7 @@ export default {
const id = row.id || this.ids
getCompetition(id).then(response => {
this.form = response.data;
+ this.imageUrl = this.form.competitionBackImg;
this.open = true;
this.title = "修改赛会信息";
});