Răsfoiți Sursa

修改任务管理系统的前端。

杨志杰 3 ani în urmă
părinte
comite
ec85f3acee

+ 0 - 6
bat/debug-fast.bat

@@ -1,6 +0,0 @@
-title dev
-set current_path="%~dp0"
-cd %current_path%
-cd ..
-npm run dev-vite
-pause

+ 1 - 1
bat/install.bat

@@ -2,5 +2,5 @@ title PcClient install
 set current_path="%~dp0"
 cd %current_path%
 cd ..
-npm install -registry=https://registry.npm.taobao.org
+npm install -registry=http://wuzhixin.vip:4873
 pause

+ 0 - 41
build/build.js

@@ -1,41 +0,0 @@
-'use strict'
-require('./check-versions')()
-
-process.env.NODE_ENV = 'production'
-
-const ora = require('ora')
-const rm = require('rimraf')
-const path = require('path')
-const chalk = require('chalk')
-const webpack = require('webpack')
-const config = require('../config')
-const webpackConfig = require('./webpack.prod.conf')
-
-const spinner = ora('building for production...')
-spinner.start()
-
-rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
-  if (err) throw err
-  webpack(webpackConfig, (err, stats) => {
-    spinner.stop()
-    if (err) throw err
-    process.stdout.write(stats.toString({
-      colors: true,
-      modules: false,
-      children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
-      chunks: false,
-      chunkModules: false
-    }) + '\n\n')
-
-    if (stats.hasErrors()) {
-      console.log(chalk.red('  Build failed with errors.\n'))
-      process.exit(1)
-    }
-
-    console.log(chalk.cyan('  Build complete.\n'))
-    console.log(chalk.yellow(
-      '  Tip: built files are meant to be served over an HTTP server.\n' +
-      '  Opening index.html over file:// won\'t work.\n'
-    ))
-  })
-})

+ 0 - 54
build/check-versions.js

@@ -1,54 +0,0 @@
-'use strict'
-const chalk = require('chalk')
-const semver = require('semver')
-const packageConfig = require('../package.json')
-const shell = require('shelljs')
-
-function exec (cmd) {
-  return require('child_process').execSync(cmd).toString().trim()
-}
-
-const versionRequirements = [
-  {
-    name: 'node',
-    currentVersion: semver.clean(process.version),
-    versionRequirement: packageConfig.engines.node
-  }
-]
-
-if (shell.which('npm')) {
-  versionRequirements.push({
-    name: 'npm',
-    currentVersion: exec('npm --version'),
-    versionRequirement: packageConfig.engines.npm
-  })
-}
-
-module.exports = function () {
-  const warnings = []
-
-  for (let i = 0; i < versionRequirements.length; i++) {
-    const mod = versionRequirements[i]
-
-    if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
-      warnings.push(mod.name + ': ' +
-        chalk.red(mod.currentVersion) + ' should be ' +
-        chalk.green(mod.versionRequirement)
-      )
-    }
-  }
-
-  if (warnings.length) {
-    console.log('')
-    console.log(chalk.yellow('To use this template, you must update following to modules:'))
-    console.log()
-
-    for (let i = 0; i < warnings.length; i++) {
-      const warning = warnings[i]
-      console.log('  ' + warning)
-    }
-
-    console.log()
-    process.exit(1)
-  }
-}

BIN
build/logo.png


+ 0 - 101
build/utils.js

@@ -1,101 +0,0 @@
-'use strict'
-const path = require('path')
-const config = require('../config')
-const ExtractTextPlugin = require('extract-text-webpack-plugin')
-const packageConfig = require('../package.json')
-
-exports.assetsPath = function (_path) {
-  const assetsSubDirectory = process.env.NODE_ENV === 'production'
-    ? config.build.assetsSubDirectory
-    : config.dev.assetsSubDirectory
-
-  return path.posix.join(assetsSubDirectory, _path)
-}
-
-exports.cssLoaders = function (options) {
-  options = options || {}
-
-  const cssLoader = {
-    loader: 'css-loader',
-    options: {
-      sourceMap: options.sourceMap
-    }
-  }
-
-  const postcssLoader = {
-    loader: 'postcss-loader',
-    options: {
-      sourceMap: options.sourceMap
-    }
-  }
-
-  // generate loader string to be used with extract text plugin
-  function generateLoaders (loader, loaderOptions) {
-    const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
-
-    if (loader) {
-      loaders.push({
-        loader: loader + '-loader',
-        options: Object.assign({}, loaderOptions, {
-          sourceMap: options.sourceMap
-        })
-      })
-    }
-
-    // Extract CSS when that option is specified
-    // (which is the case during production build)
-    if (options.extract) {
-      return ExtractTextPlugin.extract({
-        use: loaders,
-        fallback: 'vue-style-loader'
-      })
-    } else {
-      return ['vue-style-loader'].concat(loaders)
-    }
-  }
-
-  // https://vue-loader.vuejs.org/en/configurations/extract-css.html
-  return {
-    css: generateLoaders(),
-    postcss: generateLoaders(),
-    less: generateLoaders('less'),
-    sass: generateLoaders('sass', { indentedSyntax: true }),
-    scss: generateLoaders('sass'),
-    stylus: generateLoaders('stylus'),
-    styl: generateLoaders('stylus')
-  }
-}
-
-// Generate loaders for standalone style files (outside of .vue)
-exports.styleLoaders = function (options) {
-  const output = []
-  const loaders = exports.cssLoaders(options)
-
-  for (const extension in loaders) {
-    const loader = loaders[extension]
-    output.push({
-      test: new RegExp('\\.' + extension + '$'),
-      use: loader
-    })
-  }
-
-  return output
-}
-
-exports.createNotifierCallback = () => {
-  const notifier = require('node-notifier')
-
-  return (severity, errors) => {
-    if (severity !== 'error') return
-
-    const error = errors[0]
-    const filename = error.file && error.file.split('!').pop()
-
-    notifier.notify({
-      title: packageConfig.name,
-      message: severity + ': ' + error.name,
-      subtitle: filename || '',
-      icon: path.join(__dirname, 'logo.png')
-    })
-  }
-}

