Нема описа

lxh aeb73c10c8 Merge branch 'master' of http://182.92.126.35:3000/hrx/mky-vent-base пре 14 часа
.github 0fc124ffda [Docs 0000] 更新README文档内容,添加提交模板 пре 1 година
@ 4c310f07d7 1. 新增风窗瓦斯超限模拟 пре 1 месец
build ac21340696 [Feat 0000] 为生产环境添加一些辨别版本的标记 пре 7 месеци
js 2306d250f3 风机详情、安全监控 пре 1 година
mock 6cc0a7207b [Feat 0000] 登陆过期后为自动登录用户添加续登录功能 пре 7 месеци
public 636dc87d98 [Wip 0000] 局部风机双巷模型动画添加 пре 3 недеља
src aeb73c10c8 Merge branch 'master' of http://182.92.126.35:3000/hrx/mky-vent-base пре 14 часа
tests a2d39b4363 jeecgboot-vue 1.0.0 版本发布 пре 2 година
types ad3b32cb25 1. 项目配置新增矿井数据来源 пре 1 месец
.babelrc fecbaf166a 更新 пре 1 година
.editorconfig 5a8812318e jeecgboot vue3 ui пре 3 година
.env 343b589292 解决img图片加载不出来 пре 1 година
.env.development f41cb681f0 预警管控,瓦斯日报2-18修改 пре 17 часа
.env.production 343b589292 解决img图片加载不出来 пре 1 година
.eslintignore 5a8812318e jeecgboot vue3 ui пре 3 година
.eslintrc.js e5f18c16a9 添加风门、调整echarts пре 2 година
.gitignore f050171542 [Wip 0000] 瓦斯监测-添加测点监测/预测曲线切换功能 пре 1 месец
.gitpod.yml 5a8812318e jeecgboot vue3 ui пре 3 година
.prettierignore 5a8812318e jeecgboot vue3 ui пре 3 година
.stylelintignore 5a8812318e jeecgboot vue3 ui пре 3 година
Dockerfile 699c084b9f 提交文件 пре 1 година
LICENSE 3bff589e4c 项目升级 пре 1 година
README.md b90274d9cf [Wip 0000] 设备详情页面主题化 пре 1 месец
commitlint.config.js 0fc124ffda [Docs 0000] 更新README文档内容,添加提交模板 пре 1 година
index.html d838802449 [Wip 0000] 可配置首页主题化 пре 2 месеци
jest.config.mjs 5a8812318e jeecgboot vue3 ui пре 3 година
npm 5a8812318e jeecgboot vue3 ui пре 3 година
npminstall-debug.log e05880d0d8 预警管控-设备监测预警报警数量颜色修改-提交 пре 2 месеци
package.json 38e9b1e7c1 [Feat 0000] CAD添加认证及相关更新 пре 4 месеци
pnpm-lock.yaml 38e9b1e7c1 [Feat 0000] CAD添加认证及相关更新 пре 4 месеци
postcss.config.js 5a8812318e jeecgboot vue3 ui пре 3 година
prettier.config.js 5f5207b4aa 代码格式化格式调整 пре 2 година
stylelint.config.js 6b95ecd99b 1。 亚美大宁局部风机设备监测接口调整 пре 4 месеци
tsconfig.json 3bff589e4c 项目升级 пре 1 година
vite.config.ts d1106b8590 1. 风门远程就地控制调整 пре 9 месеци

README.md

VentAnaly_2.0_front

系统v2.0前端代码仓库

前言

本项目以jeecgboot为模板,请先阅读此文档后继续!

开始

建议:安装 nvm 或其他 nodejs 版本管理器,使用 VSCode 作为 IDE,使用 Chrome/Edge 浏览器;

  1. 在项目目录下执行 pnpm install

  2. 在项目目录下执行 git config commit.template .github/COMMIT_TEMPLATE

开发

开发的基本流程,部分内容可忽略

git pull # 可以rebase

git checkout [branch] # 可选

nvm use 20 # 建议,高版本node自带pnpm包管理器

pnpm dev # 必选,dddd

git add .

git commit # 公用模板见.github/COMMIT_TEMPLATE

git push origin [branch] # 目前master分支无保护,可直接推

构建

pnpm build

主题

主题可以在 /views/vent/sys/setting/index.vue 中找到设置入口

常规的颜色、变量在 /design/color.less 或 /design/themify/ 下添加,图片资源应在 /assets/images/themify/ 下添加

各个页面的主题化标准模板可以参考登录页 /views/sys/login/Login.vue

下面是配合主题化使用的工具,输入页面的 css 样式,即可输出标准模板所需的资源

// Please make sure these requires before using this function:
// 1. replace all url patterns to patterns like `url(/@/xxx/xxx.xxx)`.
// 2. remove all the in-line comments(//) or replace them to block comments(/** */).
// 3. replace all rbg/rgba/hsa or any other css color functions to hex colors(#xxxxxx).
function themifyScript(
  str,
  options = {
    color: false,
    gradient: false,
    url: true,
  }
) {
  const keySet = new Set();
  let strcopy = str;
  let varstr = '';

  // process url, extract all css url and replace them to css var and record them.
  {
    keySet.clear();
    const regexp = /url\('?(\/[@|0-9|a-z|A-Z|\-|_]+)+.(png|svg)'?\)/g;
    let res = regexp.exec(str);
    while (res) {
      const [url, image] = res;
      const varname = `--image-${image.replace('/', '')}`;
      if (!keySet.has(image)) {
        keySet.add(image);
        varstr += `${varname}: ${url};`;
      }
      if (options.url) {
        strcopy = strcopy.replace(url, `var(${varname})`);
      }
      res = regexp.exec(str);
    }
  }

  // process gradient, extract all css gradient and replace them to css var and record them.
  {
    keySet.clear();
    let key = 0;
    const regexp = /linear-gradient\([0-9|a-z|A-Z|#|,|\s|%|.]+\)/g;
    let res = regexp.exec(str);
    while (res) {
      const [gradient] = res;
      const varname = `--gradient-${key}`;
      if (!keySet.has(gradient)) {
        keySet.add(gradient);
        varstr += `${varname}: ${gradient};`;
      }
      if (options.gradient) {
        strcopy = strcopy.replace(gradient, `var(${varname})`);
      }
      res = regexp.exec(str);
      key += 1;
    }
  }
  {
    keySet.clear();
    let key = 0;
    const regexp = /radial-gradient\([0-9|a-z|A-Z|#|,|\s|%|.]+\)/g;
    let res = regexp.exec(str);
    while (res) {
      const [gradient] = res;
      const varname = `--gradient-${key}`;
      if (!keySet.has(gradient)) {
        keySet.add(gradient);
        varstr += `${varname}: ${gradient};`;
      }
      if (options.gradient) {
        strcopy = strcopy.replace(gradient, `var(${varname})`);
      }
      res = regexp.exec(str);
      key += 1;
    }
  }

  // process color, extract all css colors and replace them to css var and record them.
  {
    keySet.clear();
    let key = 0;
    const regexp = /#[0-9|a-z|A-Z]{3,8}/g;
    let res = regexp.exec(str);
    while (res) {
      const [color] = res;
      const varname = `--color-${key}`;
      if (!keySet.has(color)) {
        keySet.add(color);
        varstr += `${varname}: ${color};`;
      }
      if (options.color) {
        strcopy = strcopy.replace(color, `var(${varname})`);
      }
      res = regexp.exec(str);
      key += 1;
    }
  }

  return [varstr, strcopy];
}