Browse Source

更新依赖和打包方式

ZaiZai 5 months ago
parent
commit
6a7d4b9fb1

+ 6 - 4
package.json

@@ -2,13 +2,14 @@
   "name": "saber-admin",
   "version": "2.9.1",
   "private": true,
+  "buildName": "saber",
   "scripts": {
     "serve": "vue-cli-service serve",
     "build": "vue-cli-service build",
-    "build:zip": "sh ./scripts/build.sh all",
-    "build:zip:wgt": "sh ./scripts/build.sh wgt",
-    "build:test": "sh ./scripts/build.sh all test",
-    "build:test:wgt": "sh ./scripts/build.sh wgt test"
+    "build:zip": "node ./scripts/build.js",
+    "server:all": "node ./scripts/server.js all",
+    "server:test": "node ./scripts/server.js test",
+    "server:user": "node ./scripts/server.js user"
   },
   "dependencies": {
     "@antv/g2plot": "^2.4.20",
@@ -21,6 +22,7 @@
     "element-ui": "^2.15.14",
     "js-base64": "^2.5.1",
     "js-cookie": "^2.2.0",
+    "js-fast-way": "^0.5.6",
     "js-md5": "^0.7.3",
     "mockjs": "^1.0.1-beta3",
     "node-gyp": "^5.0.6",

+ 16 - 69
scripts/build.js

@@ -1,74 +1,21 @@
-const path = require('path');
-const fs = require('fs');
+const { execSync} = require('child_process');
+const config = require('../package.json');
+
+// 执行命令并打印输出
+function runCommand(name, local) {
+    try {
+        execSync(`node ./scripts/build/nodeBuild.js ${name}.zip`, { stdio: 'inherit' });
+    } catch (error) {
+        console.error(`命令执行失败: ${error.message}`);
+        process.exit(1);
+    }
+}
 
-// 获取当前命令行上下文路径
-const currentDirectory = process.cwd();
 console.log(`----------------------------`)
-console.log(`正在处理编译打包前的准备...`)
+console.log(`准备开始打包: ${config.buildName}`);
 
-//修改版本更新信息
-console.log(`更新版本更新信息...`)
-const versionPath = path.join(currentDirectory, '/public/version.json');
-const versionContent = fs.readFileSync(versionPath, 'utf8');
-//修改配置文件
-const versionJson = JSON.parse(versionContent);
-versionJson.value = dateFormat(new Date());         //版本号
-
-//更新版本更新信息
-fs.writeFileSync(versionPath, JSON.stringify(versionJson, null, 2));
+//打包官方版本
+runCommand(config.buildName, false);
 
 console.log(`----------------------------`)
-
-//删除上次打包相关的文件
-console.log(`正在删除上次打包相关的文件...`)
-const distZipPath = path.join(currentDirectory, '/zip/saber.zip');
-if(fs.existsSync(distZipPath)) {
-    fs.unlinkSync(distZipPath);
-}
-
-// 获取配置文件
-console.log(`获取当前的配置文件...`)
-const indexJsonPath = path.join(currentDirectory, 'src/config/index.json');
-const indexJsonContent = fs.readFileSync(indexJsonPath, 'utf8');
-
-// 检测上次打包异常中断的缓存文件是否存在
-console.log(`检测上次打包异常中断的缓存文件是否存在...`)
-const cacheFilePath = path.join(currentDirectory, 'scripts/cache.json');
-if(!fs.existsSync(cacheFilePath)) {
-    //创建缓存文件
-    console.log(`创建配置缓存文件...`)
-    const cacheJsonPath = path.join(currentDirectory, 'scripts/cache.json');
-    fs.writeFileSync(cacheJsonPath, indexJsonContent, 'utf8');
-}
-
-//修改配置文件
-const indexJson = JSON.parse(indexJsonContent);
-indexJson.target = "http://127.0.0.1:8090";     //接口地址
-indexJson.dev = {};                             //清空端口号配置
-
-//更新配置文件
-console.log(`修改配置文件为生产环境的配置...`)
-fs.writeFileSync(indexJsonPath, JSON.stringify(indexJson, null, 2));
-
-//时间格式化
-function dateFormat(date) {
-    let format = 'yyyyMMddhhmmss';
-    let o = {
-        "M+": date.getMonth() + 1, //month
-        "d+": date.getDate(), //day
-        "h+": date.getHours(), //hour
-        "m+": date.getMinutes(), //minute
-        "s+": date.getSeconds(), //second
-        "q+": Math.floor((date.getMonth() + 3) / 3), //quarter
-        "S": date.getMilliseconds() //millisecond
-    }
-    if (/(y+)/.test(format)) {
-        format = format.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
-    }
-    for (let k in o) {
-        if (new RegExp("(" + k + ")").test(format)) {
-            format = format.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
-        }
-    }
-    return format;
-}
+console.log('全部编译打包完成')

+ 0 - 136
scripts/build.sh

@@ -1,136 +0,0 @@
-#!/bin/bash
-
-#本地压缩文件名
-file_name="saber.zip"
-
-#测试服器上的目录地址
-file_path="testmanger.hczcxx.cn"
-
-#测试服务器上的演示地址
-demo_url="http://192.168.0.109:1888/"
-
-#测试服务器上的登录密码
-passwd="admin123@"
-
-# 打包前的准备
-node ./scripts/build.js
-# 执行打包命令
-vue-cli-service build
-# 恢复配置文件
-node ./scripts/restore.js
-# 排除打包文件
-if [ $1 == "wgt" ]; then
-    node ./scripts/public.js
-fi
-# 执行打包为zip
-node ./scripts/zip.js
-
-current_time=$(date "+%Y%m%d%H%M%S")
-
- # 上传到测试服务器
-function testServer() {
-    expect -c "
-        spawn scp ./zip/${file_name} root@192.168.0.109:/www/wwwroot/${file_path}
-        expect {
-            \"yes/no\" {send \"yes\r\";exp_continue;}
-            \"*password\" {set timeout 500;send \"${passwd}\r\";}
-        }
-    expect eof"
-
-#服务器上的相关操作
-/usr/bin/expect << EOF
-    set time 30
-    spawn ssh root@192.168.0.109
-    expect {
-        "*yes/no" { send "yes\r"; exp_continue }
-        "*password:" { send "${passwd}\r" }
-    }
-
-    # 进入当前项目的目录
-    expect "*]#"
-    send "cd /www/wwwroot/${file_path}\r"
-
-    # 删除 css 目录
-    expect "*]#"
-    send "rm -rf css\r"
-
-    # 删除 js 目录
-    expect "*]#"
-    send "rm -rf js\r"
-
-    # 解压上传的文件压缩包
-    expect "*]#"
-    send "unzip -o ${file_name}\r"
-
-    # 备份上一次的压缩文件
-    expect "*]#"
-    send "mv ./backup/${file_name} ./backup/${current_time}_${file_name}\r"
-
-    # 执行清理备份文件脚本
-    expect "*]#"
-    send "node ./backup.js\r"
-
-    # 移动当前文件到备份目录
-    expect "*]#"
-    send "mv ./${file_name} ./backup/${file_name}\r"
-
-    # 退出
-    send "exit\r"
-    expect eof
-EOF
-    echo "编译打包后自动部署到测试服务器上完成"
-    echo "测试服务器地址:${demo_url}"
-}
-
-# 删除 public 等目录
-function delPublic() {
-    echo "准备移除 public 下的静态目录文件"
-#服务器上的相关操作
-/usr/bin/expect << EOF
-    set time 30
-    spawn ssh root@192.168.0.109
-    expect {
-        "*yes/no" { send "yes\r"; exp_continue }
-        "*password:" { send "${passwd}\r" }
-    }
-
-    # 进入当前项目的目录
-    expect "*]#"
-    send "cd /www/wwwroot/${file_path}\r"
-
-    # 删除 app 目录
-    expect "*]#"
-    send "rm -rf app\r"
-
-    # 删除 cdn 目录
-    expect "*]#"
-    send "rm -rf cdn\r"
-
-    # 删除 img 目录
-    expect "*]#"
-    send "rm -rf img\r"
-
-    # 删除 svg 目录
-    expect "*]#"
-    send "rm -rf svg\r"
-
-    # 删除 util 目录
-    expect "*]#"
-    send "rm -rf util\r"
-
-    # 退出
-    send "exit\r"
-    expect eof
-EOF
-    echo "public 下的静态目录文件移除完成"
-}
-
- # 上传到测试服务器
-if [ $2 == "test" ]; then
-    if [ $1 == "all" ]; then
-        delPublic
-    fi
-    testServer
-else
-    echo "编译完成"
-fi

+ 78 - 0
scripts/build/config.js

@@ -0,0 +1,78 @@
+const path = require('path');
+const fs = require('fs');
+
+const buildName = process.argv[2] //打包后的名字
+
+// 获取当前命令行上下文路径
+const currentDirectory = process.cwd();
+console.log(`----------------------------`)
+console.log(`正在处理编译打包前的准备...`)
+
+//修改版本更新信息
+console.log(`更新版本更新信息...`)
+const versionPath = path.join(currentDirectory, '/public/version.json');
+const versionContent = fs.readFileSync(versionPath, 'utf8');
+//修改配置文件
+const versionJson = JSON.parse(versionContent);
+versionJson.value = dateFormat(new Date());         //版本号
+
+//更新版本更新信息
+fs.writeFileSync(versionPath, JSON.stringify(versionJson, null, 2));
+
+console.log(`----------------------------`)
+
+//删除上次打包相关的文件
+console.log(`正在删除上次打包相关的文件...`)
+const distZipPath = path.join(currentDirectory, `/zip/${buildName}`);
+if(fs.existsSync(distZipPath)) {
+    fs.unlinkSync(distZipPath);
+}
+
+// 获取配置文件
+console.log(`获取当前的配置文件...`)
+const indexJsonPath = path.join(currentDirectory, 'src/config/index.json');
+const indexJsonContent = fs.readFileSync(indexJsonPath, 'utf8');
+
+// 检测上次打包异常中断的缓存文件是否存在
+console.log(`检测上次打包异常中断的缓存文件是否存在...`)
+const cacheFilePath = path.join(currentDirectory, 'scripts/cache.json');
+if(!fs.existsSync(cacheFilePath)) {
+    //创建缓存文件
+    console.log(`创建配置缓存文件...`)
+    const cacheJsonPath = path.join(currentDirectory, 'scripts/cache.json');
+    fs.writeFileSync(cacheJsonPath, indexJsonContent, 'utf8');
+}
+
+//修改配置文件
+const indexJson = JSON.parse(indexJsonContent);
+indexJson.version = dateFormat(new Date());         //版本号
+indexJson.target = "http://127.0.0.1:8090";         //接口地址
+indexJson.smsPhone = "";                            //短信接口手机号
+indexJson.vite = {};                                //vite配置
+
+//更新配置文件
+console.log(`修改配置文件为生产环境的配置...`)
+fs.writeFileSync(indexJsonPath, JSON.stringify(indexJson, null, 2));
+
+//时间格式化
+function dateFormat(date) {
+    let format = 'yyyyMMddhhmmss';
+    let o = {
+        "M+": date.getMonth() + 1, //month
+        "d+": date.getDate(), //day
+        "h+": date.getHours(), //hour
+        "m+": date.getMinutes(), //minute
+        "s+": date.getSeconds(), //second
+        "q+": Math.floor((date.getMonth() + 3) / 3), //quarter
+        "S": date.getMilliseconds() //millisecond
+    }
+    if (/(y+)/.test(format)) {
+        format = format.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
+    }
+    for (let k in o) {
+        if (new RegExp("(" + k + ")").test(format)) {
+            format = format.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
+        }
+    }
+    return format;
+}

+ 29 - 0
scripts/build/nodeBuild.js

@@ -0,0 +1,29 @@
+const { execSync } = require('child_process');
+
+const buildName = process.argv[2] //打包后的名字
+
+// 执行命令并打印输出
+function runCommand(command) {
+    console.log(`执行命令: ${command}`);
+    try {
+        execSync(command, { stdio: 'inherit' });
+    } catch (error) {
+        console.error(`命令执行失败: ${error.message}`);
+        process.exit(1);
+    }
+}
+
+// 打包前的准备
+runCommand(`node ./scripts/build/config.js ${buildName}`);
+
+// 执行打包命令
+runCommand('vue-cli-service build');
+
+// 恢复配置文件
+runCommand('node ./scripts/build/restore.js');
+
+// 执行打包为zip
+runCommand(`node ./scripts/build/zip.js ${buildName}`);
+
+console.log(`----------------------------`)
+console.log(`${buildName} 编译打包完成`)

+ 0 - 0
scripts/restore.js → scripts/build/restore.js


+ 5 - 3
scripts/zip.js → scripts/build/zip.js

@@ -2,6 +2,8 @@ const fs = require('fs');
 const path = require("path");
 const archiver = require('archiver')
 
+const buildName = process.argv[2] //打包后的名字
+
 // 获取当前命令行上下文路径
 const currentDirectory = process.cwd();
 
@@ -22,7 +24,7 @@ if(!fs.existsSync(distJoinPath)) {
 
 // 创建文件输出流
 console.log(`初始化zip文件流...`)
-const distZipPath = path.join(currentDirectory, '/zip/saber.zip');
+const distZipPath = path.join(currentDirectory, `/zip/${buildName}`);
 let output = fs.createWriteStream(distZipPath)
 let archive = archiver('zip', {
     zlib: { level: 9 } // 设置压缩级别
@@ -30,7 +32,7 @@ let archive = archiver('zip', {
 
 // 文件输出流结束
 output.on('close', function() {
-    console.log('打包完成,zip文件位于zip文件夹下,/zip/saber.zip')
+    console.log(`打包完成,zip文件位于zip文件夹下,/zip/${buildName}`)
 })
 
 // 数据源是否耗尽
@@ -57,9 +59,9 @@ archive.pipe(output)
 
 console.log(`正在将dist文件夹到zip中...`)
 const distPath = path.join(currentDirectory, '/dist/');
+
 //打包dist里面的所有文件和目录
 archive.directory(distPath, false)
 
 //完成归档
 archive.finalize()
-

+ 7 - 0
scripts/cache.json

@@ -0,0 +1,7 @@
+{
+  "target1": "http://39.108.216.210:8090",
+  "target": "http://192.168.0.109:8090",
+  "dev": {
+    "port": 1888
+  }
+}

+ 0 - 68
scripts/public.js

@@ -1,68 +0,0 @@
-const path = require('path');
-const fs = require('fs');
-
-// 获取当前命令行上下文路径
-const currentDirectory = process.cwd();
-
-console.log(`----------------------------`)
-console.log(`项目编译打包完成,准备移除非必要的 /dist/app 文件夹...`)
-const dist_app = path.join(currentDirectory, '/dist/app');
-if(fs.existsSync(dist_app)) {
-    delallfilerid(dist_app)
-    fs.rmdirSync(dist_app)
-    console.log(`移除非必要的 /dist/app 文件夹成功...`)
-} else {
-    console.log(`/dist/app 文件夹 不存在,无需移除...`)
-}
-
-console.log(`准备移除非必要的 /dist/cdn 文件夹...`)
-const dist_cdn = path.join(currentDirectory, '/dist/cdn');
-if(fs.existsSync(dist_cdn)) {
-  delallfilerid(dist_cdn)
-  fs.rmdirSync(dist_cdn)
-  console.log(`移除非必要的 /dist/cdn 文件夹成功...`)
-} else {
-  console.log(`/dist/cdn 文件夹 不存在,无需移除...`)
-}
-
-console.log(`准备移除非必要的 /dist/img 文件夹...`)
-const dist_img = path.join(currentDirectory, '/dist/img');
-if(fs.existsSync(dist_img)) {
-  delallfilerid(dist_img)
-  fs.rmdirSync(dist_img)
-  console.log(`移除非必要的 /dist/img 文件夹成功...`)
-} else {
-  console.log(`/dist/img 文件夹 不存在,无需移除...`)
-}
-
-console.log(`准备移除非必要的 /dist/svg 文件夹...`)
-const dist_svg = path.join(currentDirectory, '/dist/svg');
-if(fs.existsSync(dist_svg)) {
-  delallfilerid(dist_svg)
-  fs.rmdirSync(dist_svg)
-  console.log(`移除非必要的 /dist/svg 文件夹成功...`)
-} else {
-  console.log(`/dist/svg 文件夹 不存在,无需移除...`)
-}
-
-console.log(`准备移除非必要的 /dist/util 文件夹...`)
-const dist_util = path.join(currentDirectory, '/dist/util');
-if(fs.existsSync(dist_util)) {
-  delallfilerid(dist_util)
-  fs.rmdirSync(dist_util)
-  console.log(`移除非必要的 /dist/util 文件夹成功...`)
-} else {
-  console.log(`/dist/util 文件夹 不存在,无需移除...`)
-}
-
-//删除文件夹下的所有文件
-function delallfilerid(fuckpath) {
-    fs.readdirSync(fuckpath).forEach((file, index, arr) => {
-        if (fs.lstatSync(`${fuckpath}/${file}`).isFile()) {
-            fs.unlinkSync(`${fuckpath}/${file}`)
-        }else if(fs.lstatSync(`${fuckpath}/${file}`).isDirectory()){
-            delallfilerid(`${fuckpath}/${file}`)
-            fs.rmdirSync(`${fuckpath}/${file}`)
-        }
-    })
-}

+ 85 - 0
scripts/server.js

@@ -0,0 +1,85 @@
+const { execSync} = require('child_process');
+const { getObjValue, arrIndex, isNullES } = require('js-fast-way')
+const fs = require('fs');
+
+// 配置
+const config = [
+    {
+        name: 'test',           //测试服
+        ip: '192.168.0.109',    //服务器地址
+        username: 'root',       //登录账号
+        password: 'admin123@',  //登录密码
+        fileName: 'saber',      //本地文件名
+        path: '/www/wwwroot/testmanger.hczcxx.cn',  //服务器上的文件路径
+        url: 'http://192.168.0.109:1888/',  //demo地址
+    },
+    {
+        name: 'user',           //正式服
+        ip: '39.108.216.210',   //服务器地址
+        username: 'root',       //登录账号
+        password: '%CX0&qPRk2BitWPH^tCa5jxZKPYuST', //登录密码
+        fileName: 'saber',     //本地文件名
+        path: '/www/wwwroot/testmanger.hcxxy.com',        //服务器上的文件路径
+        url: 'http://testmanger.hczcxx.cn',             //demo地址
+    },
+];
+
+const argv = process.argv[2]
+
+// 执行命令并打印输出
+function runCommand(command) {
+    console.log(`执行命令: ${command}`);
+    try {
+        execSync(command, { stdio: 'inherit' });
+    } catch (error) {
+        console.error(`命令执行失败: ${error.message}`);
+        process.exit(1);
+    }
+}
+
+//处理数据
+function setConfigData() {
+    if (argv === 'undefined' || isNullES(argv)) {
+        process.exit(1);
+        return
+    }
+
+    console.log(`----------------------------`)
+    console.log(`准备开始上传到服务器...`);
+    if (argv === 'all') {
+        //全部上传
+        for (let i = 0; i < config.length; i++) {
+            const {name, ip, username, password, fileName, path, url} = getObjValue(config[i])
+            const file_name = `${fileName}.zip`
+            //判断本地文件是否存在
+            if (!fs.existsSync(`./zip/${file_name}`)) {
+                console.error(`文件 ./zip/${file_name} 不存在`);
+                process.exit(1);
+            }
+            console.log(`----------------------------`)
+            console.log(`准备上传到服务器:${name}`);
+            runCommand(`node ./scripts/upload/upload.js ${ip} ${username} ${password} ${file_name} ${path} ${url}`);
+        }
+    } else {
+        const index = arrIndex(config, 'name', argv)
+        if (index === -1) {
+            console.log('此平台不存在')
+            process.exit(1);
+            return
+        }
+        const {name, ip, username, password, fileName, path, url} = getObjValue(config[index])
+        const file_name = `${fileName}.zip`
+        //判断本地文件是否存在
+        if (!fs.existsSync(`./zip/${file_name}`)) {
+            console.error(`文件 ./zip/${file_name} 不存在`);
+            process.exit(1);
+        }
+        console.log(`----------------------------`)
+        console.log(`准备上传到服务器:${name}`);
+        runCommand(`node ./scripts/upload/upload.js ${ip} ${username} ${password} ${file_name} ${path} ${url}`);
+    }
+    console.log(`----------------------------`)
+    console.log(`全部上传并部署完成`);
+}
+
+setConfigData()

+ 111 - 0
scripts/upload/upload.js

@@ -0,0 +1,111 @@
+const { execSync } = require('child_process');
+const { isNullES } = require('js-fast-way')
+
+//获取参数
+const serverAddress = process.argv[2]
+const username = process.argv[3]
+const password = process.argv[4]
+const fileName = process.argv[5]
+const filePath = process.argv[6]
+const url = process.argv[7]
+
+// 解析服务器地址和端口
+const [serverIp, port] = serverAddress.split(':');
+const sshPort = port || '22';  // 如果没有指定端口,默认使用22
+
+// 检查命令是否可用
+function commandExists(command) {
+    try {
+        execSync(`which ${command}`, { stdio: 'ignore' });
+        return true;
+    } catch (e) {
+        return false;
+    }
+}
+
+// 执行命令并打印输出
+function runCommand(command) {
+    console.log(`执行命令: ${command}`);
+    try {
+        if (command.startsWith('sshpass') || command.startsWith('ssh')) {
+            // 为SSH命令设置LC_ALL
+            command = `LC_ALL=C ${command}`;
+        }
+        execSync(command, { stdio: 'inherit' });
+    } catch (error) {
+        console.error(`命令执行失败: ${error.message}`);
+        process.exit(1);
+    }
+}
+
+// 上传到服务器
+function uploadServer() {
+    const sshCommand = `cd ${filePath} && rm -rf static && unzip -o ${fileName}`;
+    if (process.platform === 'win32') {
+        // Windows
+        runCommand(`pscp -P ${sshPort} -pw ${password} ./zip/${fileName} ${username}@${serverIp}:${filePath}`);
+        runCommand(`plink -P ${sshPort} -ssh ${username}@${serverIp} -pw ${password} -batch "${sshCommand}"`);
+    } else {
+        // Mac/Linux
+        runCommand(`sshpass -p "${password}" scp -P ${sshPort} ./zip/${fileName} ${username}@${serverIp}:${filePath}`);
+        runCommand(`sshpass -p "${password}" ssh -p ${sshPort} ${username}@${serverIp} "${sshCommand}"`);
+    }
+    console.log('编译打包后自动部署到服务器上完成');
+    console.log(`服务器上的地址:${url}`);
+}
+
+// 删除 plugins 等目录
+function delPublic(name) {
+    console.log(`准备移除 ${name} 等目录`);
+    const sshCommand = `cd ${filePath} && rm -rf ${name}`;
+    if (process.platform === 'win32') {
+        // Windows
+        runCommand(`plink -P ${sshPort} -ssh ${username}@${serverIp} -pw ${password} -batch "${sshCommand}"`);
+    } else {
+        // Mac/Linux
+        runCommand(`sshpass -p "${password}" ssh -p ${sshPort} ${username}@${serverIp} "${sshCommand}"`);
+    }
+    console.log(`${name} 等目录移除完成`);
+}
+
+//执行
+function runCode() {
+    //参数是否为空
+    if (serverIp === 'undefined' || username === 'undefined' || password === 'undefined' || fileName === 'undefined' || filePath === 'undefined') {
+        console.log('参数异常,终止执行:', { serverIp, username, password, fileName, filePath });
+        process.exit(1);
+        return
+    }
+    if (isNullES(serverIp) || isNullES(username) || isNullES(password) || isNullES(fileName) || isNullES(filePath)) {
+        console.log('参数异常,终止执行:', { serverIp, username, password, fileName, filePath });
+        process.exit(1);
+        return
+    }
+
+    //判断命令是否支持
+    if (process.platform === 'win32') {
+        if (!commandExists('putty')) {
+            console.log('putty 未安装,请先安装 putty');
+            process.exit(1);
+            return
+        }
+    } else {
+        if (!commandExists('sshpass')) {
+            console.log('sshpass 未安装,请先安装 sshpass');
+            process.exit(1);
+            return
+        }
+    }
+    //删除一些目录
+    delPublic('app');
+    delPublic('cdn');
+    delPublic('css');
+    delPublic('img');
+    delPublic('js');
+    delPublic('svg');
+    delPublic('util');
+    //上传到服务器
+    uploadServer();
+}
+
+runCode()

+ 6 - 3
src/config/index.json

@@ -1,7 +1,10 @@
 {
   "target1": "http://39.108.216.210:8090",
-  "target": "http://192.168.0.109:8090",
+  "target": "http://127.0.0.1:8090",
   "dev": {
     "port": 1888
-  }
-}
+  },
+  "version": "20240827163559",
+  "smsPhone": "",
+  "vite": {}
+}

+ 0 - 2
src/views/manager/projectinfo/editElement/editElement.vue

@@ -783,8 +783,6 @@ export default {
       this.tableData = []
       this.$refs.cascader.clearCheckedNodes()
       this.AddNewElementField = ''
-
-
     },
     addyuansu () {//新增元素
       this.tableData.unshift({ eName: '', eType: '' })

+ 5 - 0
yarn.lock

@@ -5368,6 +5368,11 @@ js-cookie@^2.2.0:
   resolved "http://39.108.216.210:9000/js-cookie/-/js-cookie-2.2.1.tgz#69e106dc5d5806894562902aa5baec3744e9b2b8"
   integrity sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==
 
+js-fast-way@^0.5.6:
+  version "0.5.6"
+  resolved "http://39.108.216.210:9000/js-fast-way/-/js-fast-way-0.5.6.tgz#58bbb5621f60543bde37df9308a633410d87f473"
+  integrity sha512-r1BH7xAU4R5vR4LzA2VLK9slgtN5VjCA65UJZN81QUZFNCr7vY9EMrF55gJzJ5O3sQOXbczDxPWwl2Xi8XoUNw==
+
 js-levenshtein@^1.1.3:
   version "1.1.6"
   resolved "http://39.108.216.210:9000/js-levenshtein/-/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d"