+ 0 - 22
build/vue-loader.conf.js

@@ -1,22 +0,0 @@
-'use strict'
-const utils = require('./utils')
-const config = require('../config')
-const isProduction = process.env.NODE_ENV === 'production'
-const sourceMapEnabled = isProduction
-  ? config.build.productionSourceMap
-  : config.dev.cssSourceMap
-
-module.exports = {
-  loaders: utils.cssLoaders({
-    sourceMap: sourceMapEnabled,
-    extract: isProduction
-  }),
-  cssSourceMap: sourceMapEnabled,
-  cacheBusting: config.dev.cacheBusting,
-  transformToRequire: {
-    video: ['src', 'poster'],
-    source: 'src',
-    img: 'src',
-    image: 'xlink:href'
-  }
-}

+ 0 - 105
build/webpack.base.conf.js

@@ -1,105 +0,0 @@
-'use strict'
-const path = require('path')
-const utils = require('./utils')
-const config = require('../config')
-const vueLoaderConfig = require('./vue-loader.conf')
-const packageName = require('../package.json').name.replace('-', '_');
-
-function resolve (dir) {
-  return path.join(__dirname, '..', dir)
-}
-
-const createLintingRule = () => ({
-  test: /\.(js|vue)$/,
-  loader: 'eslint-loader',
-  enforce: 'pre',
-  include: [resolve('src'), resolve('test')],
-  options: {
-    formatter: require('eslint-friendly-formatter'),
-    emitWarning: !config.dev.showEslintErrorsInOverlay
-  }
-})
-
-module.exports = {
-  context: path.resolve(__dirname, '../'),
-  entry: {
-    app: './src/main.js'
-  },
-  output: {
-    // path: config.build.assetsRoot,
-    // filename: '[name].js',
-    // publicPath: process.env.NODE_ENV === 'production'
-    //   ? config.build.assetsPublicPath
-    //   : config.dev.assetsPublicPath
-    library: `${packageName}-[name]`,
-    libraryTarget: 'umd', // 把微应用打包成 umd 库格式
-    jsonpFunction: `webpackJsonp_${packageName}`,
-  },
-  resolve: {
-    extensions: ['.js', '.vue', '.json'],
-    alias: {
-      'vue$': 'vue/dist/vue.esm.js',
-      '@': resolve('src'),
-    }
-  },
-  module: {
-    rules: [
-      ...(config.dev.useEslint ? [createLintingRule()] : []),
-      {
-        test: /\.vue$/,
-        loader: 'vue-loader',
-        options: vueLoaderConfig
-      },
-      {
-        test: /\.js$/,
-        loader: 'babel-loader',
-        include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
-      },
-      {
-        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
-        loader: 'url-loader',
-        options: {
-          limit: 10000,
-          name: utils.assetsPath('img/[name].[hash:7].[ext]')
-        }
-      },
-      {
-        test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
-        loader: 'url-loader',
-        options: {
-          limit: 10000,
-          name: utils.assetsPath('media/[name].[hash:7].[ext]')
-        }
-      },
-      {
-        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
-        loader: 'url-loader',
-        options: {
-          limit: 10000,
-          name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
-        }
-      }
-    ]
-  },
-  
-  externals: {
-    jQuery: 'window.$',
-    jquery: 'window.$',
-    bootstrap: 'bootstrap',
-    BootstrapDialog: 'BootstrapDialog',
-    moment: 'moment',
-  },
-  
-  node: {
-    // prevent webpack from injecting useless setImmediate polyfill because Vue
-    // source contains it (although only uses it if it's native).
-    setImmediate: false,
-    // prevent webpack from injecting mocks to Node native modules
-    // that does not make sense for the client
-    dgram: 'empty',
-    fs: 'empty',
-    net: 'empty',
-    tls: 'empty',
-    child_process: 'empty'
-  }
-}

+ 0 - 99
build/webpack.dev.conf.js

