GitBucket
4.6.0
Toggle navigation
Sign in
Files
Branches
1
Tags
Issues
Pull Requests
Labels
Milestones
Wiki
08335
/
hivui-platform-template
hivui平台项目模板
Browse code
Jenkins commit
master
1 parent
0195c09
commit
de90a65e444047266e13ce436c692e2a3664855e
12896
authored
on 21 Mar 2023
Showing
3 changed files
package.json
project/hivuiBirt/index.js
project/hivuiBirt/lang/index.js
Ignore Space
Show notes
View
package.json
{ "name": "hi-vui-template", "version": "1.1.33", "description": "A hi-vui-template project", "author": "zhcTeam", "scripts": { "rm:vite": "rimraf node_modules/.vite && rimraf node_modules/.cache", "pm2:start": "pm2 -s start processes.json", "dev": "vite --host", "def": "vite --host", "build": "node build/copyBaseAssets.js && cross-env NODE_ENV=production node build/webpack.prod.conf.js", "build:modules": "cross-env NODE_ENV=production node build/webpack.prod.conf.js", "build1": "webpack --mode production --config build/webpack.prod.conf.js", "dll": "webpack --config build/webpack.dll.conf.js", "start": "webpack-dev-server --config build/webpack.dev.conf.js", "copyassets": "node build/copyBaseAssets.js" }, "devDependencies": { "@babel/core": "^7.1.2", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7", "@babel/plugin-proposal-optional-chaining": "^7.16.7", "@babel/plugin-syntax-dynamic-import": "^7.0.0", "@babel/preset-env": "^7.1.0", "@vitejs/plugin-vue-jsx": "^1.3.3", "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", "@vue/babel-preset-jsx": "^1.2.4", "add-asset-html-webpack-plugin": "^3.2.0", "autoprefixer": "^9.1.5", "babel-loader": "^8.0.4", "babel-plugin-component": "^1.1.1", "babel-plugin-transform-vite-meta-env": "^1.0.3", "caniuse-lite": "^1.0.30001436", "chalk": "^3.0.0", "clean-webpack-plugin": "^0.1.19", "copy-webpack-plugin": "^4.5.3", "cross-env": "^7.0.3", "css-loader": "^1.0.0", "dotenv": "^10.0.0", "file-loader": "^2.0.0", "happypack": "^5.0.1", "html-webpack-plugin": "^4.5.2", "less": "^3.13.1", "less-loader": "^5.0.0", "mini-css-extract-plugin": "^1.6.2", "node-sass": "^4.9.3", "optimize-css-assets-webpack-plugin": "^5.0.1", "parallel-webpack": "^2.6.0", "postcss-import": "^11.1.0", "postcss-loader": "^2.1.6", "postcss-url": "^7.3.2", "progress-bar-webpack-plugin": "^2.1.0", "sass": "^1.49.0", "sass-loader": "^7.1.0", "style-loader": "^0.23.0", "terser-webpack-plugin": "^4.2.3", "thread-loader": "^3.0.4", "uglifyjs-webpack-plugin": "^2.0.1", "url-loader": "^1.1.1", "vite": "^2.9.15", "vite-plugin-html": "^2.1.1", "vite-plugin-imp": "^2.0.11", "vite-plugin-pagedata": "^1.0.4", "vite-plugin-vue2": "^1.9.0", "vue-loader": "^15.4.2", "vue-template-compiler": "2.6.14", "webpack": "^4.46.0", "webpack-cli": "^4.9.2", "webpack-dev-server": "^3.11.3", "webpack-merge": "^4.1.4" }, "dependencies": { "axios": "^0.24.0", "babel-polyfill": "^6.26.0", "canvas": "^2.9.0", "classnames": "^2.3.1", "deep-lu-trans": "^1.0.5", "echarts": "^5.2.2", "echarts-liquidfill": "^3.1.0", "element-ui": "^2.15.7", "enquire.js": "^2.1.6", "font-awesome": "^4.7.0", "hi-taskcenter": "^1.0.9", "hi-ui": "^1.1.1006", "html2canvas": "^1.4.1", "jquery": "^3.6.0", "js-cookie": "^3.0.1", "js-md5": "^0.7.3", "js-pinyin": "^0.1.9", "jspdf": "^2.5.1", "lodash": "^4.17.11", "qrcodejs2": "0.0.2", "screenfull": "^6.0.0", "sortablejs": "^1.14.0", "v-clipboard": "^2.2.3", "vue": "2.6.14", "vue-draggable-resizable": "^2.3.0", "vue-gemini-scrollbar": "^2.0.1", "vue-i18n": "^8.27.0", "vue-jstree": "^2.1.6", "vue-qr": "^3.2.4", "vue-router": "3.3.4", "vuex": "3.6.2", "xlsx": "^0.18.5", "zhc-birt-cmps": "^2.9.23", "zhc-birt-core": "^1.9.0", "zhc-flowchart": "^1.0.20", "zhc-visualstudio": "^1.0.4" } }
{ "name": "hi-vui-template", "version": "1.1.32", "description": "A hi-vui-template project", "author": "zhcTeam", "scripts": { "rm:vite": "rimraf node_modules/.vite && rimraf node_modules/.cache", "pm2:start": "pm2 -s start processes.json", "dev": "vite --host", "def": "vite --host", "build": "node build/copyBaseAssets.js && cross-env NODE_ENV=production node build/webpack.prod.conf.js", "build:modules": "cross-env NODE_ENV=production node build/webpack.prod.conf.js", "build1": "webpack --mode production --config build/webpack.prod.conf.js", "dll": "webpack --config build/webpack.dll.conf.js", "start": "webpack-dev-server --config build/webpack.dev.conf.js", "copyassets": "node build/copyBaseAssets.js" }, "devDependencies": { "@babel/core": "^7.1.2", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7", "@babel/plugin-proposal-optional-chaining": "^7.16.7", "@babel/plugin-syntax-dynamic-import": "^7.0.0", "@babel/preset-env": "^7.1.0", "@vitejs/plugin-vue-jsx": "^1.3.3", "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", "@vue/babel-preset-jsx": "^1.2.4", "add-asset-html-webpack-plugin": "^3.2.0", "autoprefixer": "^9.1.5", "babel-loader": "^8.0.4", "babel-plugin-component": "^1.1.1", "babel-plugin-transform-vite-meta-env": "^1.0.3", "caniuse-lite": "^1.0.30001436", "chalk": "^3.0.0", "clean-webpack-plugin": "^0.1.19", "copy-webpack-plugin": "^4.5.3", "cross-env": "^7.0.3", "css-loader": "^1.0.0", "dotenv": "^10.0.0", "file-loader": "^2.0.0", "happypack": "^5.0.1", "html-webpack-plugin": "^4.5.2", "less": "^3.13.1", "less-loader": "^5.0.0", "mini-css-extract-plugin": "^1.6.2", "node-sass": "^4.9.3", "optimize-css-assets-webpack-plugin": "^5.0.1", "parallel-webpack": "^2.6.0", "postcss-import": "^11.1.0", "postcss-loader": "^2.1.6", "postcss-url": "^7.3.2", "progress-bar-webpack-plugin": "^2.1.0", "sass": "^1.49.0", "sass-loader": "^7.1.0", "style-loader": "^0.23.0", "terser-webpack-plugin": "^4.2.3", "thread-loader": "^3.0.4", "uglifyjs-webpack-plugin": "^2.0.1", "url-loader": "^1.1.1", "vite": "^2.9.15", "vite-plugin-html": "^2.1.1", "vite-plugin-imp": "^2.0.11", "vite-plugin-pagedata": "^1.0.4", "vite-plugin-vue2": "^1.9.0", "vue-loader": "^15.4.2", "vue-template-compiler": "2.6.14", "webpack": "^4.46.0", "webpack-cli": "^4.9.2", "webpack-dev-server": "^3.11.3", "webpack-merge": "^4.1.4" }, "dependencies": { "axios": "^0.24.0", "babel-polyfill": "^6.26.0", "canvas": "^2.9.0", "classnames": "^2.3.1", "deep-lu-trans": "^1.0.5", "echarts": "^5.2.2", "echarts-liquidfill": "^3.1.0", "element-ui": "^2.15.7", "enquire.js": "^2.1.6", "font-awesome": "^4.7.0", "hi-taskcenter": "^1.0.9", "hi-ui": "^1.1.1006", "html2canvas": "^1.4.1", "jquery": "^3.6.0", "js-cookie": "^3.0.1", "js-md5": "^0.7.3", "js-pinyin": "^0.1.9", "jspdf": "^2.5.1", "lodash": "^4.17.11", "qrcodejs2": "0.0.2", "screenfull": "^6.0.0", "sortablejs": "^1.14.0", "v-clipboard": "^2.2.3", "vue": "2.6.14", "vue-draggable-resizable": "^2.3.0", "vue-gemini-scrollbar": "^2.0.1", "vue-i18n": "^8.27.0", "vue-jstree": "^2.1.6", "vue-qr": "^3.2.4", "vue-router": "3.3.4", "vuex": "3.6.2", "xlsx": "^0.18.5", "zhc-birt-cmps": "^2.9.22", "zhc-birt-core": "^1.9.0", "zhc-flowchart": "^1.0.20", "zhc-visualstudio": "^1.0.4" } }
Ignore Space
Show notes
View
project/hivuiBirt/index.js
import App from './App.vue' // import "hi-ui/lib/hi-ui.css"; //設置script引入全局的ELEMENT 配置 Vue.prototype.$ELEMENT = { size: 'mini', zIndex: 3000 }; import Message from './components/vue-m-message' Vue.use(Message) // will mount `Vue.prototype.$message` import './assets/icon/iconfont.css'; import './styles/index.css' import "hi-taskcenter/hi-taskcenter.css" import hitaskcenter from 'hi-taskcenter'; Vue.use(hitaskcenter); import 'zhc-flowchart/lib/zhc-flowchart.css' import zhcflowchart from "zhc-flowchart"; Vue.use(zhcflowchart) import UmyUi from 'umy-ui' import 'umy-ui/lib/theme-chalk/index.css'; import ZhcBirtCmps from 'zhc-birt-cmps' Vue.use(ZhcBirtCmps) Vue.use(UmyUi) // import window.HIVUI_SETTING from './window.HIVUI_SETTING' // import { $HCBIRT } from "@birt/funclib/HCBIRT" import Cookies from 'js-cookie' import { setToken, } from "./utils/auth.js"; // Vue.use(ElementUI) console.log('token', Cookies.get('EAP-Token')) setToken(Cookies.get('EAP-Token') || '') import axios from "./funclib/AxiosUtil"; import pinyin from 'js-pinyin' Vue.prototype.Pinyin = pinyin import md5 from 'js-md5' Vue.prototype.Md5 = md5 //这里不需要了全局有注入ELEMENT // import { Loading } from 'element-ui'; // Vue.prototype.Loading = Loading import * as XLSX from 'xlsx' import * as echarts from "echarts" Vue.prototype.XLSX = XLSX; Vue.prototype.$echarts = echarts; // Vue.prototype.$HCBIRT = $HCBIRT; import i18n from './lang' Vue.prototype.$HI = { projectName: window.HIVUI_SETTING.projectName, serverUrl: window.HIVUI_SETTING.serverUrl, serverName: window.HIVUI_SETTING.serverName, request: axios, queryOperate: 'like', pageSize: 20, saveUrl: window.HIVUI_SETTING.saveUrl, queryUrl: window.HIVUI_SETTING.queryUrl, querysUrl: window.HIVUI_SETTING.serverUrl + "/data/querys", policyUrl: window.HIVUI_SETTING.policyUrl, enumsUrl: window.HIVUI_SETTING.serverUrl + "/platf/xtgn/enums/fgroupid/", upload: window.HIVUI_SETTING.upload, download: window.HIVUI_SETTING.download, preview: window.HIVUI_SETTING.preview || window.HIVUI_SETTING.review, getFlowInfo: window.HIVUI_SETTING.getFlowInfo, getApprovalInfo: window.HIVUI_SETTING.getApprovalInfo, processFlow: window.HIVUI_SETTING.processFlow, queryTask: window.HIVUI_SETTING.queryTask, withdrawtask: window.HIVUI_SETTING.withdrawtask, taskDiagram: window.HIVUI_SETTING.taskDiagram, openOrdernumber: window.HIVUI_SETTING.openOrdernumber, birtModel: window.HIVUI_SETTING.serverUrl + "/birt/model1", getProcessInfo: window.HIVUI_SETTING.serverUrl + '/flow/getProcessInfo', exportUrl: window.HIVUI_SETTING.serverUrl + "/export/dataexcelnew" }; new Vue({ i18n, render: h => h(App), }).$mount('#app')
import App from './App.vue' // import "hi-ui/lib/hi-ui.css"; //設置script引入全局的ELEMENT 配置 Vue.prototype.$ELEMENT = { size: 'mini', zIndex: 3000 }; import Message from './components/vue-m-message' Vue.use(Message) // will mount `Vue.prototype.$message` import './assets/icon/iconfont.css'; import './styles/index.css' import "hi-taskcenter/hi-taskcenter.css" import hitaskcenter from 'hi-taskcenter'; Vue.use(hitaskcenter); import 'zhc-flowchart/lib/zhc-flowchart.css' import zhcflowchart from "zhc-flowchart"; Vue.use(zhcflowchart) import UmyUi from 'umy-ui' import 'umy-ui/lib/theme-chalk/index.css'; import ZhcBirtCmps from 'zhc-birt-cmps' Vue.use(ZhcBirtCmps) Vue.use(UmyUi) // import window.HIVUI_SETTING from './window.HIVUI_SETTING' // import { $HCBIRT } from "@birt/funclib/HCBIRT" import Cookies from 'js-cookie' import { setToken, } from "./utils/auth.js"; // Vue.use(ElementUI) console.log('token', Cookies.get('EAP-Token')) setToken(Cookies.get('EAP-Token') || '') import axios from "./funclib/AxiosUtil"; import pinyin from 'js-pinyin' Vue.prototype.Pinyin = pinyin import md5 from 'js-md5' Vue.prototype.Md5 = md5 import { Loading } from 'element-ui'; Vue.prototype.Loading = Loading import * as XLSX from 'xlsx' import * as echarts from "echarts" Vue.prototype.XLSX = XLSX; Vue.prototype.$echarts = echarts; // Vue.prototype.$HCBIRT = $HCBIRT; import i18n from './lang' Vue.prototype.$HI = { projectName: window.HIVUI_SETTING.projectName, serverUrl: window.HIVUI_SETTING.serverUrl, serverName: window.HIVUI_SETTING.serverName, request: axios, queryOperate: 'like', pageSize: 20, saveUrl: window.HIVUI_SETTING.saveUrl, queryUrl: window.HIVUI_SETTING.queryUrl, querysUrl: window.HIVUI_SETTING.serverUrl + "/data/querys", policyUrl: window.HIVUI_SETTING.policyUrl, enumsUrl: window.HIVUI_SETTING.serverUrl + "/platf/xtgn/enums/fgroupid/", upload: window.HIVUI_SETTING.upload, download: window.HIVUI_SETTING.download, preview: window.HIVUI_SETTING.preview || window.HIVUI_SETTING.review, getFlowInfo: window.HIVUI_SETTING.getFlowInfo, getApprovalInfo: window.HIVUI_SETTING.getApprovalInfo, processFlow: window.HIVUI_SETTING.processFlow, queryTask: window.HIVUI_SETTING.queryTask, withdrawtask: window.HIVUI_SETTING.withdrawtask, taskDiagram: window.HIVUI_SETTING.taskDiagram, openOrdernumber: window.HIVUI_SETTING.openOrdernumber, birtModel: window.HIVUI_SETTING.serverUrl + "/birt/model1", getProcessInfo: window.HIVUI_SETTING.serverUrl + '/flow/getProcessInfo', exportUrl: window.HIVUI_SETTING.serverUrl + "/export/dataexcelnew" }; new Vue({ i18n, render: h => h(App), }).$mount('#app')
Ignore Space
Show notes
View
project/hivuiBirt/lang/index.js
import Vue from 'vue' import VueI18n from 'vue-i18n' import Cookies from 'js-cookie' // import locale from 'element-ui/lib/locale' // import elementEnLocale from 'element-ui/lib/locale/lang/en' // element-ui lang // import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN'// element-ui lang // import elementEsLocale from 'element-ui/lib/locale/lang/es'// element-ui lang import enLocale from './en' import zhLocale from './zh' import esLocale from './es' Vue.use(VueI18n) const messages = { en: { ...enLocale, // ...elementEnLocale }, zh: { ...zhLocale, // ...elementZhLocale }, es: { ...esLocale, // ...elementEsLocale } } export function getLanguage() { const chooseLanguage = Cookies.get('language') if (chooseLanguage) return chooseLanguage // if has not choose language const language = (navigator.language || navigator.browserLanguage).toLowerCase() const locales = Object.keys(messages) for (const locale of locales) { if (language.indexOf(locale) > -1) { return locale } } return 'zh' } const i18n = new VueI18n({ // set locale // options: en | zh | es locale: getLanguage(), // set locale messages messages }) // 配置elementUI 语言转换关系 locale.i18n((key, value) => i18n.t(key, value)) export default i18n
import Vue from 'vue' import VueI18n from 'vue-i18n' import Cookies from 'js-cookie' import locale from 'element-ui/lib/locale' import elementEnLocale from 'element-ui/lib/locale/lang/en' // element-ui lang import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN'// element-ui lang import elementEsLocale from 'element-ui/lib/locale/lang/es'// element-ui lang import enLocale from './en' import zhLocale from './zh' import esLocale from './es' Vue.use(VueI18n) const messages = { en: { ...enLocale, ...elementEnLocale }, zh: { ...zhLocale, ...elementZhLocale }, es: { ...esLocale, ...elementEsLocale } } export function getLanguage() { const chooseLanguage = Cookies.get('language') if (chooseLanguage) return chooseLanguage // if has not choose language const language = (navigator.language || navigator.browserLanguage).toLowerCase() const locales = Object.keys(messages) for (const locale of locales) { if (language.indexOf(locale) > -1) { return locale } } return 'zh' } const i18n = new VueI18n({ // set locale // options: en | zh | es locale: getLanguage(), // set locale messages messages }) // 配置elementUI 语言转换关系 locale.i18n((key, value) => i18n.t(key, value)) export default i18n
Show line notes below