diff --git a/package.json b/package.json index 593b821..2663894 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ruoyi", - "version": "1.0.202407240905", + "version": "1.0.202407251452", "description": "金鸡湖现代服务业品牌管理系统", "author": "若依", "license": "MIT", @@ -53,6 +53,7 @@ "js-cookie": "3.0.1", "jsencrypt": "3.0.0-rc.1", "jspdf": "^2.5.1", + "lodash": "^4.17.21", "nprogress": "0.2.0", "quill": "1.3.7", "screenfull": "5.0.2", diff --git a/src/App.vue b/src/App.vue index b1a9742..bd2dd56 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,28 +1,30 @@ + + \ No newline at end of file diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index 97eccb6..53624a5 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -56,8 +56,10 @@ export default { overflow: hidden; } .app-main-breadcrumb { - height: calc(100% - 1px); - padding: 0 0 10px 0; + // height: calc(100% - 1px); + height: calc(100% - 65px); + // padding: 0 0 10px 0; + padding: 0; } .fixed-header + .app-main { diff --git a/src/permission.js b/src/permission.js index 7b785fd..00b7ae9 100644 --- a/src/permission.js +++ b/src/permission.js @@ -8,12 +8,13 @@ import { isRelogin } from "@/utils/request"; NProgress.configure({ showSpinner: false }); -const whiteList = ["/login", "/register"]; +const whiteList = ["/login", "/entLogin", "/register"]; router.beforeEach((to, from, next) => { + console.log(window.location.href); NProgress.start(); - if (window.location.href.includes("clienttoken=")) { - var reg = new RegExp(/[?&]clienttoken=([^&#]+)/); + if (window.location.href.includes("accesstoken=")) { + var reg = new RegExp(/[?&]accesstoken=([^&#]+)/); var c = window.location.href.match(reg); const clienttoken = c && c[1]; // console.log("clienttoken:", clienttoken); @@ -22,7 +23,7 @@ router.beforeEach((to, from, next) => { store.dispatch("SingleSignOnGetInfo",{clientToken:clienttoken}).then(res => { isRelogin.show = false; let url = window.location.href; - var modifiedUrl = url.replace(/(\?appid&clienttoken=)[^&#]+/, ''); + var modifiedUrl = url.replace(/(\&accesstoken=)[^&#]+/, ''); // console.log(modifiedUrl,'modifiedUrl'); window.location.href = modifiedUrl; // store.dispatch("GenerateRoutes").then((accessRoutes) => { @@ -124,18 +125,16 @@ router.beforeEach((to, from, next) => { // }); }); } - } - // else if(window.location.href.includes("clienttoken=")){ - - // } - else if (getToken()) { + } else if (getToken()) { to.meta.title && store.dispatch("settings/setTitle", to.meta.title); /* has token*/ - if (to.path === "/login") { + if (to.path === "/entLogin") { next({ path: "/" }); NProgress.done(); } else if (whiteList.indexOf(to.path) !== -1) { - next(); + next({ path: "/" }); + NProgress.done(); + // next(); } else { if (store.getters.roles.length === 0) { isRelogin.show = true; @@ -166,7 +165,7 @@ router.beforeEach((to, from, next) => { // 在免登录白名单,直接进入 next(); } else { - next(`/login?redirect=${encodeURIComponent(to.fullPath)}`); // 否则全部重定向到登录页 + next(`/entLogin?redirect=${encodeURIComponent(to.fullPath)}`); // 否则全部重定向到登录页 NProgress.done(); } // store.dispatch("LogOut").then(() => { diff --git a/src/router/index.js b/src/router/index.js index e496a0a..a8bb327 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -46,6 +46,11 @@ export const constantRoutes = [ component: () => import("@/views/login"), hidden: true, }, + { + path: "/entLogin", + component: () => import("@/views/entLogin"), + hidden: true, + }, { path: "/register", component: () => import("@/views/register"), diff --git a/src/utils/echart.js b/src/utils/echart.js new file mode 100644 index 0000000..32208f7 --- /dev/null +++ b/src/utils/echart.js @@ -0,0 +1,44 @@ +//echarts专用求最大公约数 不含小数 +export function chartlcm (a, b) { + var result = 1; + for (var i = 1; i <= a && i <= b; i++) { + + if (a % i == 0 && b % i == 0) { + result = i; + } + if (result > 1 && i >= 10)//公约数大于10的时候 直接跳出 避免y轴刻度太多 (如果不介意刻度太多可以把这一段去掉) + break; + } + return result; +} + + +//获取echarts 多Y轴的最大值和间隔值 lcmval 最大公约数 divisor 间隔数量 +export function YmaxvalAndinterval (m, n, lcmval, divisor) { + + var interval1 = Math.ceil(m / lcmval); + var interval2 = Math.ceil(n / lcmval); + + if (lcmval != 1 && lcmval != 0 && lcmval <= 10) + { + return { max1: m, max2: n, interval1: interval1, interval2: interval2 } + } + + if (divisor == undefined || divisor == null) + divisor = 5; + + //var mval = m % divisor; + //if (mval > 0) { + // m = ((m - mval) / divisor + 1) * divisor + //} + m = Math.ceil(m / divisor) * divisor + + n = Math.ceil(n / divisor) * divisor + + interval1 = Math.ceil(m / divisor ); + + interval2 = Math.ceil(n / divisor); + + return { max1: m, max2: n, interval1: interval1, interval2: interval2 } + +} \ No newline at end of file diff --git a/src/views/dataCloudMap/components/collectDialog.vue b/src/views/dataCloudMap/components/collectDialog.vue index aef5ac6..56fc395 100644 --- a/src/views/dataCloudMap/components/collectDialog.vue +++ b/src/views/dataCloudMap/components/collectDialog.vue @@ -22,7 +22,7 @@ height="550px" > - + diff --git a/src/views/dataCloudMap/components/echartData.vue b/src/views/dataCloudMap/components/echartData.vue new file mode 100644 index 0000000..fb48ff7 --- /dev/null +++ b/src/views/dataCloudMap/components/echartData.vue @@ -0,0 +1,262 @@ + + + diff --git a/src/views/dataCloudMap/index.vue b/src/views/dataCloudMap/index.vue index e0fe2ce..188cc52 100644 --- a/src/views/dataCloudMap/index.vue +++ b/src/views/dataCloudMap/index.vue @@ -18,48 +18,16 @@ class="tabStyle" v-for="(item, index) in options1" :key="index" - @click="active(index)" - :class="activeIndex == index ? 'change-blue' : ''" + @click="active(index + 1)" + :class="activeIndex == index + 1 ? 'change-blue' : ''" > -
- {{ item.name }} +
+ {{ item.name }} -
-
-
-
-
- 1758.13 - 亿元 -
-
【2023】服务业增加值
-
-
-
-
-
-
- 1.3 - % -
-
【2023】服务业增速
-
-
-
-
-
-
- 49.9 - % -
-
【2023】服务业增加值占GDP比重
-
-
-
-
+ @@ -76,33 +44,37 @@
- - + + + - + - + - + @@ -112,6 +84,8 @@
+
@@ -119,7 +93,7 @@
【统计数据截至:2024-01】
-
+
@@ -342,42 +316,42 @@
查看更多数据>>
-
+
领军企业
{{ honorData.count1 }}
-
+
两业融合试点
{{ honorData.count2 }}
-
+
工业设计
{{ honorData.count3 }}
-
+
服务型制造示范
{{ honorData.count4 }}
-
+
现代服务业集聚区
{{ honorData.count5 }}
-
+
楼宇经济
{{ honorData.count6 }} @@ -388,8 +362,8 @@
-
-
+
+
@@ -400,7 +374,7 @@
查看更多数据>>
- + diff --git a/src/views/entLogin.vue b/src/views/entLogin.vue new file mode 100644 index 0000000..0dd908b --- /dev/null +++ b/src/views/entLogin.vue @@ -0,0 +1,317 @@ + + + + + diff --git a/src/views/index.vue b/src/views/index.vue index 3efe4a8..36ec5cd 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -16,4 +16,4 @@ export default { }; - + \ No newline at end of file diff --git a/src/views/login.vue b/src/views/login.vue index 7745c15..2b43296 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -111,7 +111,7 @@
--> - +
diff --git a/src/views/onlineDeclaration/components/Parser.vue b/src/views/onlineDeclaration/components/Parser.vue deleted file mode 100644 index f8f4cb1..0000000 --- a/src/views/onlineDeclaration/components/Parser.vue +++ /dev/null @@ -1,186 +0,0 @@ - diff --git a/src/views/onlineDeclaration/components/render/package.json b/src/views/onlineDeclaration/components/render/package.json deleted file mode 100644 index 96bffcf..0000000 --- a/src/views/onlineDeclaration/components/render/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "form-gen-render", - "version": "1.0.4", - "description": "表单核心render", - "main": "lib/form-gen-render.umd.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/JakHuang/form-generator.git" - }, - "author": "jakhuang", - "license": "MIT", - "bugs": { - "url": "https://github.com/JakHuang/form-generator/issues" - }, - "homepage": "https://github.com/JakHuang/form-generator#readme" -} diff --git a/src/views/onlineDeclaration/components/render/render.js b/src/views/onlineDeclaration/components/render/render.js deleted file mode 100644 index f3325dc..0000000 --- a/src/views/onlineDeclaration/components/render/render.js +++ /dev/null @@ -1,122 +0,0 @@ -import { deepClone } from '@/utils/index' - -const componentChild = {} -/** - * 将./slots中的文件挂载到对象componentChild上 - * 文件名为key,对应JSON配置中的__config__.tag - * 文件内容为value,解析JSON配置中的__slot__ - */ -const slotsFiles = require.context('./slots', false, /\.js$/) -const keys = slotsFiles.keys() || [] -keys.forEach(key => { - const tag = key.replace(/^\.\/(.*)\.\w+$/, '$1') - const value = slotsFiles(key).default - componentChild[tag] = value -}) - -function vModel(dataObject, defaultValue) { - dataObject.props.value = defaultValue - - dataObject.on.input = val => { - this.$emit('input', val) - } -} - -function mountSlotFiles(h, confClone, children) { - const childObjs = componentChild[confClone.__config__.tag] - if (childObjs) { - Object.keys(childObjs).forEach(key => { - const childFunc = childObjs[key] - if (confClone.__slot__ && confClone.__slot__[key]) { - children.push(childFunc(h, confClone, key)) - } - }) - } -} - -function emitEvents(confClone) { - ['on', 'nativeOn'].forEach(attr => { - const eventKeyList = Object.keys(confClone[attr] || {}) - eventKeyList.forEach(key => { - const val = confClone[attr][key] - if (typeof val === 'string') { - confClone[attr][key] = event => this.$emit(val, event) - } - }) - }) -} - -function buildDataObject(confClone, dataObject) { - Object.keys(confClone).forEach(key => { - const val = confClone[key] - if (key === '__vModel__') { - vModel.call(this, dataObject, confClone.__config__.defaultValue) - } else if (dataObject[key] !== undefined) { - if (dataObject[key] === null - || dataObject[key] instanceof RegExp - || ['boolean', 'string', 'number', 'function'].includes(typeof dataObject[key])) { - dataObject[key] = val - } else if (Array.isArray(dataObject[key])) { - dataObject[key] = [...dataObject[key], ...val] - } else { - dataObject[key] = { ...dataObject[key], ...val } - } - } else { - dataObject.attrs[key] = val - } - }) - - // 清理属性 - clearAttrs(dataObject) -} - -function clearAttrs(dataObject) { - delete dataObject.attrs.__config__ - delete dataObject.attrs.__slot__ - delete dataObject.attrs.__methods__ -} - -function makeDataObject() { - // 深入数据对象: - // https://cn.vuejs.org/v2/guide/render-function.html#%E6%B7%B1%E5%85%A5%E6%95%B0%E6%8D%AE%E5%AF%B9%E8%B1%A1 - return { - class: {}, - attrs: {}, - props: {}, - domProps: {}, - nativeOn: {}, - on: {}, - style: {}, - directives: [], - scopedSlots: {}, - slot: null, - key: null, - ref: null, - refInFor: true - } -} - -export default { - props: { - conf: { - type: Object, - required: true - } - }, - render(h) { - const dataObject = makeDataObject() - const confClone = deepClone(this.conf) - const children = this.$slots.default || [] - - // 如果slots文件夹存在与当前tag同名的文件,则执行文件中的代码 - mountSlotFiles.call(this, h, confClone, children) - - // 将字符串类型的事件,发送为消息 - emitEvents.call(this, confClone) - - // 将json表单配置转化为vue render可以识别的 “数据对象(dataObject)” - buildDataObject.call(this, confClone, dataObject) - - return h(this.conf.__config__.tag, dataObject, children) - } -} diff --git a/src/views/onlineDeclaration/components/render/slots/el-button.js b/src/views/onlineDeclaration/components/render/slots/el-button.js deleted file mode 100644 index a2d9684..0000000 --- a/src/views/onlineDeclaration/components/render/slots/el-button.js +++ /dev/null @@ -1,5 +0,0 @@ -export default { - default(h, conf, key) { - return conf.__slot__[key] - } -} diff --git a/src/views/onlineDeclaration/components/render/slots/el-checkbox-group.js b/src/views/onlineDeclaration/components/render/slots/el-checkbox-group.js deleted file mode 100644 index 0a85c8e..0000000 --- a/src/views/onlineDeclaration/components/render/slots/el-checkbox-group.js +++ /dev/null @@ -1,13 +0,0 @@ -export default { - options(h, conf, key) { - const list = [] - conf.__slot__.options.forEach(item => { - if (conf.__config__.optionType === 'button') { - list.push({item.label}) - } else { - list.push({item.label}) - } - }) - return list - } -} diff --git a/src/views/onlineDeclaration/components/render/slots/el-input.js b/src/views/onlineDeclaration/components/render/slots/el-input.js deleted file mode 100644 index 8bd02db..0000000 --- a/src/views/onlineDeclaration/components/render/slots/el-input.js +++ /dev/null @@ -1,8 +0,0 @@ -export default { - prepend(h, conf, key) { - return - }, - append(h, conf, key) { - return - } -} diff --git a/src/views/onlineDeclaration/components/render/slots/el-radio-group.js b/src/views/onlineDeclaration/components/render/slots/el-radio-group.js deleted file mode 100644 index c78506f..0000000 --- a/src/views/onlineDeclaration/components/render/slots/el-radio-group.js +++ /dev/null @@ -1,13 +0,0 @@ -export default { - options(h, conf, key) { - const list = [] - conf.__slot__.options.forEach(item => { - if (conf.__config__.optionType === 'button') { - list.push({item.label}) - } else { - list.push({item.label}) - } - }) - return list - } -} diff --git a/src/views/onlineDeclaration/components/render/slots/el-select.js b/src/views/onlineDeclaration/components/render/slots/el-select.js deleted file mode 100644 index cbf4a20..0000000 --- a/src/views/onlineDeclaration/components/render/slots/el-select.js +++ /dev/null @@ -1,9 +0,0 @@ -export default { - options(h, conf, key) { - const list = [] - conf.__slot__.options.forEach(item => { - list.push() - }) - return list - } -} diff --git a/src/views/onlineDeclaration/components/render/slots/el-upload.js b/src/views/onlineDeclaration/components/render/slots/el-upload.js deleted file mode 100644 index 8ce3c35..0000000 --- a/src/views/onlineDeclaration/components/render/slots/el-upload.js +++ /dev/null @@ -1,17 +0,0 @@ -export default { - 'list-type': (h, conf, key) => { - const list = [] - const config = conf.__config__ - if (conf['list-type'] === 'picture-card') { - list.push() - } else { - list.push({config.buttonText}) - } - if (config.showTip) { - list.push( -
只能上传不超过 {config.fileSize}{config.sizeUnit} 的{conf.accept}文件
- ) - } - return list - } -} diff --git a/src/views/onlineDeclaration/declarationManagement/index.vue b/src/views/onlineDeclaration/declarationManagement/index.vue index 19f9a72..365b437 100644 --- a/src/views/onlineDeclaration/declarationManagement/index.vue +++ b/src/views/onlineDeclaration/declarationManagement/index.vue @@ -65,7 +65,7 @@ > @@ -114,8 +114,8 @@ id="L-pagination" v-show="total>0" :total="total" - :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" + :page.sync="queryParams.current" + :limit.sync="queryParams.size" @pagination="getList" /> @@ -188,8 +188,8 @@ export default { queryParams: { menuName: undefined, visible: undefined, - ageNum: 1, - pageSize: 20, + current: 1, + size: 10, }, enterpriseId: '', templateDataList: [], @@ -234,8 +234,8 @@ export default { getList() { this.loading = true; listInfo(this.queryParams).then(response => { - this.InfoList = response.rows; - this.total = response.total + this.InfoList = response.data.records; + this.total = response.data.total this.loading = false; }); }, diff --git a/src/views/onlineDeclaration/template/index.vue b/src/views/onlineDeclaration/template/index.vue index 0dac5f9..59d54be 100644 --- a/src/views/onlineDeclaration/template/index.vue +++ b/src/views/onlineDeclaration/template/index.vue @@ -35,7 +35,7 @@ - 创建新模板 + 创建新模板 @@ -100,7 +100,7 @@ {{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }} - + @@ -123,15 +136,24 @@ :limit.sync="queryParams.size" @pagination="getList" /> + + +