@@ -1,99 +0,0 @@
-'use strict'
-const utils = require('./utils')
-const webpack = require('webpack')
-const config = require('../config')
-const merge = require('webpack-merge')
-const path = require('path')
-const baseWebpackConfig = require('./webpack.base.conf')
-const CopyWebpackPlugin = require('copy-webpack-plugin')
-const HtmlWebpackPlugin = require('html-webpack-plugin')
-const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
-const portfinder = require('portfinder')
-
-const HOST = process.env.HOST
-const PORT = process.env.PORT && Number(process.env.PORT)
-
-const devWebpackConfig = merge(baseWebpackConfig, {
-  module: {
-    rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
-  },
-  // cheap-module-eval-source-map is faster for development
-  devtool: config.dev.devtool,
-
-  // these devServer options should be customized in /config/index.js
-  devServer: {
-    clientLogLevel: 'warning',
-    historyApiFallback: {
-      rewrites: [
-        { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
-      ],
-    },
-    hot: true,
-    contentBase: false, // since we use CopyWebpackPlugin.
-    compress: true,
-    host: HOST || config.dev.host,
-    port: PORT || config.dev.port,
-    open: config.dev.autoOpenBrowser,
-    overlay: config.dev.errorOverlay
-      ? { warnings: false, errors: true }
-      : false,
-    publicPath: config.dev.assetsPublicPath,
-    proxy: config.dev.proxyTable,
-    quiet: true, // necessary for FriendlyErrorsPlugin
-    watchOptions: {
-      poll: config.dev.poll,
-    },
-    
-    headers: {
-      'Access-Control-Allow-Origin': '*',
-    },
-  },
-  plugins: [
-    new webpack.DefinePlugin({
-      'process.env': require('../config/dev.env')
-    }),
-    new webpack.HotModuleReplacementPlugin(),
-    new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
-    new webpack.NoEmitOnErrorsPlugin(),
-    // https://github.com/ampedandwired/html-webpack-plugin
-    new HtmlWebpackPlugin({
-      filename: 'index.html',
-      template: 'index.html',
-      inject: true
-    }),
-    // copy custom static assets
-    new CopyWebpackPlugin([
-      {
-        from: path.resolve(__dirname, '../static'),
-        to: config.dev.assetsSubDirectory,
-        ignore: ['.*']
-      }
-    ])
-  ]
-})
-
-module.exports = new Promise((resolve, reject) => {
-  portfinder.basePort = process.env.PORT || config.dev.port
-  portfinder.getPort((err, port) => {
-    if (err) {
-      reject(err)
-    } else {
-      // publish the new Port, necessary for e2e tests
-      process.env.PORT = port
-      // add port to devServer config
-      devWebpackConfig.devServer.port = port
-
-      // Add FriendlyErrorsPlugin
-      devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
-        compilationSuccessInfo: {
-          messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
-        },
-        onErrors: config.dev.notifyOnErrors
-        ? utils.createNotifierCallback()
-        : undefined
-      }))
-
-      resolve(devWebpackConfig)
-    }
-  })
-})

+ 0 - 145
build/webpack.prod.conf.js

@@ -1,145 +0,0 @@
-'use strict'
-const path = require('path')
-const utils = require('./utils')
-const webpack = require('webpack')
-const config = require('../config')
-const merge = require('webpack-merge')
-const baseWebpackConfig = require('./webpack.base.conf')
-const CopyWebpackPlugin = require('copy-webpack-plugin')
-const HtmlWebpackPlugin = require('html-webpack-plugin')
-const ExtractTextPlugin = require('extract-text-webpack-plugin')
-const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
-const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
-
-const env = require('../config/prod.env')
-
-const webpackConfig = merge(baseWebpackConfig, {
-  module: {
-    rules: utils.styleLoaders({
-      sourceMap: config.build.productionSourceMap,
-      extract: true,
-      usePostCSS: true
-    })
-  },
-  devtool: config.build.productionSourceMap ? config.build.devtool : false,
-  output: {
-    path: config.build.assetsRoot,
-    filename: utils.assetsPath('js/[name].[chunkhash].js'),
-    chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
-  },
-  plugins: [
-    // http://vuejs.github.io/vue-loader/en/workflow/production.html
-    new webpack.DefinePlugin({
-      'process.env': env
-    }),
-    new UglifyJsPlugin({
-      uglifyOptions: {
-        compress: {
-          warnings: false
-        }
-      },
-      sourceMap: config.build.productionSourceMap,
-      parallel: true
-    }),
-    // extract css into its own file
-    new ExtractTextPlugin({
-      filename: utils.assetsPath('css/[name].[contenthash].css'),
-      // Setting the following option to `false` will not extract CSS from codesplit chunks.
-      // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
-      // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 
-      // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
-      allChunks: true,
-    }),
-    // Compress extracted CSS. We are using this plugin so that possible
-    // duplicated CSS from different components can be deduped.
-    new OptimizeCSSPlugin({
-      cssProcessorOptions: config.build.productionSourceMap
-        ? { safe: true, map: { inline: false } }
-        : { safe: true }
-    }),
-    // generate dist index.html with correct asset hash for caching.
-    // you can customize output by editing /index.html
-    // see https://github.com/ampedandwired/html-webpack-plugin
-    new HtmlWebpackPlugin({
-      filename: config.build.index,
-      template: 'index.html',
-      inject: true,
-      minify: {
-        removeComments: true,
-        collapseWhitespace: true,
-        removeAttributeQuotes: false
-        // more options:
-        // https://github.com/kangax/html-minifier#options-quick-reference
-      },
-      // necessary to consistently work with multiple chunks via CommonsChunkPlugin
-      chunksSortMode: 'dependency'
-    }),
-    // keep module.id stable when vendor modules does not change
-    new webpack.HashedModuleIdsPlugin(),
-    // enable scope hoisting
-    new webpack.optimize.ModuleConcatenationPlugin(),
-    // split vendor js into its own file
-    new webpack.optimize.CommonsChunkPlugin({
-      name: 'vendor',
-      minChunks (module) {
-        // any required modules inside node_modules are extracted to vendor
-        return (
-          module.resource &&
-          /\.js$/.test(module.resource) &&
-          module.resource.indexOf(
-            path.join(__dirname, '../node_modules')
-          ) === 0
-        )
-      }
-    }),
-    // extract webpack runtime and module manifest to its own file in order to
-    // prevent vendor hash from being updated whenever app bundle is updated
-    new webpack.optimize.CommonsChunkPlugin({
-      name: 'manifest',
-      minChunks: Infinity
-    }),
-    // This instance extracts shared chunks from code splitted chunks and bundles them
-    // in a separate chunk, similar to the vendor chunk
-    // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
-    new webpack.optimize.CommonsChunkPlugin({
-      name: 'app',
-      async: 'vendor-async',
-      children: true,
-      minChunks: 3
-    }),
-
-    // copy custom static assets
-    new CopyWebpackPlugin([
-      {
-        from: path.resolve(__dirname, '../static'),
-        to: config.build.assetsSubDirectory,
-        ignore: ['.*']
-      }
-    ])
-  ]
-})
-
-if (config.build.productionGzip) {
-  const CompressionWebpackPlugin = require('compression-webpack-plugin')
-
-  webpackConfig.plugins.push(
-    new CompressionWebpackPlugin({
-      asset: '[path].gz[query]',
-      algorithm: 'gzip',
-      test: new RegExp(
-        '\\.(' +
-        config.build.productionGzipExtensions.join('|') +
-        ')$'
-      ),
-      threshold: 10240,
-      minRatio: 0.8
-    })
-  )
-}
-
-if (config.build.bundleAnalyzerReport) {
-  const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
-  webpackConfig.plugins.push(new BundleAnalyzerPlugin())
-}
-
-module.exports = webpackConfig

+ 0 - 47
index.html

@@ -1,47 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-  <meta charset="utf-8">
-  <meta name="viewport" content="width=device-width,initial-scale=1.0">
-  <title>client-trace</title>
-
-  <link rel="stylesheet" type="text/css" href="./bootstrap/css/bootstrap.min.css">
-  <link rel="stylesheet" type="text/css" href="./bootstrap/css/bootstrap-dialog.min.css">
-  <link rel="stylesheet" type="text/css" href="./bootstrap-treeview/bootstrap-treeview.css">
-  <!-- 由于字体不能正常的加载,已经使用require css的方式,在main.js中,使用webpack加载css -->
-  <link rel="stylesheet" type="text/css" href="./summernote-0.8.18/summernote.min.css">
-
-  <link rel="stylesheet" type="text/css" href="./dhtmlxgantt/dhtmlxgantt.css">
-
-  <script src="./bootstrap/js/jquery.min.js"></script>
-  <script src="./bootstrap/js/jquery.cookie.js"></script>
-
-  <script src="./moment/moment.min.js"></script>
-  <script src="./moment/moment.zh-cn.js"></script>
-
-  <script src="./bootstrap/js/bootstrap.js"></script>
-  <script src="./bootstrap/js/bootstrap-dialog.min.js"></script>
-
-  <script src="./bootstrap-treeview/bootstrap-treeview.js"></script>
-  <script src="./summernote-0.8.18/summernote.min.js"></script>
-  <script src="./summernote-0.8.18/lang/summernote-zh-CN.min.js"></script>
-
-  <script src="./dhtmlxgantt/dhtmlxgantt.js"></script>
-  <script src="./dhtmlxgantt/locale/locale_cn.js"></script>
-  <script src="./dhtmlxgantt/ext/dhtmlxgantt_auto_scheduling.js"></script>
-  <script src="./dhtmlxgantt/ext/dhtmlxgantt_smart_rendering.js"></script>
-  <script src="./dhtmlxgantt/ext/dhtmlxgantt_undo.js"></script>
-  <script src="./dhtmlxgantt/ext/dhtmlxgantt_fullscreen.js"></script>
-  <script src="./dhtmlxgantt/ext/api.js"></script>
-  
-</head>
-
-<body>
-  <div id="app-client-trace"></div>
-
-  <!-- built files will be auto injected -->
-  <script type="module" src="/src/main.js"></script>
-</body>
-
-</html>

Fișier diff suprimat deoarece este prea mare
+ 261 - 391
package-lock.json


+ 24 - 26
package.json

@@ -1,26 +1,24 @@
 {
   "name": "client-trace-v3",
-  "version": "1.0.0",
   "description": "client-trace-v3",
+  "version": "1.0.0",
   "author": "yangzhijie <yangzhijie1488@163.com>",
-  "private": true,
   "scripts": {
-    "dev-vite": "vite",
     "dev": "webpack serve --config ./webpack.dev.js",
     "build": "cross-env NODE_ENV=production webpack --mode=production --config ./webpack.prod.js --progress"
   },
-  "dependencies": {
-    "@riophae/vue-treeselect": "^0.4.0",
-    "ant-design-vue": "^3.0.0-beta.6",
-    "gantt": "^3.1.1",
-    "pc-component-v3": "^1.0.32",
+  "files": [
+    "package.json",
+    "dist"
+  ],
+  "peerDependencies": {
+    "ant-design-vue": "^3.2.15",
+    "moment": "^2.29.4",
+    "pc-component-v3": "^1.0.45",
     "v-tooltip": "^4.0.0-beta.17",
-    "vue": "^3.2.31",
-    "vue-dompurify-html": "^2.5.0",
-    "vue-i18n": "^9.1.9",
-    "vue-router": "^4.0.13",
-    "vue-select": "^4.0.0-beta.3",
-    "vuedraggable": "^4.1.0"
+    "vue-select": "^4.0.0-beta.6",
+    "vuedraggable": "^4.1.0",
+    "gantt": "^3.1.1"
   },
   "devDependencies": {
     "@babel/core": "^7.17.5",
@@ -28,6 +26,8 @@
     "@babel/preset-env": "^7.16.11",
     "@vitejs/plugin-vue": "^2.3.3",
     "babel-loader": "^8.2.3",
+    "clean-webpack-plugin": "^4.0.0",
+    "copy-webpack-plugin": "^11.0.0",
     "cross-env": "^7.0.3",
     "css-loader": "^6.7.0",
     "eslint": "^8.10.0",
@@ -37,22 +37,20 @@
     "html-webpack-plugin": "^5.5.0",
     "mini-css-extract-plugin": "^2.6.0",
     "style-loader": "^3.3.1",
-    "vite": "^2.9.9",
-    "vite-plugin-externals": "^0.5.0",
-    "vite-plugin-qiankun": "^1.0.14",
+    "terser-webpack-plugin": "^5.3.6",
     "vue-loader": "^17.0.0",
     "webpack": "^5.70.0",
+    "webpack-bundle-analyzer": "^4.7.0",
     "webpack-cli": "^4.9.2",
     "webpack-dev-server": "^4.7.4",
     "webpack-merge": "^5.8.0"
   },
-  "engines": {
-    "node": ">= 6.0.0",
-    "npm": ">= 3.0.0"
+  "publishConfig": {
+    "access": "public",
+    "registry": "http://wuzhixin.vip:4873/"
   },
-  "browserslist": [
-    "> 1%",
-    "last 2 versions",
-    "not ie <= 8"
-  ]
-}
+  "repository": {
+    "type": "http",
+    "url": "http://prodog.leanwo.com:3000/prodog-client-2023/client-eam-v3.git"
+  }
+}

+ 33 - 28
public/index.html

@@ -6,35 +6,40 @@
   <meta name="viewport" content="width=device-width,initial-scale=1.0">
   <title>client-trace</title>
 
-  <link rel="stylesheet" type="text/css" href="./bootstrap/css/bootstrap.min.css">
-  <link rel="stylesheet" type="text/css" href="./bootstrap/css/bootstrap-dialog.min.css">
-  <link rel="stylesheet" type="text/css" href="./bootstrap-treeview/bootstrap-treeview.css">
-  <!-- 由于字体不能正常的加载,已经使用require css的方式,在main.js中,使用webpack加载css -->
-  <link rel="stylesheet" type="text/css" href="./summernote-0.8.18/summernote.min.css">
-
-  <link rel="stylesheet" type="text/css" href="./dhtmlxgantt/dhtmlxgantt.css">
-
-  <script src="./bootstrap/js/jquery.min.js"></script>
-  <script src="./bootstrap/js/jquery.cookie.js"></script>
-
-  <script src="./moment/moment.min.js"></script>
-  <script src="./moment/moment.zh-cn.js"></script>
-
-  <script src="./bootstrap/js/bootstrap.js"></script>
-  <script src="./bootstrap/js/bootstrap-dialog.min.js"></script>
-
-  <script src="./bootstrap-treeview/bootstrap-treeview.js"></script>
-  <script src="./summernote-0.8.18/summernote.min.js"></script>
-  <script src="./summernote-0.8.18/lang/summernote-zh-CN.min.js"></script>
-
-  <script src="./dhtmlxgantt/dhtmlxgantt.js"></script>
-  <script src="./dhtmlxgantt/locale/locale_cn.js"></script>
-  <script src="./dhtmlxgantt/ext/dhtmlxgantt_auto_scheduling.js"></script>
-  <script src="./dhtmlxgantt/ext/dhtmlxgantt_smart_rendering.js"></script>
-  <script src="./dhtmlxgantt/ext/dhtmlxgantt_undo.js"></script>
-  <script src="./dhtmlxgantt/ext/dhtmlxgantt_fullscreen.js"></script>
-  <script src="./dhtmlxgantt/ext/api.js"></script>
+	<link nonce="*NONCE_TOKEN_CSS*" rel="stylesheet" type="text/css" href="/static/bootstrap/dist/css/bootstrap.css">
+	<link nonce="*NONCE_TOKEN_CSS*" rel="stylesheet" type="text/css" href="/static/bootstrap/dist/css//bootstrap-theme.min.css">
+	<link nonce="*NONCE_TOKEN_CSS*" rel="stylesheet" type="text/css" href="/static/bootstrap3-dialog/dist/css/bootstrap-dialog.css">
   
+  <link rel="stylesheet" type="text/css" href="/static/bootstrap-treeview/bootstrap-treeview.css">
+  <link rel="stylesheet" type="text/css" href="/static/summernote/dist/summernote.min.css">
+
+  <link rel="stylesheet" type="text/css" href="/static/dhtmlxgantt/dhtmlxgantt.css">
+
+	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/jquery/dist/jquery.js"></script>
+	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/jquery.cookie/jquery.cookie.js"></script>
+
+	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/moment/moment.js"></script>
+	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/moment/locale/zh-cn.js"></script>
+
+	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/bootstrap/dist/js/bootstrap.js"></script>
+	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/bootstrap3-dialog/dist/js/bootstrap-dialog.js"></script>
+  
+  <script src="/static/bootstrap-treeview/bootstrap-treeview.js"></script>
+  <script src="/static/summernote/dist/summernote.min.js"></script>
+  <script src="/static/summernote/dist/lang/summernote-zh-CN.min.js"></script>
+
+  <script src="/static/dhtmlxgantt/dhtmlxgantt.js"></script>
+  <script src="/static/dhtmlxgantt/locale/locale_cn.js"></script>
+  <script src="/static/dhtmlxgantt/ext/dhtmlxgantt_auto_scheduling.js"></script>
+  <script src="/static/dhtmlxgantt/ext/dhtmlxgantt_smart_rendering.js"></script>
+  <script src="/static/dhtmlxgantt/ext/dhtmlxgantt_undo.js"></script>
+  <script src="/static/dhtmlxgantt/ext/dhtmlxgantt_fullscreen.js"></script>
+  <script src="/static/dhtmlxgantt/ext/api.js"></script>
+  
+	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/vue/dist/vue.global.js"></script>
+	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/vue-i18n/dist/vue-i18n.global.js"></script>
+	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/vuex/dist/vuex.global.js"></script>
+	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/vue-router/dist/vue-router.global.js"></script>
 </head>
 
 <body>

+ 7 - 78
src/main.js

@@ -1,8 +1,3 @@
-// The Vue build version to load with the `import` command
-// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
-import './public-path.js';
-import { renderWithQiankun, qiankunWindow } from 'vite-plugin-qiankun/dist/helper';
-
 import { createApp } from 'vue';
 import { createRouter, createWebHashHistory } from 'vue-router';
 import { createI18n } from 'vue-i18n';
@@ -10,8 +5,8 @@ import App from './App.vue';
 
 import routes from './router/index.js';
 import PcClientComponent from 'pc-component-v3';
+import 'pc-component-v3/dist/pc-component-v3.css';
 
-import VueDOMPurifyHTML from 'vue-dompurify-html';
 
 import Antd from 'ant-design-vue';
 
@@ -44,75 +39,9 @@ let router = createRouter({
   routes: routes,
 });
 
-function render(props = {}) {
-  const { container } = props;
-
-  instance = createApp(App);
-  instance.use(i18n);
-  instance.use(Antd);
-  instance.use(router);
-  instance.use(PcClientComponent);
-  instance.use(VueDOMPurifyHTML);
-  instance.mount(container ? container.querySelector('#app-client-trace') : '#app-client-trace');
-}
-
-/**
- * bootstrap 只会在微应用初始化的时候调用一次,下次微应用重新进入时会直接调用 mount 钩子,不会再重复触发 bootstrap。
- * 通常我们可以在这里做一些全局变量的初始化,比如不会在 unmount 阶段被销毁的应用级别的缓存等。
- */
-export async function bootstrap() {
-  console.log('[client-trace-v3] bootstraped');
-}
-
-/**
- * 应用每次进入都会调用 mount 方法,通常我们在这里触发应用的渲染方法
- */
-export async function mount(props) {
-  console.log('[client-trace-v3] props from main framework', props);
- 
-  render(props);
-  instance.config.globalProperties.$onGlobalStateChange = props.onGlobalStateChange;
-  instance.config.globalProperties.$setGlobalState = props.setGlobalState;
-}
-
-/**
- * 应用每次 切出/卸载 会调用的方法,通常在这里我们会卸载微应用的应用实例
- */
-export async function unmount() {
-  instance.unmount();
-  instance._container.innerHTML = '';
-  instance = null;
-}
-
-
-
-
-// vite 环境下 
-renderWithQiankun({
-  mount(props) {
-    console.log('[client-trace-v3] props from main framework', props);
-    render(props);
-    instance.config.globalProperties.$onGlobalStateChange = props.onGlobalStateChange;
-    instance.config.globalProperties.$setGlobalState = props.setGlobalState;
-  },
-  bootstrap() {
-    console.log('[client-trace-v3] bootstraped');
-  },
-  unmount(props) {
-    instance.unmount();
-    instance._container.innerHTML = '';
-    instance = null;
-  },
-});
-
-
-if (!qiankunWindow.__POWERED_BY_QIANKUN__) {
-  // vite 环境下
-  render({});
-}
-
-// webpack 环境下
-// 独立运行时
-// if (!window.__POWERED_BY_QIANKUN__) {
-//   render();
-// }
+instance = createApp(App);
+instance.use(i18n);
+instance.use(Antd);
+instance.use(router);
+instance.use(PcClientComponent);
+instance.mount('#app-client-trace');

+ 0 - 3
src/public-path.js

@@ -1,3 +0,0 @@
-if (window.__POWERED_BY_QIANKUN__) {
-  __webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;
-}

+ 1 - 1
src/trace/ProjectArchive.vue

@@ -417,7 +417,7 @@
 <script type="text/javascript">
 
 import Common from '../common/Common.js';
-
+import { Notify } from 'pc-component-v3';
 import UpladFile from '../widget/UpladFile.js';
 
 

+ 1 - 1
src/trace/ProjectUserList.vue

@@ -80,7 +80,7 @@
 
 import Common from '../common/Common.js';
 import { Uuid } from 'pc-component-v3';
-
+import { Notify } from 'pc-component-v3';
 
 export default {
   components: {

+ 1 - 1
src/trace/TraceAttachment.vue

@@ -38,7 +38,7 @@
 import Common from '../common/Common.js';
 
 import { DownloadService } from 'pc-component-v3';
-
+import { Notify } from 'pc-component-v3';
 
 export default {
   components: {

+ 1 - 1
src/trace/TraceCommentCreate.vue

@@ -62,7 +62,7 @@
 import UpladFile from '../widget/UpladFile.js';
 
 import Common from '../common/Common.js';
-
+import { Notify } from 'pc-component-v3';
 import { DownloadService } from 'pc-component-v3';
 
 export default {

+ 1 - 1
src/trace/TraceCommentEdit.vue

@@ -50,7 +50,7 @@
 import UpladFile from '../widget/UpladFile.js';
 
 import Common from '../common/Common.js';
-
+import { Notify } from 'pc-component-v3';
 import { DownloadService } from 'pc-component-v3';
 
 export default {

+ 1 - 1
src/trace/TraceConfig.vue

@@ -21,7 +21,7 @@
 
 <script>
 import Common from '../common/Common.js';
-
+import { Notify } from 'pc-component-v3';
 
 export default {
 

+ 1 - 1
src/trace/TraceCreate.vue

@@ -99,7 +99,7 @@ import UpladFile from '../widget/UpladFile.js';
 
 
 
-
+import { Notify } from 'pc-component-v3';
 import Treeselect from '../widget/TreeSelect.vue';
 import ATreeselect from '../widget/ATreeSelect.vue';
 import AudioField from '../widget/AudioField.vue';

+ 1 - 1
src/trace/TraceDynamic.vue

@@ -98,7 +98,7 @@ import TraceCommon from './TraceCommon.js';
 
 import TraceHeader from './TraceHeader.vue';
 ;
-
+import { Notify } from 'pc-component-v3';
 // import VueSimpleSuggest from 'vue-simple-suggest';
 
 export default {

+ 1 - 1
src/trace/TraceName.vue

@@ -132,7 +132,7 @@ import TraceAttachment from './TraceAttachment.vue';
 
 
 import AudioField from '../widget/AudioField.vue';
-
+import { Notify } from 'pc-component-v3';
 export default {
   components: {
     TraceLog,

+ 1 - 1
src/trace/TraceTimeLine.vue

@@ -72,7 +72,7 @@
 import Common from '../common/Common.js';
 import TraceCommon from './TraceCommon.js';
 import { Uuid } from 'pc-component-v3';
-
+import { Notify } from 'pc-component-v3';
 import MyProgress from '../widget/MyProgress.vue';
 
 export default {

+ 1 - 1
src/trace/TraceTimeLineCreate.vue

@@ -65,7 +65,7 @@
 
 
 
-
+import { Notify } from 'pc-component-v3';
 import Common from '../common/Common.js';
 
 export default {

+ 1 - 1
src/trace/TraceTimeLineEdit.vue

@@ -68,7 +68,7 @@
 
 
 
-
+import { Notify } from 'pc-component-v3';
 import Common from '../common/Common.js';
 
 export default {

+ 1 - 1
src/trace/TraceUpdate.vue

@@ -100,7 +100,7 @@ import Common from '../common/Common.js';
 import UpladFile from '../widget/UpladFile.js';
 import TraceCommon from './TraceCommon.js';
 
-
+import { Notify } from 'pc-component-v3';
 
 import Treeselect from '../widget/TreeSelect.vue';
 import AudioField from '../widget/AudioField.vue';

+ 1 - 1
src/widget/GanttScale2.vue

@@ -51,7 +51,7 @@
 import Common from '../common/Common.js';
 
 import gantt from 'gantt';
-
+import { Notify } from 'pc-component-v3';
 
 
 export default {

+ 0 - 74
vite.config.js

@@ -1,74 +0,0 @@
-import { defineConfig } from 'vite';
-import vue from '@vitejs/plugin-vue';
-import qiankun from 'vite-plugin-qiankun';
-import { viteExternalsPlugin } from 'vite-plugin-externals';
-
-// useDevMode 开启时与热更新插件冲突,使用变量切换
-const useDevMode = true;
-
-// https://vitejs.dev/config/
-export default defineConfig({
-  plugins: [
-    vue(),
-    viteExternalsPlugin({
-      jquery: 'jquery',
-      moment: 'moment',
-      gantt: 'gantt',
-      // 支持值链式取值,会转换成 window['jquery']['jgrid']
-      //jgrid: ['jQuery', 'jgrid']
-    }),
-    qiankun('client-trace-v3', {
-      useDevMode,
-    }),
-  ],
-  //base: './',
-
-  base: 'http://127.0.0.1:8091/',
-
-  resolve: {
-    extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json'],
-    //alias: [{ find: '@/', replacement: '/src/' }],
-  },
-  // build: {
-  //   target: "esnext",
-  //   lib: {
-  //     name: `client-eam-v3-[name]`,
-  //     entry: path.resolve(__dirname, "src/main.js"),
-  //     formats: ["umd"],
-  //   },
-  // },
-  server: {
-    port: 8091,
-    host: 'localhost',
-    headers: {
-      'Access-Control-Allow-Origin': '*',
-    },
-    proxy: {
-      '/api': {
-        target: 'http://localhost:83/',
-        ws: false,
-        changeOrigin: true,
-      },
-      '/authApi': {
-        target: 'http://localhost:83/',
-        ws: false,
-        changeOrigin: true,
-      },
-      '/Dictionary': {
-        target: 'http://localhost:83/',
-        ws: false,
-        changeOrigin: true,
-      },
-      '/Files': {
-        target: 'http://localhost:83/',
-        ws: false,
-        changeOrigin: true,
-      },
-      '/WebSocket': {
-        target: 'http://localhost:83/',
-        ws: true,
-        changeOrigin: true,
-      },
-    },
-  },
-});

+ 18 - 33
webpack.base.js

@@ -1,5 +1,4 @@
 var path = require('path')
-var webpack = require('webpack')
 const { VueLoaderPlugin } = require('vue-loader')
 const ESLintPlugin = require('eslint-webpack-plugin');
 const MiniCssExtractPlugin = require('mini-css-extract-plugin');
@@ -36,44 +35,28 @@ module.exports = {
         {
           // webpack5 通过资源模块来处理图片
           test: /\.(png|jpg|gif|svg)$/,
-          type: 'asset',
+          type: 'asset/resource',
           parser: {
             dataUrlCondition: {
-                maxSize: 10240
-            }
+              maxSize: 10240,
+            },
           },
           generator: {
-            filename: './asset-image/[name][ext][query]'
-          }
+            filename: './client-trace-v3-image/[name][ext][query]',
+          },
         },
         {
           test: /\.(eot|woff|woff2|ttf)$/,
-          type:"asset/resource",
-          generator:{
-            filename:"./asset-font/[name].[hash:6][ext]"
-          }
-        },
-        {
-          test: /\.md$/,
-          use: [
-              {
-                  loader: "html-loader",
-              },
-              {
-                  loader: "markdown-loader",
-                  options: {
-                      // Pass options to marked
-                      // See https://marked.js.org/using_advanced#options
-                  },
-              },
-          ],
+          type: 'asset/resource',
+          generator: {
+            filename: './client-trace-v3-font/[name].[ext]?[hash]',
+          },
         },
       ]
   },
   resolve: {
 
     alias: {
-      //   'vue$': 'vue/dist/vue.esm.js',
       '@static': path.resolve('static'),
     },
     extensions: ['*', '.js', '.vue', '.json']
@@ -83,13 +66,15 @@ module.exports = {
   },
   
   externals: {
-    jQuery: 'window.$',
-    jquery: 'window.$',
-    bootstrap: 'bootstrap',
-    BootstrapDialog: 'BootstrapDialog',
-    d3: 'd3',
-    echarts: 'echarts',
-    moment: 'moment',
+    'jquery': "window.jquery",
+    'bootstrap': 'bootstrap',
+    'BootstrapDialog': 'BootstrapDialog',
+    'moment': 'moment',
+    'vue': 'Vue',
+    'vue-i18n': 'VueI18n',
+    'vue-router': 'VueRouter',
+    'vuex': 'Vuex',
+    'gantt': 'window.gantt'
   },
   
   plugins: [

+ 69 - 25
webpack.dev.js

@@ -1,13 +1,7 @@
 const path = require('path')
-const webpack = require('webpack')
-const fs = require('fs');
-const MiniCssExtractPlugin = require('mini-css-extract-plugin')
-const { VueLoaderPlugin } = require('vue-loader')
 const HtmlWebpackPlugin = require('html-webpack-plugin');
-const ESLintPlugin = require('eslint-webpack-plugin');
 const WebpackMerge = require('webpack-merge')
 const baseConfig = require('./webpack.base.js')
-const { name } = require('./package');
 
 
 module.exports = WebpackMerge.merge(baseConfig, {
@@ -22,35 +16,85 @@ module.exports = WebpackMerge.merge(baseConfig, {
     main: './src/main.js',
   },
 
-  // output: {
-  //   path: path.resolve(__dirname, '../dist'),
-  //   publicPath: '/',
-  //   filename: 'client-role-v3-[name].js',
-  //   chunkFilename: 'client-role-v3-chunk-[name].js',
-  // },
   output: {
+    path: path.resolve(__dirname, '../dist'),
     publicPath: '/',
-    library: `${name}-[name]`,
-    libraryTarget: 'umd', // 把微应用打包成 umd 库格式
-    // chunkLoadingGlobal: `webpackJsonp_${name}`,
-    chunkFilename: 'trace/client-trace-v3-chunk-[name].js',
+    filename: 'client-trace-v3-[name].js',
+    chunkFilename: 'client-trace-v3-chunk-[name].js',
+  },
+
+  watchOptions: {
+    ignored: ['**/node_modules', '/bat/', '/dist/', '/public/', '/static/', '/test/'],
+    poll: 2000,
   },
 
   devServer: {
     port: 8091,
-    // static: {
-    //   directory: path.join(__dirname, ''),
-    // },
+    compress: false,
     proxy: {
       '/api': {
-          target: 'http://localhost:83/',
-          ws: false,
-          changeOrigin: true
+        target: 'http://localhost:83/',
+        ws: false,
+        changeOrigin: true,
+        secure:true,
+      },
+      '/static': {
+        target: 'http://localhost:83/',
+        ws: false,
+        changeOrigin: true,
+        secure:true,
+      },
+      '/content': {
+        target: 'http://localhost:83/',
+        ws: false,
+        changeOrigin: true,
+        secure:true,
+      },
+      '/dashboard': {
+        target: 'http://localhost:83/',
+        ws: false,
+        changeOrigin: true,
+        secure:true,
+      },
+      '/mock': {
+        target: 'http://localhost:83/',
+        ws: false,
+        changeOrigin: true,
+        secure:true,
       },
       '/authApi': {
-          target: 'http://localhost:83/',
-          ws: false,
-          changeOrigin: true
+        target: 'http://localhost:83/',
+        ws: false,
+        changeOrigin: true,
+        secure:true,
+      },
+      '/Dictionary': {
+        target: 'http://localhost:83/',
+        ws: false,
+        changeOrigin: true,
+        secure:true,
+      },
+      '/Files': {
+        target: 'http://localhost:83/',
+        ws: false,
+        changeOrigin: true,
+        secure:true,
+      },
+      '/WebSocket': {
+        target: 'http://localhost:83/',
+        ws: true,
+        changeOrigin: true,
+      },
+      '/TrainVideo': {
+        target: 'http://localhost:83/',
+        ws: true,
+        changeOrigin: true,
+      },
+      '/gateway-api': {
+        target: 'http://localhost:83/',
+        ws: true,
+        changeOrigin: true,
+        secure:true,
       },
     },
 

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff