fix:各种问题
This commit is contained in:
parent
fd5ae6a55e
commit
a399336d3d
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -100,6 +100,13 @@
|
||||
"title": "我发起的"
|
||||
}
|
||||
},
|
||||
"apaas-custom-myDemo":{
|
||||
"name": "apaas-custom-myDemo",
|
||||
"path": "apaas-custom-myDemo",
|
||||
"meta": {
|
||||
"title": "我的测试"
|
||||
}
|
||||
},
|
||||
"apaas-custom-selfEngineCheck":{
|
||||
"name": "apaas-custom-selfEngineCheck",
|
||||
"path": "apaas-custom-selfEngineCheck",
|
||||
@ -134,6 +141,13 @@
|
||||
"meta": {
|
||||
"title": "权限管理"
|
||||
}
|
||||
},
|
||||
"apaas-custom-checkPersonPermission":{
|
||||
"name": "apaas-custom-checkPersonPermission",
|
||||
"path": "apaas-custom-checkPersonPermission",
|
||||
"meta": {
|
||||
"title": "权限检查"
|
||||
}
|
||||
}
|
||||
},
|
||||
"customWidgetList": [
|
||||
|
||||
BIN
crypto/0971f994c95754494ad9b508d6916c39.zip
Normal file
BIN
crypto/0971f994c95754494ad9b508d6916c39.zip
Normal file
Binary file not shown.
10
crypto/0971f994c95754494ad9b508d6916c39/admin/demo.html
Normal file
10
crypto/0971f994c95754494ad9b508d6916c39/admin/demo.html
Normal file
@ -0,0 +1,10 @@
|
||||
<meta charset="utf-8">
|
||||
<title>0971f994c95754494ad9b508d6916c39 demo</title>
|
||||
<script src="./0971f994c95754494ad9b508d6916c39.umd.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="./0971f994c95754494ad9b508d6916c39.css">
|
||||
|
||||
|
||||
<script>
|
||||
console.log(0971f994c95754494ad9b508d6916c39)
|
||||
</script>
|
||||
279
crypto/0971f994c95754494ad9b508d6916c39/admin/index.common.js
Normal file
279
crypto/0971f994c95754494ad9b508d6916c39/admin/index.common.js
Normal file
@ -0,0 +1,279 @@
|
||||
module.exports =
|
||||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = function(exports) {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // create a fake namespace object
|
||||
/******/ // mode & 1: value is a module id, require it
|
||||
/******/ // mode & 2: merge all properties of value into the ns
|
||||
/******/ // mode & 4: return value when already ns object
|
||||
/******/ // mode & 8|1: behave like require
|
||||
/******/ __webpack_require__.t = function(value, mode) {
|
||||
/******/ if(mode & 1) value = __webpack_require__(value);
|
||||
/******/ if(mode & 8) return value;
|
||||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
||||
/******/ var ns = Object.create(null);
|
||||
/******/ __webpack_require__.r(ns);
|
||||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
||||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
||||
/******/ return ns;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = "fb15");
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ "8875":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
|
||||
// MIT license
|
||||
// source: https://github.com/amiller-gh/currentScript-polyfill
|
||||
|
||||
// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
|
||||
|
||||
(function (root, factory) {
|
||||
if (true) {
|
||||
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
||||
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
||||
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
||||
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
||||
} else {}
|
||||
}(typeof self !== 'undefined' ? self : this, function () {
|
||||
function getCurrentScript () {
|
||||
var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
|
||||
// for chrome
|
||||
if (!descriptor && 'currentScript' in document && document.currentScript) {
|
||||
return document.currentScript
|
||||
}
|
||||
|
||||
// for other browsers with native support for currentScript
|
||||
if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
|
||||
return document.currentScript
|
||||
}
|
||||
|
||||
// IE 8-10 support script readyState
|
||||
// IE 11+ & Firefox support stack trace
|
||||
try {
|
||||
throw new Error();
|
||||
}
|
||||
catch (err) {
|
||||
// Find the second match for the "at" string to get file src url from stack.
|
||||
var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
|
||||
ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
|
||||
stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
|
||||
scriptLocation = (stackDetails && stackDetails[1]) || false,
|
||||
line = (stackDetails && stackDetails[2]) || false,
|
||||
currentLocation = document.location.href.replace(document.location.hash, ''),
|
||||
pageSource,
|
||||
inlineScriptSourceRegExp,
|
||||
inlineScriptSource,
|
||||
scripts = document.getElementsByTagName('script'); // Live NodeList collection
|
||||
|
||||
if (scriptLocation === currentLocation) {
|
||||
pageSource = document.documentElement.outerHTML;
|
||||
inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
|
||||
inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
|
||||
}
|
||||
|
||||
for (var i = 0; i < scripts.length; i++) {
|
||||
// If ready state is interactive, return the script tag
|
||||
if (scripts[i].readyState === 'interactive') {
|
||||
return scripts[i];
|
||||
}
|
||||
|
||||
// If src matches, return the script tag
|
||||
if (scripts[i].src === scriptLocation) {
|
||||
return scripts[i];
|
||||
}
|
||||
|
||||
// If inline source matches, return the script tag
|
||||
if (
|
||||
scriptLocation === currentLocation &&
|
||||
scripts[i].innerHTML &&
|
||||
scripts[i].innerHTML.trim() === inlineScriptSource
|
||||
) {
|
||||
return scripts[i];
|
||||
}
|
||||
}
|
||||
|
||||
// If no match, return null
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
return getCurrentScript
|
||||
}));
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "fb15":
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
// ESM COMPAT FLAG
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
||||
// This file is imported into lib/wc client bundles.
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
var currentScript = window.document.currentScript
|
||||
if (true) {
|
||||
var getCurrentScript = __webpack_require__("8875")
|
||||
currentScript = getCurrentScript()
|
||||
|
||||
// for backward compatibility, because previously we directly included the polyfill
|
||||
if (!('currentScript' in document)) {
|
||||
Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
|
||||
}
|
||||
}
|
||||
|
||||
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
||||
if (src) {
|
||||
__webpack_require__.p = src[1] // eslint-disable-line
|
||||
}
|
||||
}
|
||||
|
||||
// Indicate to webpack that this file can be concatenated
|
||||
/* harmony default export */ var setPublicPath = (null);
|
||||
|
||||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/custom-functions/cubic/cubic.js
|
||||
/*
|
||||
* cubic函数
|
||||
* 求三次方
|
||||
* 接收一个数字类型的参数,并求其三次方并返回
|
||||
*/
|
||||
/* harmony default export */ var cubic = ({
|
||||
// 函数名必须以custom开头,否则无法被解析
|
||||
name: 'customcubic',
|
||||
// 校验函数,用于函数保存前的校验, 可以对参数的个数及类型做限制
|
||||
mockFunction: function mockFunction() {
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
if (!(args && args.length === 1)) {
|
||||
throw new Error('参数长度必须是1个');
|
||||
}
|
||||
if (isNaN(parseFloat(args[0])) || !isFinite(args[0])) {
|
||||
throw new Error('参数类型必须是数字');
|
||||
}
|
||||
},
|
||||
// 执行函数, 接收到参数后的处理方法,必须有返回值
|
||||
executeFunction: function executeFunction() {
|
||||
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
||||
args[_key2] = arguments[_key2];
|
||||
}
|
||||
if (!(args && args.length === 1)) {
|
||||
throw new Error('参数长度必须是1个');
|
||||
}
|
||||
if (isNaN(parseFloat(args[0])) || !isFinite(args[0])) {
|
||||
throw new Error('参数类型必须是数字');
|
||||
}
|
||||
return args[0] * args[0] * args[0];
|
||||
}
|
||||
});
|
||||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/custom-functions/index.js
|
||||
|
||||
/* harmony default export */ var custom_functions = ({
|
||||
Cubic: cubic
|
||||
});
|
||||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/admin.js
|
||||
|
||||
var admin_install = function install(_ref, hookManager, definition) {
|
||||
var RuleEngine = _ref.RuleEngine;
|
||||
if (!RuleEngine) {
|
||||
console.error('x-extension上下文中没有注册RuleEngine, 请检查');
|
||||
return;
|
||||
}
|
||||
Object.keys(custom_functions).forEach(function (funcKey) {
|
||||
var func = custom_functions[funcKey];
|
||||
if (func && func.name && func.executeFunction && func.executeFunction instanceof Function) {
|
||||
if (func.name.indexOf('custom') !== 0) {
|
||||
console.error("\u81EA\u5B9A\u4E49\u51FD\u6570-".concat(func.name, " \u540D\u79F0\u6709\u8BEF\uFF0C\u8BF7\u4EE5custom\u5F00\u5934"));
|
||||
return;
|
||||
}
|
||||
RuleEngine.getInstance().registerContextMethod(func.name, func);
|
||||
} else {
|
||||
console.error("\u8BF7\u68C0\u67E5".concat(func && func.name, "\u7684\u89C4\u5219\u51FD\u6570\u5B9A\u4E49"));
|
||||
}
|
||||
});
|
||||
};
|
||||
/* harmony default export */ var admin = ({
|
||||
install: admin_install
|
||||
});
|
||||
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
||||
|
||||
|
||||
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (admin);
|
||||
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
289
crypto/0971f994c95754494ad9b508d6916c39/admin/index.umd.js
Normal file
289
crypto/0971f994c95754494ad9b508d6916c39/admin/index.umd.js
Normal file
@ -0,0 +1,289 @@
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory();
|
||||
else if(typeof define === 'function' && define.amd)
|
||||
define([], factory);
|
||||
else if(typeof exports === 'object')
|
||||
exports["0971f994c95754494ad9b508d6916c39"] = factory();
|
||||
else
|
||||
root["0971f994c95754494ad9b508d6916c39"] = factory();
|
||||
})((typeof self !== 'undefined' ? self : this), function() {
|
||||
return /******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = function(exports) {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // create a fake namespace object
|
||||
/******/ // mode & 1: value is a module id, require it
|
||||
/******/ // mode & 2: merge all properties of value into the ns
|
||||
/******/ // mode & 4: return value when already ns object
|
||||
/******/ // mode & 8|1: behave like require
|
||||
/******/ __webpack_require__.t = function(value, mode) {
|
||||
/******/ if(mode & 1) value = __webpack_require__(value);
|
||||
/******/ if(mode & 8) return value;
|
||||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
||||
/******/ var ns = Object.create(null);
|
||||
/******/ __webpack_require__.r(ns);
|
||||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
||||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
||||
/******/ return ns;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = "fb15");
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ "8875":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
|
||||
// MIT license
|
||||
// source: https://github.com/amiller-gh/currentScript-polyfill
|
||||
|
||||
// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
|
||||
|
||||
(function (root, factory) {
|
||||
if (true) {
|
||||
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
||||
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
||||
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
||||
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
||||
} else {}
|
||||
}(typeof self !== 'undefined' ? self : this, function () {
|
||||
function getCurrentScript () {
|
||||
var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
|
||||
// for chrome
|
||||
if (!descriptor && 'currentScript' in document && document.currentScript) {
|
||||
return document.currentScript
|
||||
}
|
||||
|
||||
// for other browsers with native support for currentScript
|
||||
if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
|
||||
return document.currentScript
|
||||
}
|
||||
|
||||
// IE 8-10 support script readyState
|
||||
// IE 11+ & Firefox support stack trace
|
||||
try {
|
||||
throw new Error();
|
||||
}
|
||||
catch (err) {
|
||||
// Find the second match for the "at" string to get file src url from stack.
|
||||
var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
|
||||
ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
|
||||
stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
|
||||
scriptLocation = (stackDetails && stackDetails[1]) || false,
|
||||
line = (stackDetails && stackDetails[2]) || false,
|
||||
currentLocation = document.location.href.replace(document.location.hash, ''),
|
||||
pageSource,
|
||||
inlineScriptSourceRegExp,
|
||||
inlineScriptSource,
|
||||
scripts = document.getElementsByTagName('script'); // Live NodeList collection
|
||||
|
||||
if (scriptLocation === currentLocation) {
|
||||
pageSource = document.documentElement.outerHTML;
|
||||
inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
|
||||
inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
|
||||
}
|
||||
|
||||
for (var i = 0; i < scripts.length; i++) {
|
||||
// If ready state is interactive, return the script tag
|
||||
if (scripts[i].readyState === 'interactive') {
|
||||
return scripts[i];
|
||||
}
|
||||
|
||||
// If src matches, return the script tag
|
||||
if (scripts[i].src === scriptLocation) {
|
||||
return scripts[i];
|
||||
}
|
||||
|
||||
// If inline source matches, return the script tag
|
||||
if (
|
||||
scriptLocation === currentLocation &&
|
||||
scripts[i].innerHTML &&
|
||||
scripts[i].innerHTML.trim() === inlineScriptSource
|
||||
) {
|
||||
return scripts[i];
|
||||
}
|
||||
}
|
||||
|
||||
// If no match, return null
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
return getCurrentScript
|
||||
}));
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "fb15":
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
// ESM COMPAT FLAG
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
||||
// This file is imported into lib/wc client bundles.
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
var currentScript = window.document.currentScript
|
||||
if (true) {
|
||||
var getCurrentScript = __webpack_require__("8875")
|
||||
currentScript = getCurrentScript()
|
||||
|
||||
// for backward compatibility, because previously we directly included the polyfill
|
||||
if (!('currentScript' in document)) {
|
||||
Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
|
||||
}
|
||||
}
|
||||
|
||||
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
||||
if (src) {
|
||||
__webpack_require__.p = src[1] // eslint-disable-line
|
||||
}
|
||||
}
|
||||
|
||||
// Indicate to webpack that this file can be concatenated
|
||||
/* harmony default export */ var setPublicPath = (null);
|
||||
|
||||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/custom-functions/cubic/cubic.js
|
||||
/*
|
||||
* cubic函数
|
||||
* 求三次方
|
||||
* 接收一个数字类型的参数,并求其三次方并返回
|
||||
*/
|
||||
/* harmony default export */ var cubic = ({
|
||||
// 函数名必须以custom开头,否则无法被解析
|
||||
name: 'customcubic',
|
||||
// 校验函数,用于函数保存前的校验, 可以对参数的个数及类型做限制
|
||||
mockFunction: function mockFunction() {
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
if (!(args && args.length === 1)) {
|
||||
throw new Error('参数长度必须是1个');
|
||||
}
|
||||
if (isNaN(parseFloat(args[0])) || !isFinite(args[0])) {
|
||||
throw new Error('参数类型必须是数字');
|
||||
}
|
||||
},
|
||||
// 执行函数, 接收到参数后的处理方法,必须有返回值
|
||||
executeFunction: function executeFunction() {
|
||||
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
||||
args[_key2] = arguments[_key2];
|
||||
}
|
||||
if (!(args && args.length === 1)) {
|
||||
throw new Error('参数长度必须是1个');
|
||||
}
|
||||
if (isNaN(parseFloat(args[0])) || !isFinite(args[0])) {
|
||||
throw new Error('参数类型必须是数字');
|
||||
}
|
||||
return args[0] * args[0] * args[0];
|
||||
}
|
||||
});
|
||||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/custom-functions/index.js
|
||||
|
||||
/* harmony default export */ var custom_functions = ({
|
||||
Cubic: cubic
|
||||
});
|
||||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/admin.js
|
||||
|
||||
var admin_install = function install(_ref, hookManager, definition) {
|
||||
var RuleEngine = _ref.RuleEngine;
|
||||
if (!RuleEngine) {
|
||||
console.error('x-extension上下文中没有注册RuleEngine, 请检查');
|
||||
return;
|
||||
}
|
||||
Object.keys(custom_functions).forEach(function (funcKey) {
|
||||
var func = custom_functions[funcKey];
|
||||
if (func && func.name && func.executeFunction && func.executeFunction instanceof Function) {
|
||||
if (func.name.indexOf('custom') !== 0) {
|
||||
console.error("\u81EA\u5B9A\u4E49\u51FD\u6570-".concat(func.name, " \u540D\u79F0\u6709\u8BEF\uFF0C\u8BF7\u4EE5custom\u5F00\u5934"));
|
||||
return;
|
||||
}
|
||||
RuleEngine.getInstance().registerContextMethod(func.name, func);
|
||||
} else {
|
||||
console.error("\u8BF7\u68C0\u67E5".concat(func && func.name, "\u7684\u89C4\u5219\u51FD\u6570\u5B9A\u4E49"));
|
||||
}
|
||||
});
|
||||
};
|
||||
/* harmony default export */ var admin = ({
|
||||
install: admin_install
|
||||
});
|
||||
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
||||
|
||||
|
||||
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (admin);
|
||||
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
});
|
||||
1
crypto/0971f994c95754494ad9b508d6916c39/admin/index.umd.min.js
vendored
Normal file
1
crypto/0971f994c95754494ad9b508d6916c39/admin/index.umd.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["0971f994c95754494ad9b508d6916c39"]=t():e["0971f994c95754494ad9b508d6916c39"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({8875:function(e,t,n){var r,o,c;(function(n,i){o=[],r=i,c="function"===typeof r?r.apply(t,o):r,void 0===c||(e.exports=c)})("undefined"!==typeof self&&self,(function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(p){var n,r,o,c=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,i=/@([^@]*):(\d+):(\d+)\s*$/gi,u=c.exec(p.stack)||i.exec(p.stack),f=u&&u[1]||!1,a=u&&u[2]||!1,d=document.location.href.replace(document.location.hash,""),l=document.getElementsByTagName("script");f===d&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(a-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=n.replace(r,"$1").trim());for(var s=0;s<l.length;s++){if("interactive"===l[s].readyState)return l[s];if(l[s].src===f)return l[s];if(f===d&&l[s].innerHTML&&l[s].innerHTML.trim()===o)return l[s]}return null}}return e}))},fb15:function(e,t,n){"use strict";if(n.r(t),"undefined"!==typeof window){var r=window.document.currentScript,o=n("8875");r=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o});var c=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);c&&(n.p=c[1])}var i={name:"customcubic",mockFunction:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t||1!==t.length)throw new Error("参数长度必须是1个");if(isNaN(parseFloat(t[0]))||!isFinite(t[0]))throw new Error("参数类型必须是数字")},executeFunction:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t||1!==t.length)throw new Error("参数长度必须是1个");if(isNaN(parseFloat(t[0]))||!isFinite(t[0]))throw new Error("参数类型必须是数字");return t[0]*t[0]*t[0]}},u={Cubic:i},f=function(e,t,n){var r=e.RuleEngine;r?Object.keys(u).forEach((function(e){var t=u[e];if(t&&t.name&&t.executeFunction&&t.executeFunction instanceof Function){if(0!==t.name.indexOf("custom"))return void console.error("自定义函数-".concat(t.name," 名称有误,请以custom开头"));r.getInstance().registerContextMethod(t.name,t)}else console.error("请检查".concat(t&&t.name,"的规则函数定义"))})):console.error("x-extension上下文中没有注册RuleEngine, 请检查")},a={install:f};t["default"]=a}})}));
|
||||
16
crypto/0971f994c95754494ad9b508d6916c39/apaas.json
Normal file
16
crypto/0971f994c95754494ad9b508d6916c39/apaas.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"copyAssets": [
|
||||
"public/custom/apaas-custom-plugin-custom-rule"
|
||||
],
|
||||
"code": "PLUGIN_CUSTOM_RULE",
|
||||
"name": "自开发规则",
|
||||
"description": "自开发规则集成",
|
||||
"extraConfig": {
|
||||
"admin": true,
|
||||
"adminCss": false,
|
||||
"app": true,
|
||||
"appCss": false,
|
||||
"mobile": true,
|
||||
"mobileCss": false
|
||||
}
|
||||
}
|
||||
10
crypto/0971f994c95754494ad9b508d6916c39/app/demo.html
Normal file
10
crypto/0971f994c95754494ad9b508d6916c39/app/demo.html
Normal file
@ -0,0 +1,10 @@
|
||||
<meta charset="utf-8">
|
||||
<title>0971f994c95754494ad9b508d6916c39 demo</title>
|
||||
<script src="./0971f994c95754494ad9b508d6916c39.umd.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="./0971f994c95754494ad9b508d6916c39.css">
|
||||
|
||||
|
||||
<script>
|
||||
console.log(0971f994c95754494ad9b508d6916c39)
|
||||
</script>
|
||||
279
crypto/0971f994c95754494ad9b508d6916c39/app/index.common.js
Normal file
279
crypto/0971f994c95754494ad9b508d6916c39/app/index.common.js
Normal file
@ -0,0 +1,279 @@
|
||||
module.exports =
|
||||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = function(exports) {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // create a fake namespace object
|
||||
/******/ // mode & 1: value is a module id, require it
|
||||
/******/ // mode & 2: merge all properties of value into the ns
|
||||
/******/ // mode & 4: return value when already ns object
|
||||
/******/ // mode & 8|1: behave like require
|
||||
/******/ __webpack_require__.t = function(value, mode) {
|
||||
/******/ if(mode & 1) value = __webpack_require__(value);
|
||||
/******/ if(mode & 8) return value;
|
||||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
||||
/******/ var ns = Object.create(null);
|
||||
/******/ __webpack_require__.r(ns);
|
||||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
||||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
||||
/******/ return ns;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = "fb15");
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ "8875":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
|
||||
// MIT license
|
||||
// source: https://github.com/amiller-gh/currentScript-polyfill
|
||||
|
||||
// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
|
||||
|
||||
(function (root, factory) {
|
||||
if (true) {
|
||||
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
||||
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
||||
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
||||
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
||||
} else {}
|
||||
}(typeof self !== 'undefined' ? self : this, function () {
|
||||
function getCurrentScript () {
|
||||
var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
|
||||
// for chrome
|
||||
if (!descriptor && 'currentScript' in document && document.currentScript) {
|
||||
return document.currentScript
|
||||
}
|
||||
|
||||
// for other browsers with native support for currentScript
|
||||
if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
|
||||
return document.currentScript
|
||||
}
|
||||
|
||||
// IE 8-10 support script readyState
|
||||
// IE 11+ & Firefox support stack trace
|
||||
try {
|
||||
throw new Error();
|
||||
}
|
||||
catch (err) {
|
||||
// Find the second match for the "at" string to get file src url from stack.
|
||||
var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
|
||||
ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
|
||||
stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
|
||||
scriptLocation = (stackDetails && stackDetails[1]) || false,
|
||||
line = (stackDetails && stackDetails[2]) || false,
|
||||
currentLocation = document.location.href.replace(document.location.hash, ''),
|
||||
pageSource,
|
||||
inlineScriptSourceRegExp,
|
||||
inlineScriptSource,
|
||||
scripts = document.getElementsByTagName('script'); // Live NodeList collection
|
||||
|
||||
if (scriptLocation === currentLocation) {
|
||||
pageSource = document.documentElement.outerHTML;
|
||||
inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
|
||||
inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
|
||||
}
|
||||
|
||||
for (var i = 0; i < scripts.length; i++) {
|
||||
// If ready state is interactive, return the script tag
|
||||
if (scripts[i].readyState === 'interactive') {
|
||||
return scripts[i];
|
||||
}
|
||||
|
||||
// If src matches, return the script tag
|
||||
if (scripts[i].src === scriptLocation) {
|
||||
return scripts[i];
|
||||
}
|
||||
|
||||
// If inline source matches, return the script tag
|
||||
if (
|
||||
scriptLocation === currentLocation &&
|
||||
scripts[i].innerHTML &&
|
||||
scripts[i].innerHTML.trim() === inlineScriptSource
|
||||
) {
|
||||
return scripts[i];
|
||||
}
|
||||
}
|
||||
|
||||
// If no match, return null
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
return getCurrentScript
|
||||
}));
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "fb15":
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
// ESM COMPAT FLAG
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
||||
// This file is imported into lib/wc client bundles.
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
var currentScript = window.document.currentScript
|
||||
if (true) {
|
||||
var getCurrentScript = __webpack_require__("8875")
|
||||
currentScript = getCurrentScript()
|
||||
|
||||
// for backward compatibility, because previously we directly included the polyfill
|
||||
if (!('currentScript' in document)) {
|
||||
Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
|
||||
}
|
||||
}
|
||||
|
||||
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
||||
if (src) {
|
||||
__webpack_require__.p = src[1] // eslint-disable-line
|
||||
}
|
||||
}
|
||||
|
||||
// Indicate to webpack that this file can be concatenated
|
||||
/* harmony default export */ var setPublicPath = (null);
|
||||
|
||||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/custom-functions/cubic/cubic.js
|
||||
/*
|
||||
* cubic函数
|
||||
* 求三次方
|
||||
* 接收一个数字类型的参数,并求其三次方并返回
|
||||
*/
|
||||
/* harmony default export */ var cubic = ({
|
||||
// 函数名必须以custom开头,否则无法被解析
|
||||
name: 'customcubic',
|
||||
// 校验函数,用于函数保存前的校验, 可以对参数的个数及类型做限制
|
||||
mockFunction: function mockFunction() {
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
if (!(args && args.length === 1)) {
|
||||
throw new Error('参数长度必须是1个');
|
||||
}
|
||||
if (isNaN(parseFloat(args[0])) || !isFinite(args[0])) {
|
||||
throw new Error('参数类型必须是数字');
|
||||
}
|
||||
},
|
||||
// 执行函数, 接收到参数后的处理方法,必须有返回值
|
||||
executeFunction: function executeFunction() {
|
||||
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
||||
args[_key2] = arguments[_key2];
|
||||
}
|
||||
if (!(args && args.length === 1)) {
|
||||
throw new Error('参数长度必须是1个');
|
||||
}
|
||||
if (isNaN(parseFloat(args[0])) || !isFinite(args[0])) {
|
||||
throw new Error('参数类型必须是数字');
|
||||
}
|
||||
return args[0] * args[0] * args[0];
|
||||
}
|
||||
});
|
||||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/custom-functions/index.js
|
||||
|
||||
/* harmony default export */ var custom_functions = ({
|
||||
Cubic: cubic
|
||||
});
|
||||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/app.js
|
||||
|
||||
var app_install = function install(_ref, hookManager, definition) {
|
||||
var RuleEngine = _ref.RuleEngine;
|
||||
if (!RuleEngine) {
|
||||
console.error('x-extension上下文中没有注册RuleEngine, 请检查');
|
||||
return;
|
||||
}
|
||||
Object.keys(custom_functions).forEach(function (funcKey) {
|
||||
var func = custom_functions[funcKey];
|
||||
if (func && func.name && func.executeFunction && func.executeFunction instanceof Function) {
|
||||
if (func.name.indexOf('custom') !== 0) {
|
||||
console.error("\u81EA\u5B9A\u4E49\u51FD\u6570-".concat(func.name, " \u540D\u79F0\u6709\u8BEF\uFF0C\u8BF7\u4EE5custom\u5F00\u5934"));
|
||||
return;
|
||||
}
|
||||
RuleEngine.getInstance().registerContextMethod(func.name, func);
|
||||
} else {
|
||||
console.error("\u8BF7\u68C0\u67E5".concat(func && func.name, "\u7684\u89C4\u5219\u51FD\u6570\u5B9A\u4E49"));
|
||||
}
|
||||
});
|
||||
};
|
||||
/* harmony default export */ var app = ({
|
||||
install: app_install
|
||||
});
|
||||
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
||||
|
||||
|
||||
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (app);
|
||||
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
289
crypto/0971f994c95754494ad9b508d6916c39/app/index.umd.js
Normal file
289
crypto/0971f994c95754494ad9b508d6916c39/app/index.umd.js
Normal file
@ -0,0 +1,289 @@
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory();
|
||||
else if(typeof define === 'function' && define.amd)
|
||||
define([], factory);
|
||||
else if(typeof exports === 'object')
|
||||
exports["0971f994c95754494ad9b508d6916c39"] = factory();
|
||||
else
|
||||
root["0971f994c95754494ad9b508d6916c39"] = factory();
|
||||
})((typeof self !== 'undefined' ? self : this), function() {
|
||||
return /******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = function(exports) {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // create a fake namespace object
|
||||
/******/ // mode & 1: value is a module id, require it
|
||||
/******/ // mode & 2: merge all properties of value into the ns
|
||||
/******/ // mode & 4: return value when already ns object
|
||||
/******/ // mode & 8|1: behave like require
|
||||
/******/ __webpack_require__.t = function(value, mode) {
|
||||
/******/ if(mode & 1) value = __webpack_require__(value);
|
||||
/******/ if(mode & 8) return value;
|
||||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
||||
/******/ var ns = Object.create(null);
|
||||
/******/ __webpack_require__.r(ns);
|
||||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
||||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
||||
/******/ return ns;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = "fb15");
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ "8875":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
|
||||
// MIT license
|
||||
// source: https://github.com/amiller-gh/currentScript-polyfill
|
||||
|
||||
// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
|
||||
|
||||
(function (root, factory) {
|
||||
if (true) {
|
||||
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
||||
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
||||
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
||||
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
||||
} else {}
|
||||
}(typeof self !== 'undefined' ? self : this, function () {
|
||||
function getCurrentScript () {
|
||||
var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
|
||||
// for chrome
|
||||
if (!descriptor && 'currentScript' in document && document.currentScript) {
|
||||
return document.currentScript
|
||||
}
|
||||
|
||||
// for other browsers with native support for currentScript
|
||||
if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
|
||||
return document.currentScript
|
||||
}
|
||||
|
||||
// IE 8-10 support script readyState
|
||||
// IE 11+ & Firefox support stack trace
|
||||
try {
|
||||
throw new Error();
|
||||
}
|
||||
catch (err) {
|
||||
// Find the second match for the "at" string to get file src url from stack.
|
||||
var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
|
||||
ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
|
||||
stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
|
||||
scriptLocation = (stackDetails && stackDetails[1]) || false,
|
||||
line = (stackDetails && stackDetails[2]) || false,
|
||||
currentLocation = document.location.href.replace(document.location.hash, ''),
|
||||
pageSource,
|
||||
inlineScriptSourceRegExp,
|
||||
inlineScriptSource,
|
||||
scripts = document.getElementsByTagName('script'); // Live NodeList collection
|
||||
|
||||
if (scriptLocation === currentLocation) {
|
||||
pageSource = document.documentElement.outerHTML;
|
||||
inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
|
||||
inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
|
||||
}
|
||||
|
||||
for (var i = 0; i < scripts.length; i++) {
|
||||
// If ready state is interactive, return the script tag
|
||||
if (scripts[i].readyState === 'interactive') {
|
||||
return scripts[i];
|
||||
}
|
||||
|
||||
// If src matches, return the script tag
|
||||
if (scripts[i].src === scriptLocation) {
|
||||
return scripts[i];
|
||||
}
|
||||
|
||||
// If inline source matches, return the script tag
|
||||
if (
|
||||
scriptLocation === currentLocation &&
|
||||
scripts[i].innerHTML &&
|
||||
scripts[i].innerHTML.trim() === inlineScriptSource
|
||||
) {
|
||||
return scripts[i];
|
||||
}
|
||||
}
|
||||
|
||||
// If no match, return null
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
return getCurrentScript
|
||||
}));
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "fb15":
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
// ESM COMPAT FLAG
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
||||
// This file is imported into lib/wc client bundles.
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
var currentScript = window.document.currentScript
|
||||
if (true) {
|
||||
var getCurrentScript = __webpack_require__("8875")
|
||||
currentScript = getCurrentScript()
|
||||
|
||||
// for backward compatibility, because previously we directly included the polyfill
|
||||
if (!('currentScript' in document)) {
|
||||
Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
|
||||
}
|
||||
}
|
||||
|
||||
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
||||
if (src) {
|
||||
__webpack_require__.p = src[1] // eslint-disable-line
|
||||
}
|
||||
}
|
||||
|
||||
// Indicate to webpack that this file can be concatenated
|
||||
/* harmony default export */ var setPublicPath = (null);
|
||||
|
||||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/custom-functions/cubic/cubic.js
|
||||
/*
|
||||
* cubic函数
|
||||
* 求三次方
|
||||
* 接收一个数字类型的参数,并求其三次方并返回
|
||||
*/
|
||||
/* harmony default export */ var cubic = ({
|
||||
// 函数名必须以custom开头,否则无法被解析
|
||||
name: 'customcubic',
|
||||
// 校验函数,用于函数保存前的校验, 可以对参数的个数及类型做限制
|
||||
mockFunction: function mockFunction() {
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
if (!(args && args.length === 1)) {
|
||||
throw new Error('参数长度必须是1个');
|
||||
}
|
||||
if (isNaN(parseFloat(args[0])) || !isFinite(args[0])) {
|
||||
throw new Error('参数类型必须是数字');
|
||||
}
|
||||
},
|
||||
// 执行函数, 接收到参数后的处理方法,必须有返回值
|
||||
executeFunction: function executeFunction() {
|
||||
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
||||
args[_key2] = arguments[_key2];
|
||||
}
|
||||
if (!(args && args.length === 1)) {
|
||||
throw new Error('参数长度必须是1个');
|
||||
}
|
||||
if (isNaN(parseFloat(args[0])) || !isFinite(args[0])) {
|
||||
throw new Error('参数类型必须是数字');
|
||||
}
|
||||
return args[0] * args[0] * args[0];
|
||||
}
|
||||
});
|
||||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/custom-functions/index.js
|
||||
|
||||
/* harmony default export */ var custom_functions = ({
|
||||
Cubic: cubic
|
||||
});
|
||||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/app.js
|
||||
|
||||
var app_install = function install(_ref, hookManager, definition) {
|
||||
var RuleEngine = _ref.RuleEngine;
|
||||
if (!RuleEngine) {
|
||||
console.error('x-extension上下文中没有注册RuleEngine, 请检查');
|
||||
return;
|
||||
}
|
||||
Object.keys(custom_functions).forEach(function (funcKey) {
|
||||
var func = custom_functions[funcKey];
|
||||
if (func && func.name && func.executeFunction && func.executeFunction instanceof Function) {
|
||||
if (func.name.indexOf('custom') !== 0) {
|
||||
console.error("\u81EA\u5B9A\u4E49\u51FD\u6570-".concat(func.name, " \u540D\u79F0\u6709\u8BEF\uFF0C\u8BF7\u4EE5custom\u5F00\u5934"));
|
||||
return;
|
||||
}
|
||||
RuleEngine.getInstance().registerContextMethod(func.name, func);
|
||||
} else {
|
||||
console.error("\u8BF7\u68C0\u67E5".concat(func && func.name, "\u7684\u89C4\u5219\u51FD\u6570\u5B9A\u4E49"));
|
||||
}
|
||||
});
|
||||
};
|
||||
/* harmony default export */ var app = ({
|
||||
install: app_install
|
||||
});
|
||||
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
||||
|
||||
|
||||
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (app);
|
||||
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
});
|
||||
1
crypto/0971f994c95754494ad9b508d6916c39/app/index.umd.min.js
vendored
Normal file
1
crypto/0971f994c95754494ad9b508d6916c39/app/index.umd.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["0971f994c95754494ad9b508d6916c39"]=t():e["0971f994c95754494ad9b508d6916c39"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({8875:function(e,t,n){var r,o,c;(function(n,i){o=[],r=i,c="function"===typeof r?r.apply(t,o):r,void 0===c||(e.exports=c)})("undefined"!==typeof self&&self,(function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(p){var n,r,o,c=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,i=/@([^@]*):(\d+):(\d+)\s*$/gi,u=c.exec(p.stack)||i.exec(p.stack),f=u&&u[1]||!1,a=u&&u[2]||!1,d=document.location.href.replace(document.location.hash,""),l=document.getElementsByTagName("script");f===d&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(a-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=n.replace(r,"$1").trim());for(var s=0;s<l.length;s++){if("interactive"===l[s].readyState)return l[s];if(l[s].src===f)return l[s];if(f===d&&l[s].innerHTML&&l[s].innerHTML.trim()===o)return l[s]}return null}}return e}))},fb15:function(e,t,n){"use strict";if(n.r(t),"undefined"!==typeof window){var r=window.document.currentScript,o=n("8875");r=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o});var c=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);c&&(n.p=c[1])}var i={name:"customcubic",mockFunction:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t||1!==t.length)throw new Error("参数长度必须是1个");if(isNaN(parseFloat(t[0]))||!isFinite(t[0]))throw new Error("参数类型必须是数字")},executeFunction:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t||1!==t.length)throw new Error("参数长度必须是1个");if(isNaN(parseFloat(t[0]))||!isFinite(t[0]))throw new Error("参数类型必须是数字");return t[0]*t[0]*t[0]}},u={Cubic:i},f=function(e,t,n){var r=e.RuleEngine;r?Object.keys(u).forEach((function(e){var t=u[e];if(t&&t.name&&t.executeFunction&&t.executeFunction instanceof Function){if(0!==t.name.indexOf("custom"))return void console.error("自定义函数-".concat(t.name," 名称有误,请以custom开头"));r.getInstance().registerContextMethod(t.name,t)}else console.error("请检查".concat(t&&t.name,"的规则函数定义"))})):console.error("x-extension上下文中没有注册RuleEngine, 请检查")},a={install:f};t["default"]=a}})}));
|
||||
10
crypto/0971f994c95754494ad9b508d6916c39/mobile/demo.html
Normal file
10
crypto/0971f994c95754494ad9b508d6916c39/mobile/demo.html
Normal file
@ -0,0 +1,10 @@
|
||||
<meta charset="utf-8">
|
||||
<title>0971f994c95754494ad9b508d6916c39 demo</title>
|
||||
<script src="./0971f994c95754494ad9b508d6916c39.umd.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="./0971f994c95754494ad9b508d6916c39.css">
|
||||
|
||||
|
||||
<script>
|
||||
console.log(0971f994c95754494ad9b508d6916c39)
|
||||
</script>
|
||||
279
crypto/0971f994c95754494ad9b508d6916c39/mobile/index.common.js
Normal file
279
crypto/0971f994c95754494ad9b508d6916c39/mobile/index.common.js
Normal file
@ -0,0 +1,279 @@
|
||||
module.exports =
|
||||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = function(exports) {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // create a fake namespace object
|
||||
/******/ // mode & 1: value is a module id, require it
|
||||
/******/ // mode & 2: merge all properties of value into the ns
|
||||
/******/ // mode & 4: return value when already ns object
|
||||
/******/ // mode & 8|1: behave like require
|
||||
/******/ __webpack_require__.t = function(value, mode) {
|
||||
/******/ if(mode & 1) value = __webpack_require__(value);
|
||||
/******/ if(mode & 8) return value;
|
||||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
||||
/******/ var ns = Object.create(null);
|
||||
/******/ __webpack_require__.r(ns);
|
||||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
||||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
||||
/******/ return ns;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = "fb15");
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ "8875":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
|
||||
// MIT license
|
||||
// source: https://github.com/amiller-gh/currentScript-polyfill
|
||||
|
||||
// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
|
||||
|
||||
(function (root, factory) {
|
||||
if (true) {
|
||||
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
||||
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
||||
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
||||
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
||||
} else {}
|
||||
}(typeof self !== 'undefined' ? self : this, function () {
|
||||
function getCurrentScript () {
|
||||
var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
|
||||
// for chrome
|
||||
if (!descriptor && 'currentScript' in document && document.currentScript) {
|
||||
return document.currentScript
|
||||
}
|
||||
|
||||
// for other browsers with native support for currentScript
|
||||
if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
|
||||
return document.currentScript
|
||||
}
|
||||
|
||||
// IE 8-10 support script readyState
|
||||
// IE 11+ & Firefox support stack trace
|
||||
try {
|
||||
throw new Error();
|
||||
}
|
||||
catch (err) {
|
||||
// Find the second match for the "at" string to get file src url from stack.
|
||||
var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
|
||||
ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
|
||||
stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
|
||||
scriptLocation = (stackDetails && stackDetails[1]) || false,
|
||||
line = (stackDetails && stackDetails[2]) || false,
|
||||
currentLocation = document.location.href.replace(document.location.hash, ''),
|
||||
pageSource,
|
||||
inlineScriptSourceRegExp,
|
||||
inlineScriptSource,
|
||||
scripts = document.getElementsByTagName('script'); // Live NodeList collection
|
||||
|
||||
if (scriptLocation === currentLocation) {
|
||||
pageSource = document.documentElement.outerHTML;
|
||||
inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
|
||||
inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
|
||||
}
|
||||
|
||||
for (var i = 0; i < scripts.length; i++) {
|
||||
// If ready state is interactive, return the script tag
|
||||
if (scripts[i].readyState === 'interactive') {
|
||||
return scripts[i];
|
||||
}
|
||||
|
||||
// If src matches, return the script tag
|
||||
if (scripts[i].src === scriptLocation) {
|
||||
return scripts[i];
|
||||
}
|
||||
|
||||
// If inline source matches, return the script tag
|
||||
if (
|
||||
scriptLocation === currentLocation &&
|
||||
scripts[i].innerHTML &&
|
||||
scripts[i].innerHTML.trim() === inlineScriptSource
|
||||
) {
|
||||
return scripts[i];
|
||||
}
|
||||
}
|
||||
|
||||
// If no match, return null
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
return getCurrentScript
|
||||
}));
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "fb15":
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
// ESM COMPAT FLAG
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
||||
// This file is imported into lib/wc client bundles.
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
var currentScript = window.document.currentScript
|
||||
if (true) {
|
||||
var getCurrentScript = __webpack_require__("8875")
|
||||
currentScript = getCurrentScript()
|
||||
|
||||
// for backward compatibility, because previously we directly included the polyfill
|
||||
if (!('currentScript' in document)) {
|
||||
Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
|
||||
}
|
||||
}
|
||||
|
||||
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
||||
if (src) {
|
||||
__webpack_require__.p = src[1] // eslint-disable-line
|
||||
}
|
||||
}
|
||||
|
||||
// Indicate to webpack that this file can be concatenated
|
||||
/* harmony default export */ var setPublicPath = (null);
|
||||
|
||||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/custom-functions/cubic/cubic.js
|
||||
/*
|
||||
* cubic函数
|
||||
* 求三次方
|
||||
* 接收一个数字类型的参数,并求其三次方并返回
|
||||
*/
|
||||
/* harmony default export */ var cubic = ({
|
||||
// 函数名必须以custom开头,否则无法被解析
|
||||
name: 'customcubic',
|
||||
// 校验函数,用于函数保存前的校验, 可以对参数的个数及类型做限制
|
||||
mockFunction: function mockFunction() {
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
if (!(args && args.length === 1)) {
|
||||
throw new Error('参数长度必须是1个');
|
||||
}
|
||||
if (isNaN(parseFloat(args[0])) || !isFinite(args[0])) {
|
||||
throw new Error('参数类型必须是数字');
|
||||
}
|
||||
},
|
||||
// 执行函数, 接收到参数后的处理方法,必须有返回值
|
||||
executeFunction: function executeFunction() {
|
||||
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
||||
args[_key2] = arguments[_key2];
|
||||
}
|
||||
if (!(args && args.length === 1)) {
|
||||
throw new Error('参数长度必须是1个');
|
||||
}
|
||||
if (isNaN(parseFloat(args[0])) || !isFinite(args[0])) {
|
||||
throw new Error('参数类型必须是数字');
|
||||
}
|
||||
return args[0] * args[0] * args[0];
|
||||
}
|
||||
});
|
||||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/custom-functions/index.js
|
||||
|
||||
/* harmony default export */ var custom_functions = ({
|
||||
Cubic: cubic
|
||||
});
|
||||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/mobile.js
|
||||
|
||||
var mobile_install = function install(_ref, hookManager, definition) {
|
||||
var RuleEngine = _ref.RuleEngine;
|
||||
if (!RuleEngine) {
|
||||
console.error('x-extension上下文中没有注册RuleEngine, 请检查');
|
||||
return;
|
||||
}
|
||||
Object.keys(custom_functions).forEach(function (funcKey) {
|
||||
var func = custom_functions[funcKey];
|
||||
if (func && func.name && func.executeFunction && func.executeFunction instanceof Function) {
|
||||
if (func.name.indexOf('custom') !== 0) {
|
||||
console.error("\u81EA\u5B9A\u4E49\u51FD\u6570-".concat(func.name, " \u540D\u79F0\u6709\u8BEF\uFF0C\u8BF7\u4EE5custom\u5F00\u5934"));
|
||||
return;
|
||||
}
|
||||
RuleEngine.getInstance().registerContextMethod(func.name, func);
|
||||
} else {
|
||||
console.error("\u8BF7\u68C0\u67E5".concat(func && func.name, "\u7684\u89C4\u5219\u51FD\u6570\u5B9A\u4E49"));
|
||||
}
|
||||
});
|
||||
};
|
||||
/* harmony default export */ var mobile = ({
|
||||
install: mobile_install
|
||||
});
|
||||
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
||||
|
||||
|
||||
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (mobile);
|
||||
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
289
crypto/0971f994c95754494ad9b508d6916c39/mobile/index.umd.js
Normal file
289
crypto/0971f994c95754494ad9b508d6916c39/mobile/index.umd.js
Normal file
@ -0,0 +1,289 @@
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory();
|
||||
else if(typeof define === 'function' && define.amd)
|
||||
define([], factory);
|
||||
else if(typeof exports === 'object')
|
||||
exports["0971f994c95754494ad9b508d6916c39"] = factory();
|
||||
else
|
||||
root["0971f994c95754494ad9b508d6916c39"] = factory();
|
||||
})((typeof self !== 'undefined' ? self : this), function() {
|
||||
return /******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = function(exports) {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // create a fake namespace object
|
||||
/******/ // mode & 1: value is a module id, require it
|
||||
/******/ // mode & 2: merge all properties of value into the ns
|
||||
/******/ // mode & 4: return value when already ns object
|
||||
/******/ // mode & 8|1: behave like require
|
||||
/******/ __webpack_require__.t = function(value, mode) {
|
||||
/******/ if(mode & 1) value = __webpack_require__(value);
|
||||
/******/ if(mode & 8) return value;
|
||||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
||||
/******/ var ns = Object.create(null);
|
||||
/******/ __webpack_require__.r(ns);
|
||||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
||||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
||||
/******/ return ns;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = "fb15");
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ "8875":
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
|
||||
// MIT license
|
||||
// source: https://github.com/amiller-gh/currentScript-polyfill
|
||||
|
||||
// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
|
||||
|
||||
(function (root, factory) {
|
||||
if (true) {
|
||||
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
||||
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
||||
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
||||
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
||||
} else {}
|
||||
}(typeof self !== 'undefined' ? self : this, function () {
|
||||
function getCurrentScript () {
|
||||
var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
|
||||
// for chrome
|
||||
if (!descriptor && 'currentScript' in document && document.currentScript) {
|
||||
return document.currentScript
|
||||
}
|
||||
|
||||
// for other browsers with native support for currentScript
|
||||
if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
|
||||
return document.currentScript
|
||||
}
|
||||
|
||||
// IE 8-10 support script readyState
|
||||
// IE 11+ & Firefox support stack trace
|
||||
try {
|
||||
throw new Error();
|
||||
}
|
||||
catch (err) {
|
||||
// Find the second match for the "at" string to get file src url from stack.
|
||||
var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
|
||||
ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
|
||||
stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
|
||||
scriptLocation = (stackDetails && stackDetails[1]) || false,
|
||||
line = (stackDetails && stackDetails[2]) || false,
|
||||
currentLocation = document.location.href.replace(document.location.hash, ''),
|
||||
pageSource,
|
||||
inlineScriptSourceRegExp,
|
||||
inlineScriptSource,
|
||||
scripts = document.getElementsByTagName('script'); // Live NodeList collection
|
||||
|
||||
if (scriptLocation === currentLocation) {
|
||||
pageSource = document.documentElement.outerHTML;
|
||||
inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
|
||||
inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
|
||||
}
|
||||
|
||||
for (var i = 0; i < scripts.length; i++) {
|
||||
// If ready state is interactive, return the script tag
|
||||
if (scripts[i].readyState === 'interactive') {
|
||||
return scripts[i];
|
||||
}
|
||||
|
||||
// If src matches, return the script tag
|
||||
if (scripts[i].src === scriptLocation) {
|
||||
return scripts[i];
|
||||
}
|
||||
|
||||
// If inline source matches, return the script tag
|
||||
if (
|
||||
scriptLocation === currentLocation &&
|
||||
scripts[i].innerHTML &&
|
||||
scripts[i].innerHTML.trim() === inlineScriptSource
|
||||
) {
|
||||
return scripts[i];
|
||||
}
|
||||
}
|
||||
|
||||
// If no match, return null
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
return getCurrentScript
|
||||
}));
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "fb15":
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
// ESM COMPAT FLAG
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
||||
// This file is imported into lib/wc client bundles.
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
var currentScript = window.document.currentScript
|
||||
if (true) {
|
||||
var getCurrentScript = __webpack_require__("8875")
|
||||
currentScript = getCurrentScript()
|
||||
|
||||
// for backward compatibility, because previously we directly included the polyfill
|
||||
if (!('currentScript' in document)) {
|
||||
Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
|
||||
}
|
||||
}
|
||||
|
||||
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
||||
if (src) {
|
||||
__webpack_require__.p = src[1] // eslint-disable-line
|
||||
}
|
||||
}
|
||||
|
||||
// Indicate to webpack that this file can be concatenated
|
||||
/* harmony default export */ var setPublicPath = (null);
|
||||
|
||||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/custom-functions/cubic/cubic.js
|
||||
/*
|
||||
* cubic函数
|
||||
* 求三次方
|
||||
* 接收一个数字类型的参数,并求其三次方并返回
|
||||
*/
|
||||
/* harmony default export */ var cubic = ({
|
||||
// 函数名必须以custom开头,否则无法被解析
|
||||
name: 'customcubic',
|
||||
// 校验函数,用于函数保存前的校验, 可以对参数的个数及类型做限制
|
||||
mockFunction: function mockFunction() {
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
if (!(args && args.length === 1)) {
|
||||
throw new Error('参数长度必须是1个');
|
||||
}
|
||||
if (isNaN(parseFloat(args[0])) || !isFinite(args[0])) {
|
||||
throw new Error('参数类型必须是数字');
|
||||
}
|
||||
},
|
||||
// 执行函数, 接收到参数后的处理方法,必须有返回值
|
||||
executeFunction: function executeFunction() {
|
||||
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
||||
args[_key2] = arguments[_key2];
|
||||
}
|
||||
if (!(args && args.length === 1)) {
|
||||
throw new Error('参数长度必须是1个');
|
||||
}
|
||||
if (isNaN(parseFloat(args[0])) || !isFinite(args[0])) {
|
||||
throw new Error('参数类型必须是数字');
|
||||
}
|
||||
return args[0] * args[0] * args[0];
|
||||
}
|
||||
});
|
||||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/custom-functions/index.js
|
||||
|
||||
/* harmony default export */ var custom_functions = ({
|
||||
Cubic: cubic
|
||||
});
|
||||
// CONCATENATED MODULE: ./src/custom/apaas-custom-plugin-rule-functions/mobile.js
|
||||
|
||||
var mobile_install = function install(_ref, hookManager, definition) {
|
||||
var RuleEngine = _ref.RuleEngine;
|
||||
if (!RuleEngine) {
|
||||
console.error('x-extension上下文中没有注册RuleEngine, 请检查');
|
||||
return;
|
||||
}
|
||||
Object.keys(custom_functions).forEach(function (funcKey) {
|
||||
var func = custom_functions[funcKey];
|
||||
if (func && func.name && func.executeFunction && func.executeFunction instanceof Function) {
|
||||
if (func.name.indexOf('custom') !== 0) {
|
||||
console.error("\u81EA\u5B9A\u4E49\u51FD\u6570-".concat(func.name, " \u540D\u79F0\u6709\u8BEF\uFF0C\u8BF7\u4EE5custom\u5F00\u5934"));
|
||||
return;
|
||||
}
|
||||
RuleEngine.getInstance().registerContextMethod(func.name, func);
|
||||
} else {
|
||||
console.error("\u8BF7\u68C0\u67E5".concat(func && func.name, "\u7684\u89C4\u5219\u51FD\u6570\u5B9A\u4E49"));
|
||||
}
|
||||
});
|
||||
};
|
||||
/* harmony default export */ var mobile = ({
|
||||
install: mobile_install
|
||||
});
|
||||
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
||||
|
||||
|
||||
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (mobile);
|
||||
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
});
|
||||
1
crypto/0971f994c95754494ad9b508d6916c39/mobile/index.umd.min.js
vendored
Normal file
1
crypto/0971f994c95754494ad9b508d6916c39/mobile/index.umd.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["0971f994c95754494ad9b508d6916c39"]=t():e["0971f994c95754494ad9b508d6916c39"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({8875:function(e,t,n){var r,o,c;(function(n,i){o=[],r=i,c="function"===typeof r?r.apply(t,o):r,void 0===c||(e.exports=c)})("undefined"!==typeof self&&self,(function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(p){var n,r,o,c=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,i=/@([^@]*):(\d+):(\d+)\s*$/gi,u=c.exec(p.stack)||i.exec(p.stack),f=u&&u[1]||!1,a=u&&u[2]||!1,d=document.location.href.replace(document.location.hash,""),l=document.getElementsByTagName("script");f===d&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(a-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=n.replace(r,"$1").trim());for(var s=0;s<l.length;s++){if("interactive"===l[s].readyState)return l[s];if(l[s].src===f)return l[s];if(f===d&&l[s].innerHTML&&l[s].innerHTML.trim()===o)return l[s]}return null}}return e}))},fb15:function(e,t,n){"use strict";if(n.r(t),"undefined"!==typeof window){var r=window.document.currentScript,o=n("8875");r=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o});var c=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);c&&(n.p=c[1])}var i={name:"customcubic",mockFunction:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t||1!==t.length)throw new Error("参数长度必须是1个");if(isNaN(parseFloat(t[0]))||!isFinite(t[0]))throw new Error("参数类型必须是数字")},executeFunction:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t||1!==t.length)throw new Error("参数长度必须是1个");if(isNaN(parseFloat(t[0]))||!isFinite(t[0]))throw new Error("参数类型必须是数字");return t[0]*t[0]*t[0]}},u={Cubic:i},f=function(e,t,n){var r=e.RuleEngine;r?Object.keys(u).forEach((function(e){var t=u[e];if(t&&t.name&&t.executeFunction&&t.executeFunction instanceof Function){if(0!==t.name.indexOf("custom"))return void console.error("自定义函数-".concat(t.name," 名称有误,请以custom开头"));r.getInstance().registerContextMethod(t.name,t)}else console.error("请检查".concat(t&&t.name,"的规则函数定义"))})):console.error("x-extension上下文中没有注册RuleEngine, 请检查")},a={install:f};t["default"]=a}})}));
|
||||
365
package-lock.json
generated
365
package-lock.json
generated
@ -4401,6 +4401,217 @@
|
||||
"@xtuc/long": "4.2.2"
|
||||
}
|
||||
},
|
||||
"@x-apaas/x-apaas-cli": {
|
||||
"version": "0.0.17",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/@x-apaas/x-apaas-cli/-/x-apaas-cli-0.0.17.tgz",
|
||||
"integrity": "sha512-SHNfJ4bo99yeYwwislcZh5Bl1VAr6yRUvlQWEI6UlJccBSm6IhEDe/3RE37fJ9IsooHtleEb2E5N9A99MxXO+g==",
|
||||
"requires": {
|
||||
"axios": "^0.19.0",
|
||||
"colors": "^1.4.0",
|
||||
"commander": "^2.20.0",
|
||||
"cross-spawn": "^7.0.3",
|
||||
"form-data": "^2.5.1",
|
||||
"inquirer": "8.2.0",
|
||||
"md5": "^2.3.0",
|
||||
"shelljs": "^0.8.3",
|
||||
"user-home": "^2.0.0",
|
||||
"zip-local": "^0.3.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-regex": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"requires": {
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/chalk/-/chalk-4.1.2.tgz",
|
||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||
"requires": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"requires": {
|
||||
"color-name": "~1.1.4"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.20.3",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/commander/-/commander-2.20.3.tgz",
|
||||
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
||||
"requires": {
|
||||
"path-key": "^3.1.0",
|
||||
"shebang-command": "^2.0.0",
|
||||
"which": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
|
||||
},
|
||||
"form-data": {
|
||||
"version": "2.5.5",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/form-data/-/form-data-2.5.5.tgz",
|
||||
"integrity": "sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A==",
|
||||
"requires": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
"es-set-tostringtag": "^2.1.0",
|
||||
"hasown": "^2.0.2",
|
||||
"mime-types": "^2.1.35",
|
||||
"safe-buffer": "^5.2.1"
|
||||
}
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
|
||||
},
|
||||
"inquirer": {
|
||||
"version": "8.2.0",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/inquirer/-/inquirer-8.2.0.tgz",
|
||||
"integrity": "sha512-0crLweprevJ02tTuA6ThpoAERAGyVILC4sS74uib58Xf/zSr1/ZWtmm7D5CI+bSQEaA04f0K7idaHpQbSWgiVQ==",
|
||||
"requires": {
|
||||
"ansi-escapes": "^4.2.1",
|
||||
"chalk": "^4.1.1",
|
||||
"cli-cursor": "^3.1.0",
|
||||
"cli-width": "^3.0.0",
|
||||
"external-editor": "^3.0.3",
|
||||
"figures": "^3.0.0",
|
||||
"lodash": "^4.17.21",
|
||||
"mute-stream": "0.0.8",
|
||||
"ora": "^5.4.1",
|
||||
"run-async": "^2.4.0",
|
||||
"rxjs": "^7.2.0",
|
||||
"string-width": "^4.1.0",
|
||||
"strip-ansi": "^6.0.0",
|
||||
"through": "^2.3.6"
|
||||
}
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
||||
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
|
||||
},
|
||||
"log-symbols": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/log-symbols/-/log-symbols-4.1.0.tgz",
|
||||
"integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",
|
||||
"requires": {
|
||||
"chalk": "^4.1.0",
|
||||
"is-unicode-supported": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"ora": {
|
||||
"version": "5.4.1",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/ora/-/ora-5.4.1.tgz",
|
||||
"integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==",
|
||||
"requires": {
|
||||
"bl": "^4.1.0",
|
||||
"chalk": "^4.1.0",
|
||||
"cli-cursor": "^3.1.0",
|
||||
"cli-spinners": "^2.5.0",
|
||||
"is-interactive": "^1.0.0",
|
||||
"is-unicode-supported": "^0.1.0",
|
||||
"log-symbols": "^4.1.0",
|
||||
"strip-ansi": "^6.0.0",
|
||||
"wcwidth": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"path-key": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/path-key/-/path-key-3.1.1.tgz",
|
||||
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="
|
||||
},
|
||||
"rxjs": {
|
||||
"version": "7.8.2",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/rxjs/-/rxjs-7.8.2.tgz",
|
||||
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
|
||||
"requires": {
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"shebang-command": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
|
||||
"requires": {
|
||||
"shebang-regex": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"shebang-regex": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/shebang-regex/-/shebang-regex-3.0.0.tgz",
|
||||
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="
|
||||
},
|
||||
"string-width": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/string-width/-/string-width-4.2.3.tgz",
|
||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||
"requires": {
|
||||
"emoji-regex": "^8.0.0",
|
||||
"is-fullwidth-code-point": "^3.0.0",
|
||||
"strip-ansi": "^6.0.1"
|
||||
}
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"requires": {
|
||||
"ansi-regex": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"user-home": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/user-home/-/user-home-2.0.0.tgz",
|
||||
"integrity": "sha512-KMWqdlOcjCYdtIJpicDSFBQ8nFwS2i9sslAd6f4+CBGcU4gist2REnr2fxj2YocvJFxSF3ZOHLYLVZnUxv4BZQ==",
|
||||
"requires": {
|
||||
"os-homedir": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"which": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/which/-/which-2.0.2.tgz",
|
||||
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
||||
"requires": {
|
||||
"isexe": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@x-apaas/x-apaas-frontend-i18n": {
|
||||
"version": "3.3.4-rc.1",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/@x-apaas/x-apaas-frontend-i18n/-/x-apaas-frontend-i18n-3.3.4-rc.1.tgz",
|
||||
@ -6413,7 +6624,6 @@
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/bl/-/bl-4.1.0.tgz",
|
||||
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer": "^5.5.0",
|
||||
"inherits": "^2.0.4",
|
||||
@ -6424,7 +6634,6 @@
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmmirror.com/buffer/-/buffer-5.7.1.tgz",
|
||||
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"base64-js": "^1.3.1",
|
||||
"ieee754": "^1.1.13"
|
||||
@ -6957,6 +7166,22 @@
|
||||
"get-intrinsic": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"call-bind-apply-helpers": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
|
||||
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
|
||||
"requires": {
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"function-bind": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/function-bind/-/function-bind-1.1.2.tgz",
|
||||
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"call-me-maybe": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/call-me-maybe/-/call-me-maybe-1.0.2.tgz",
|
||||
@ -7420,8 +7645,7 @@
|
||||
"cli-spinners": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmmirror.com/cli-spinners/-/cli-spinners-2.7.0.tgz",
|
||||
"integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw=="
|
||||
},
|
||||
"cli-table3": {
|
||||
"version": "0.5.1",
|
||||
@ -10425,7 +10649,6 @@
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmmirror.com/defaults/-/defaults-1.0.4.tgz",
|
||||
"integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"clone": "^1.0.2"
|
||||
},
|
||||
@ -10433,8 +10656,7 @@
|
||||
"clone": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmmirror.com/clone/-/clone-1.0.4.tgz",
|
||||
"integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -10939,6 +11161,23 @@
|
||||
"dotenv-defaults": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"dunder-proto": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
||||
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
|
||||
"requires": {
|
||||
"call-bind-apply-helpers": "^1.0.1",
|
||||
"es-errors": "^1.3.0",
|
||||
"gopd": "^1.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"gopd": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/gopd/-/gopd-1.2.0.tgz",
|
||||
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"duplexer": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/duplexer/-/duplexer-0.1.2.tgz",
|
||||
@ -11320,6 +11559,16 @@
|
||||
"resolved": "https://registry.npmmirror.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz",
|
||||
"integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA=="
|
||||
},
|
||||
"es-define-property": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/es-define-property/-/es-define-property-1.0.1.tgz",
|
||||
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g=="
|
||||
},
|
||||
"es-errors": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/es-errors/-/es-errors-1.3.0.tgz",
|
||||
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="
|
||||
},
|
||||
"es-get-iterator": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/es-get-iterator/-/es-get-iterator-1.1.3.tgz",
|
||||
@ -11343,6 +11592,67 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"es-object-atoms": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
||||
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
|
||||
"requires": {
|
||||
"es-errors": "^1.3.0"
|
||||
}
|
||||
},
|
||||
"es-set-tostringtag": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
|
||||
"integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
|
||||
"requires": {
|
||||
"es-errors": "^1.3.0",
|
||||
"get-intrinsic": "^1.2.6",
|
||||
"has-tostringtag": "^1.0.2",
|
||||
"hasown": "^2.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"function-bind": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/function-bind/-/function-bind-1.1.2.tgz",
|
||||
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="
|
||||
},
|
||||
"get-intrinsic": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
|
||||
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
|
||||
"requires": {
|
||||
"call-bind-apply-helpers": "^1.0.2",
|
||||
"es-define-property": "^1.0.1",
|
||||
"es-errors": "^1.3.0",
|
||||
"es-object-atoms": "^1.1.1",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-proto": "^1.0.1",
|
||||
"gopd": "^1.2.0",
|
||||
"has-symbols": "^1.1.0",
|
||||
"hasown": "^2.0.2",
|
||||
"math-intrinsics": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"gopd": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/gopd/-/gopd-1.2.0.tgz",
|
||||
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="
|
||||
},
|
||||
"has-symbols": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/has-symbols/-/has-symbols-1.1.0.tgz",
|
||||
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="
|
||||
},
|
||||
"has-tostringtag": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
|
||||
"integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
|
||||
"requires": {
|
||||
"has-symbols": "^1.0.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"es-shim-unscopables": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz",
|
||||
@ -13254,6 +13564,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"get-proto": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/get-proto/-/get-proto-1.0.1.tgz",
|
||||
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
|
||||
"requires": {
|
||||
"dunder-proto": "^1.0.1",
|
||||
"es-object-atoms": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"get-stdin": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/get-stdin/-/get-stdin-4.0.1.tgz",
|
||||
@ -14348,6 +14667,21 @@
|
||||
"minimalistic-assert": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"hasown": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/hasown/-/hasown-2.0.2.tgz",
|
||||
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||
"requires": {
|
||||
"function-bind": "^1.1.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"function-bind": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/function-bind/-/function-bind-1.1.2.tgz",
|
||||
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"hast-util-parse-selector": {
|
||||
"version": "2.2.5",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz",
|
||||
@ -15494,8 +15828,7 @@
|
||||
"is-interactive": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/is-interactive/-/is-interactive-1.0.0.tgz",
|
||||
"integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==",
|
||||
"dev": true
|
||||
"integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w=="
|
||||
},
|
||||
"is-map": {
|
||||
"version": "2.0.2",
|
||||
@ -15660,8 +15993,7 @@
|
||||
"is-unicode-supported": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz",
|
||||
"integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw=="
|
||||
},
|
||||
"is-utf8": {
|
||||
"version": "0.2.1",
|
||||
@ -16996,7 +17328,6 @@
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmmirror.com/jszip/-/jszip-2.7.0.tgz",
|
||||
"integrity": "sha512-JIsRKRVC3gTRo2vM4Wy9WBC3TRcfnIZU8k65Phi3izkvPH975FowRYtKGT6PxevA0XnJ/yO8b0QwV0ydVyQwfw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"pako": "~1.0.2"
|
||||
}
|
||||
@ -18184,6 +18515,11 @@
|
||||
"unquote": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"math-intrinsics": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
||||
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="
|
||||
},
|
||||
"md5": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/md5/-/md5-2.3.0.tgz",
|
||||
@ -26475,7 +26811,6 @@
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/wcwidth/-/wcwidth-1.0.1.tgz",
|
||||
"integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"defaults": "^1.0.3"
|
||||
}
|
||||
@ -27856,7 +28191,6 @@
|
||||
"version": "0.3.5",
|
||||
"resolved": "https://registry.npmmirror.com/zip-local/-/zip-local-0.3.5.tgz",
|
||||
"integrity": "sha512-GRV3D5TJY+/PqyeRm5CYBs7xVrKTKzljBoEXvocZu0HJ7tPEcgpSOYa2zFIsCZWgKWMuc4U3yMFgFkERGFIB9w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"async": "^1.4.2",
|
||||
"graceful-fs": "^4.1.3",
|
||||
@ -27867,8 +28201,7 @@
|
||||
"async": {
|
||||
"version": "1.5.2",
|
||||
"resolved": "https://registry.npmmirror.com/async/-/async-1.5.2.tgz",
|
||||
"integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==",
|
||||
"dev": true
|
||||
"integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
"cm": "git-cz"
|
||||
},
|
||||
"dependencies": {
|
||||
"@x-apaas/x-apaas-cli": "0.0.17",
|
||||
"@x-apaas/x-apaas-frontend-i18n": "rc",
|
||||
"@x-apaas/x-dcloud-page-engine": "rc",
|
||||
"@x-apaas/x-dcloud-page-web": "rc",
|
||||
|
||||
@ -21,6 +21,11 @@ export default {
|
||||
url: '/custom/dataEntryEngineModel/insert',
|
||||
method: 'post'
|
||||
},
|
||||
// 更新引擎(列表编辑机型)
|
||||
UPDATE_ENGINE_MODEL: {
|
||||
url: '/custom/dataEntryEngineModel/update',
|
||||
method: 'post'
|
||||
},
|
||||
// 导入引擎
|
||||
IMPORT_ENGINE_MODEL: {
|
||||
url: '/custom/engineParamDetailPojo/excelImport',
|
||||
@ -44,6 +49,11 @@ export default {
|
||||
url: '/custom/engineParamDetailPojo/selectParamListAndModel',
|
||||
method: 'get'
|
||||
},
|
||||
// 填写人进入详情页时获取参数树(传参与 GET_ENGINE_TABLE_DETAIL 相同)
|
||||
GET_ENGINE_TABLE_DETAIL_FOR_FILLED_BY: {
|
||||
url: '/custom/engineParamDetailPojo/selectParamListAndModelForFilledBy',
|
||||
method: 'get'
|
||||
},
|
||||
GET_NEW_MODEL_VERSION: {
|
||||
url: '/custom/dataEntryEngineModel/synchronizeParams',
|
||||
method: 'get'
|
||||
@ -63,5 +73,13 @@ export default {
|
||||
REJECT_TODO_TASK: {
|
||||
url: '/custom/todoTaskPojo/rejectTodo',
|
||||
method: 'post'
|
||||
},
|
||||
CHECK_PERMISSION_USER_DATA: {
|
||||
url: '/custom/permission/getPreAndRoleByCondition',
|
||||
method: 'post'
|
||||
},
|
||||
EXPORT_PERMISSION_USER_DATA: {
|
||||
url: '/custom/permission/exportPreAndRole',
|
||||
method: 'get'
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,6 +100,13 @@
|
||||
"title": "我发起的"
|
||||
}
|
||||
},
|
||||
"apaas-custom-myDemo":{
|
||||
"name": "apaas-custom-myDemo",
|
||||
"path": "apaas-custom-myDemo",
|
||||
"meta": {
|
||||
"title": "我的测试"
|
||||
}
|
||||
},
|
||||
"apaas-custom-selfEngineCheck":{
|
||||
"name": "apaas-custom-selfEngineCheck",
|
||||
"path": "apaas-custom-selfEngineCheck",
|
||||
@ -134,6 +141,13 @@
|
||||
"meta": {
|
||||
"title": "权限管理"
|
||||
}
|
||||
},
|
||||
"apaas-custom-checkPersonPermission":{
|
||||
"name": "apaas-custom-checkPersonPermission",
|
||||
"path": "apaas-custom-checkPersonPermission",
|
||||
"meta": {
|
||||
"title": "权限检查"
|
||||
}
|
||||
}
|
||||
},
|
||||
"customWidgetList": [
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
:destroy-on-close="true"
|
||||
:modalVisible.sync="visible"
|
||||
:wrapper-class="'add-engine-model-modal'"
|
||||
title="添加机型"
|
||||
:title="modalTitle"
|
||||
:width="850"
|
||||
>
|
||||
<el-form
|
||||
@ -124,6 +124,8 @@ export default {
|
||||
return {
|
||||
visible: false,
|
||||
submitting: false,
|
||||
isEditMode: false,
|
||||
editingModelId: null,
|
||||
ycOrOth: '竞品', // 默认为竞品,根据打开的页面不同而不同
|
||||
formData: {
|
||||
modelName: '',
|
||||
@ -136,6 +138,9 @@ export default {
|
||||
projectName: '',
|
||||
projectNumber: '',
|
||||
dispatchStatus: '',
|
||||
emission: '',
|
||||
burnType: '',
|
||||
engineCapacity: '',
|
||||
// 竞品发动机专有字段
|
||||
manufacturerName: '',
|
||||
manufacturerAbbreviation: '',
|
||||
@ -151,7 +156,8 @@ export default {
|
||||
series: [{ required: true, message: '请输入系列', trigger: 'blur' }],
|
||||
marketSegment: [{ required: true, message: '请输入细分市场', trigger: 'blur' }],
|
||||
projectName: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
|
||||
projectNumber: [{ required: true, message: '请输入项目编号', trigger: 'blur' }]
|
||||
projectNumber: [{ required: true, message: '请输入项目编号', trigger: 'blur' }],
|
||||
productionDate:[{ required: true, message: '请选择生产日期', trigger: 'blur' }]
|
||||
// 根据实际需求添加验证规则
|
||||
},
|
||||
dispatchStatusOptions: [
|
||||
@ -160,10 +166,17 @@ export default {
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
modalTitle() {
|
||||
return this.isEditMode ? '编辑机型' : '添加机型'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showModal(ycOrOth = '竞品') {
|
||||
// 根据来源页面设置 ycOrOth 值
|
||||
// selfEnginedata.vue 传 "玉柴",otherEnginedata.vue 传 "竞品"
|
||||
this.isEditMode = false
|
||||
this.editingModelId = null
|
||||
this.ycOrOth = ycOrOth
|
||||
this.visible = true
|
||||
// 重置表单
|
||||
@ -175,8 +188,46 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
showModalForEdit(ycOrOth, row) {
|
||||
if (!row || row.id == null) {
|
||||
this.$message({ message: '无法编辑:缺少机型标识', type: 'warning' })
|
||||
return
|
||||
}
|
||||
this.isEditMode = true
|
||||
this.editingModelId = row.id
|
||||
this.ycOrOth = ycOrOth
|
||||
this.visible = true
|
||||
const r = row || {}
|
||||
this.formData = {
|
||||
loginUserId: getUserId(),
|
||||
ycOrOth,
|
||||
modelName: r.modelName != null ? String(r.modelName) : '',
|
||||
productNumber: r.productNumber != null ? String(r.productNumber) : '',
|
||||
plate: r.plate != null ? String(r.plate) : '',
|
||||
platform: r.platform != null ? String(r.platform) : '',
|
||||
series: r.series != null ? String(r.series) : '',
|
||||
marketSegment: r.marketSegment != null ? String(r.marketSegment) : '',
|
||||
projectName: r.projectName != null ? String(r.projectName) : '',
|
||||
projectNumber: r.projectNumber != null ? String(r.projectNumber) : '',
|
||||
distributeStatus: r.distributeStatus != null ? String(r.distributeStatus) : '未分发',
|
||||
emission: r.emission != null ? String(r.emission) : '',
|
||||
burnType: r.burnType != null ? String(r.burnType) : '',
|
||||
engineCapacity: r.engineCapacity != null ? String(r.engineCapacity) : '',
|
||||
manufacturerName: r.manufacturerName != null ? String(r.manufacturerName) : '',
|
||||
manufacturerAbbreviation: r.manufacturerAbbreviation != null ? String(r.manufacturerAbbreviation) : '',
|
||||
brand: r.brand != null ? String(r.brand) : '',
|
||||
productionDate: r.productionDate != null ? String(r.productionDate) : ''
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.addForm) {
|
||||
this.$refs.addForm.clearValidate()
|
||||
}
|
||||
})
|
||||
},
|
||||
closeModal() {
|
||||
this.visible = false
|
||||
this.isEditMode = false
|
||||
this.editingModelId = null
|
||||
this.ycOrOth = '竞品' // 重置为默认值
|
||||
this.resetForm('竞品')
|
||||
},
|
||||
@ -193,6 +244,9 @@ export default {
|
||||
projectName: '',
|
||||
projectNumber: '',
|
||||
distributeStatus: '未分发',
|
||||
emission: '',
|
||||
burnType: '',
|
||||
engineCapacity: '',
|
||||
// 竞品发动机专有字段
|
||||
manufacturerName: '',
|
||||
manufacturerAbbreviation: '',
|
||||
@ -204,17 +258,26 @@ export default {
|
||||
this.$refs.addForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitting = true
|
||||
const params = { ...this.formData }
|
||||
Object.keys(params).forEach((k) => {
|
||||
if (params[k] == null) params[k] = ''
|
||||
})
|
||||
const isEdit = this.isEditMode && this.editingModelId != null
|
||||
if (isEdit) {
|
||||
params.id = this.editingModelId
|
||||
}
|
||||
const apiDef = isEdit ? api.UPDATE_ENGINE_MODEL : api.ADD_ENGINE_MODEL
|
||||
const request = {
|
||||
...api.ADD_ENGINE_MODEL,
|
||||
...apiDef,
|
||||
params: {
|
||||
...this.formData
|
||||
...params
|
||||
},
|
||||
disableSuccessMsg: true
|
||||
}
|
||||
this.$request(request)
|
||||
.asyncThen((resp) => {
|
||||
this.$message({
|
||||
message: '提交成功',
|
||||
message: isEdit ? '保存成功' : '提交成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.closeModal()
|
||||
@ -222,9 +285,9 @@ export default {
|
||||
this.$emit('success')
|
||||
})
|
||||
.asyncErrorCatch((err) => {
|
||||
console.error('添加失败:', err)
|
||||
console.error(isEdit ? '更新失败:' : '添加失败:', err)
|
||||
this.$message({
|
||||
message: '添加失败',
|
||||
message: isEdit ? '更新失败' : '添加失败',
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
@ -242,7 +305,8 @@ export default {
|
||||
.add-engine-model-modal {
|
||||
.add-engine-form {
|
||||
padding: 20px 0;
|
||||
|
||||
height: calc(70vh - 120px) !important;
|
||||
overflow-y: auto !important;
|
||||
.form-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@ -265,4 +329,5 @@ export default {
|
||||
padding-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@ -12,12 +12,7 @@
|
||||
:width="680"
|
||||
>
|
||||
<div class="batch-modify-content">
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form ref="form" :model="formData" :rules="formRules" label-width="100px">
|
||||
<el-form-item label="子系统:" prop="subsystem">
|
||||
<el-select
|
||||
v-model="formData.subsystem"
|
||||
@ -26,12 +21,7 @@
|
||||
style="width: 100%"
|
||||
@change="handleSubsystemChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in subsystemList"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
<el-option v-for="item in subsystemList" :key="item" :label="item" :value="item" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="dispatchType === 'update_param'" label="零部件名称:" prop="partsName">
|
||||
@ -58,7 +48,14 @@
|
||||
placeholder="请选择部门"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
:disabled="dispatchType === 'update_param' ? (!formData.subsystem || !formData.partsName || !Array.isArray(formData.partsName) || formData.partsName.length === 0) : !formData.subsystem"
|
||||
:disabled="
|
||||
dispatchType === 'update_param'
|
||||
? !formData.subsystem ||
|
||||
!formData.partsName ||
|
||||
!Array.isArray(formData.partsName) ||
|
||||
formData.partsName.length === 0
|
||||
: !formData.subsystem
|
||||
"
|
||||
@change="handleDepartmentChange"
|
||||
>
|
||||
<el-option
|
||||
@ -78,10 +75,17 @@
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="dispatchType === 'update_param' ? '人员:' : '责任人:'" prop="userId">
|
||||
<el-form-item
|
||||
:label="dispatchType === 'update_param' ? '人员:' : '责任人:'"
|
||||
prop="userId"
|
||||
>
|
||||
<el-select
|
||||
v-model="formData.userId"
|
||||
:placeholder="dispatchType === 'update_param' ? '请输入人员姓名进行搜索' : '请输入责任人姓名进行搜索'"
|
||||
:placeholder="
|
||||
dispatchType === 'update_param'
|
||||
? '请输入人员姓名进行搜索'
|
||||
: '请输入责任人姓名进行搜索'
|
||||
"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
:disabled="!formData.department"
|
||||
@ -128,6 +132,10 @@ export default {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
isCompetitorEngine: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
fillerPersons: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
@ -177,17 +185,17 @@ export default {
|
||||
},
|
||||
formRules() {
|
||||
const rules = {
|
||||
subsystem: [
|
||||
{ required: true, message: '请选择子系统', trigger: 'change' }
|
||||
],
|
||||
subsystem: [{ required: true, message: '请选择子系统', trigger: 'change' }],
|
||||
userId: [
|
||||
{ required: true, message: this.dispatchType === 'update_param' ? '请选择人员' : '请选择责任人', trigger: 'change' }
|
||||
{
|
||||
required: true,
|
||||
message: this.dispatchType === 'update_param' ? '请选择人员' : '请选择责任人',
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
}
|
||||
// 添加部门验证(两种模式都需要)
|
||||
rules.department = [
|
||||
{ required: true, message: '请选择部门', trigger: 'change' }
|
||||
]
|
||||
rules.department = [{ required: true, message: '请选择部门', trigger: 'change' }]
|
||||
// 如果是批量修改填写人,添加零部件名称验证
|
||||
if (this.dispatchType === 'update_param') {
|
||||
rules.partsName = [
|
||||
@ -212,7 +220,7 @@ export default {
|
||||
// 将 · 替换为 -
|
||||
const normalizedDept = department.replace(/·/g, '-')
|
||||
// 按 - 分割
|
||||
const parts = normalizedDept.split('-').filter(part => part.trim() !== '')
|
||||
const parts = normalizedDept.split('-').filter((part) => part.trim() !== '')
|
||||
// 只显示最后一个节点
|
||||
if (parts.length > 0) {
|
||||
return parts[parts.length - 1]
|
||||
@ -393,13 +401,23 @@ export default {
|
||||
this.availableDepartments = []
|
||||
this.userOptions = []
|
||||
// 根据子系统和零部件名称筛选部门列表
|
||||
if (partsNames && Array.isArray(partsNames) && partsNames.length > 0 && this.formData.subsystem) {
|
||||
if (
|
||||
partsNames &&
|
||||
Array.isArray(partsNames) &&
|
||||
partsNames.length > 0 &&
|
||||
this.formData.subsystem
|
||||
) {
|
||||
this.filterDepartmentsByPartsName()
|
||||
}
|
||||
},
|
||||
// 根据子系统和零部件名称筛选部门列表(仅用于批量修改填写人)
|
||||
filterDepartmentsByPartsName() {
|
||||
if (!this.formData.subsystem || !this.formData.partsName || !Array.isArray(this.formData.partsName) || this.formData.partsName.length === 0) {
|
||||
if (
|
||||
!this.formData.subsystem ||
|
||||
!this.formData.partsName ||
|
||||
!Array.isArray(this.formData.partsName) ||
|
||||
this.formData.partsName.length === 0
|
||||
) {
|
||||
this.availableDepartments = []
|
||||
return
|
||||
}
|
||||
@ -448,10 +466,7 @@ export default {
|
||||
const matchedItem = this.allManagerData.find((item) => {
|
||||
// 检查子系统是否匹配
|
||||
const itemSubsystems = item.subsystem ? item.subsystem.split(',') : []
|
||||
return (
|
||||
itemSubsystems.includes(this.formData.subsystem) &&
|
||||
item.department === department
|
||||
)
|
||||
return itemSubsystems.includes(this.formData.subsystem) && item.department === department
|
||||
})
|
||||
if (matchedItem) {
|
||||
// 找到现责任人
|
||||
@ -475,7 +490,9 @@ export default {
|
||||
}
|
||||
if (!query || query.trim() === '') {
|
||||
if (this.formData.userId) {
|
||||
const selectedOptions = this.userOptions.filter((opt) => opt.userId === this.formData.userId)
|
||||
const selectedOptions = this.userOptions.filter(
|
||||
(opt) => opt.userId === this.formData.userId
|
||||
)
|
||||
this.userOptions = selectedOptions
|
||||
} else {
|
||||
this.userOptions = []
|
||||
@ -531,7 +548,9 @@ export default {
|
||||
.asyncErrorCatch((err) => {
|
||||
console.error('搜索责任人失败:', err)
|
||||
if (this.formData.userId) {
|
||||
const selectedOptions = this.userOptions.filter((opt) => opt.userId === this.formData.userId)
|
||||
const selectedOptions = this.userOptions.filter(
|
||||
(opt) => opt.userId === this.formData.userId
|
||||
)
|
||||
this.userOptions = selectedOptions
|
||||
} else {
|
||||
this.userOptions = []
|
||||
@ -583,7 +602,11 @@ export default {
|
||||
// 如果是批量修改填写人,不调用接口,直接触发确认事件
|
||||
if (this.dispatchType === 'update_param') {
|
||||
// 验证零部件名称
|
||||
if (!this.formData.partsName || !Array.isArray(this.formData.partsName) || this.formData.partsName.length === 0) {
|
||||
if (
|
||||
!this.formData.partsName ||
|
||||
!Array.isArray(this.formData.partsName) ||
|
||||
this.formData.partsName.length === 0
|
||||
) {
|
||||
this.$message.warning('请至少选择一个零部件名称')
|
||||
return
|
||||
}
|
||||
@ -604,7 +627,29 @@ export default {
|
||||
return
|
||||
}
|
||||
|
||||
// 批量修改责任人:根据是否有现责任人,决定调用新增还是修改接口
|
||||
// 批量修改责任人
|
||||
// 竞品发动机:不调用新增/修改责任人接口,只把选择结果抛给父组件做前端替换
|
||||
if (this.isCompetitorEngine) {
|
||||
// 先取出表单值再关闭弹窗,否则 closeModal 会清空 formData 导致传参为空
|
||||
const confirmPayload = {
|
||||
subsystem: this.formData.subsystem,
|
||||
department: this.formData.department,
|
||||
oldResponsiblePersonId: this.formData.currentResponsibleId || '',
|
||||
newResponsiblePersonId: this.formData.userNumber || this.formData.userId,
|
||||
userId: this.formData.userId,
|
||||
username: this.formData.username || ''
|
||||
}
|
||||
this.submitting = false
|
||||
this.closeModal()
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '修改成功'
|
||||
})
|
||||
this.$emit('confirm', confirmPayload)
|
||||
return
|
||||
}
|
||||
|
||||
// 非竞品:根据是否有现责任人,决定调用新增还是修改接口
|
||||
if (this.formData.currentResponsibleId && this.formData.rowId) {
|
||||
// 有现责任人,调用修改接口
|
||||
const request = {
|
||||
@ -711,11 +756,11 @@ export default {
|
||||
children: undefined
|
||||
}
|
||||
if (node.children && Array.isArray(node.children) && node.children.length > 0) {
|
||||
formatted.children = node.children.map(child => formatNode(child))
|
||||
formatted.children = node.children.map((child) => formatNode(child))
|
||||
}
|
||||
return formatted
|
||||
}
|
||||
return data.map(node => formatNode(node))
|
||||
return data.map((node) => formatNode(node))
|
||||
},
|
||||
// 根据部门名称获取部门ID(从部门树中查找)
|
||||
getDepartmentIdByDepartment(department) {
|
||||
@ -723,7 +768,7 @@ export default {
|
||||
// 如果部门树没有加载,尝试从 allManagerData 中查找
|
||||
if (this.allManagerData && this.allManagerData.length > 0) {
|
||||
const matchedItem = this.allManagerData.find((item) => item.department === department)
|
||||
return matchedItem ? (matchedItem.departmentId || '') : ''
|
||||
return matchedItem ? matchedItem.departmentId || '' : ''
|
||||
}
|
||||
return ''
|
||||
}
|
||||
@ -751,7 +796,7 @@ export default {
|
||||
// 如果找不到,尝试从 allManagerData 中查找
|
||||
if (this.allManagerData && this.allManagerData.length > 0) {
|
||||
const matchedItem = this.allManagerData.find((item) => item.department === department)
|
||||
return matchedItem ? (matchedItem.departmentId || '') : ''
|
||||
return matchedItem ? matchedItem.departmentId || '' : ''
|
||||
}
|
||||
return ''
|
||||
},
|
||||
|
||||
@ -0,0 +1,557 @@
|
||||
<template>
|
||||
<div class="manager-data-page custom-page">
|
||||
<div class="page-content">
|
||||
<div class="header-section">
|
||||
<div class="title">
|
||||
权限查看
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-search-panel">
|
||||
<div class="searched-fields">
|
||||
<div class="searched-field">
|
||||
<span class="fielded-label">角色名称</span>
|
||||
<el-input v-model="searchPanelValue.roleName" placeholder="请输入" />
|
||||
</div>
|
||||
<div class="searched-field">
|
||||
<span class="fielded-label">成员名称</span>
|
||||
<el-input v-model="searchPanelValue.username" placeholder="请输入" />
|
||||
</div>
|
||||
<div class="searched-field">
|
||||
<span class="fielded-label">成员部门</span>
|
||||
<el-input v-model="searchPanelValue.department" placeholder="请输入" />
|
||||
</div>
|
||||
<div class="search-actions">
|
||||
<el-button type="primary" @click="handleExport">
|
||||
导出
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handleSearch">
|
||||
查询
|
||||
</el-button>
|
||||
<el-button @click="resetSearch">
|
||||
重置
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-section">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%"
|
||||
:max-height="tableMaxHeight"
|
||||
>
|
||||
<el-table-column prop="roleName" label="角色名称" width="140" align="center" />
|
||||
<el-table-column prop="username" label="成员姓名" width="120" align="center" />
|
||||
<el-table-column prop="userNumber" label="成员工号" width="120" align="center" />
|
||||
<el-table-column prop="department" label="成员部门" width="160" align="center" />
|
||||
<el-table-column label="查看权限" align="left">
|
||||
<template slot-scope="scope">
|
||||
<span class="perms-cell">{{ scope.row.roleName === '超级管理员' ? '全部权限' : formatPerms(scope.row.queryPerms) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="编辑权限" align="left">
|
||||
<template slot-scope="scope">
|
||||
<span class="perms-cell">{{ scope.row.roleName === '超级管理员' ? '全部权限' : formatPerms(scope.row.editPerms) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template slot="empty">
|
||||
<div class="table-empty">
|
||||
<template>
|
||||
<div style="padding: 40px 0; text-align: center; color: #909399;">
|
||||
<div style="font-size: 14px;">
|
||||
暂无数据
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
</el-table>
|
||||
<div class="pagination-section">
|
||||
<el-pagination
|
||||
:current-page="pagination.currentPage"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="pagination.pageSize"
|
||||
:total="pagination.total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import api from '@/api'
|
||||
import { getUserId } from '@/utils'
|
||||
export default {
|
||||
name: 'ManagerData',
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
/** 表格最大高度,留出顶部搜索、分页等空间,保证分页器可见 */
|
||||
tableMaxHeight: 450,
|
||||
pagination: {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
},
|
||||
searchPanelValue: {
|
||||
roleName: '',
|
||||
username: '',
|
||||
department: ''
|
||||
},
|
||||
subsystemList: [],
|
||||
searchTimer: null, // 防抖定时器
|
||||
currentRequest: null // 当前请求引用
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.loadManagerData()
|
||||
// 先检查 localStorage 中是否已有权限数据,如果有则先检查权限
|
||||
if (this.hasViewPermission()) {
|
||||
// this.loadManagerData()
|
||||
} else {
|
||||
this.tableData = []
|
||||
}
|
||||
// 同时加载最新的权限数据
|
||||
this.loadUserSelfRole()
|
||||
.then(() => {
|
||||
// 权限加载完成后重新检查权限
|
||||
if (this.hasViewPermission()) {
|
||||
// 如果之前没有权限,现在有权限了,则加载数据
|
||||
if (this.tableData.length === 0) {
|
||||
// this.loadManagerData()
|
||||
}
|
||||
} else {
|
||||
// 无权限时不加载数据,显示空列表
|
||||
this.tableData = []
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// 如果加载权限失败,保持当前状态
|
||||
console.error('加载权限数据失败')
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
// 清理定时器和请求
|
||||
if (this.searchTimer) {
|
||||
clearTimeout(this.searchTimer)
|
||||
this.searchTimer = null
|
||||
}
|
||||
this.currentRequest = null
|
||||
},
|
||||
methods: {
|
||||
// 将 \n 转为换行显示(支持字符串中的字面量 \n 或真实换行符)
|
||||
formatPerms(val) {
|
||||
if (val == null || val === '') return '无权限'
|
||||
const str = String(val)
|
||||
return str.replace(/\\n/g, '\n')
|
||||
},
|
||||
// 检查是否是管理员(isAdmin === 1)
|
||||
isAdmin() {
|
||||
try {
|
||||
const permissionDataStr = localStorage.getItem('user_self_role')
|
||||
if (!permissionDataStr) {
|
||||
return false
|
||||
}
|
||||
const permissionData = JSON.parse(permissionDataStr)
|
||||
if (!Array.isArray(permissionData)) {
|
||||
return false
|
||||
}
|
||||
// 检查是否有 isAdmin === 1 的记录
|
||||
return permissionData.some((perm) => perm.isAdmin === 1 || perm.isAdmin === '1')
|
||||
} catch (err) {
|
||||
console.error('检查管理员权限失败:', err)
|
||||
return false
|
||||
}
|
||||
},
|
||||
// 检查是否有查看数据的权限
|
||||
hasViewPermission() {
|
||||
// 1. 如果是管理员,拥有全部权限
|
||||
if (this.isAdmin()) {
|
||||
return true
|
||||
}
|
||||
try {
|
||||
const permissionDataStr = localStorage.getItem('user_self_role')
|
||||
if (!permissionDataStr) {
|
||||
return false
|
||||
}
|
||||
const permissionData = JSON.parse(permissionDataStr)
|
||||
if (!Array.isArray(permissionData)) {
|
||||
return false
|
||||
}
|
||||
// 2. 检查是否有 permissionPath 等于 "基础管理模块" 的权限(查看或编辑)
|
||||
return permissionData.some((perm) => {
|
||||
const permissionPath = perm.permissionPath || ''
|
||||
return permissionPath === '基础管理模块'
|
||||
})
|
||||
} catch (err) {
|
||||
console.error('检查查看权限失败:', err)
|
||||
return false
|
||||
}
|
||||
},
|
||||
// 检查是否有编辑权限
|
||||
hasEditPermission() {
|
||||
// 1. 如果是管理员,拥有全部权限
|
||||
if (this.isAdmin()) {
|
||||
return true
|
||||
}
|
||||
try {
|
||||
const permissionDataStr = localStorage.getItem('user_self_role')
|
||||
if (!permissionDataStr) {
|
||||
return false
|
||||
}
|
||||
const permissionData = JSON.parse(permissionDataStr)
|
||||
if (!Array.isArray(permissionData)) {
|
||||
return false
|
||||
}
|
||||
// 2. 检查是否有 permissionPath 等于 "基础管理模块" 且 parameterPer 是 "编辑" 的权限
|
||||
// 检查所有 user-self-role,只要有一个是编辑权限就返回 true
|
||||
return permissionData.some((perm) => {
|
||||
const permissionPath = perm.permissionPath || ''
|
||||
const parameterPer = perm.parameterPer || ''
|
||||
// 检查 permissionPath 是否等于 "基础管理模块" 且 parameterPer 是 "编辑" 或 2
|
||||
return (
|
||||
permissionPath === '基础管理模块' &&
|
||||
(parameterPer === '编辑' || parameterPer === 2 || parameterPer === '2')
|
||||
)
|
||||
})
|
||||
} catch (err) {
|
||||
console.error('检查编辑权限失败:', err)
|
||||
return false
|
||||
}
|
||||
},
|
||||
// 加载用户自身角色权限
|
||||
loadUserSelfRole() {
|
||||
const request = {
|
||||
...api.GET_USER_SELF_ROLE,
|
||||
params: {
|
||||
userOrDepID: getUserId()
|
||||
},
|
||||
disableSuccessMsg: true
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$request(request)
|
||||
.asyncThen((resp) => {
|
||||
if (resp && resp.data) {
|
||||
// 将权限数据存储到 localStorage
|
||||
try {
|
||||
localStorage.setItem('user_self_role', JSON.stringify(resp.data))
|
||||
resolve(resp.data)
|
||||
} catch (err) {
|
||||
console.error('存储权限数据到 localStorage 失败:', err)
|
||||
reject(err)
|
||||
}
|
||||
} else {
|
||||
resolve(null)
|
||||
}
|
||||
})
|
||||
.asyncErrorCatch((err) => {
|
||||
console.error('获取用户自身角色失败:', err)
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
},
|
||||
loadSubsystemList() {
|
||||
const request = {
|
||||
...api.GET_SUBSYSTEM_LIST,
|
||||
disableSuccessMsg: true
|
||||
}
|
||||
this.$request(request)
|
||||
.asyncThen((resp) => {
|
||||
console.log(resp)
|
||||
if (resp && resp.data) {
|
||||
this.subsystemList = resp.data
|
||||
} else {
|
||||
this.subsystemList = []
|
||||
}
|
||||
})
|
||||
.asyncErrorCatch((err) => {
|
||||
console.error('加载子系统列表失败:', err)
|
||||
})
|
||||
},
|
||||
|
||||
loadManagerData() {
|
||||
const request = {
|
||||
...api.CHECK_PERMISSION_USER_DATA,
|
||||
params: {
|
||||
pageNum: this.pagination.currentPage,
|
||||
pageSize: this.pagination.pageSize,
|
||||
roleName: this.searchPanelValue.roleName,
|
||||
username: this.searchPanelValue.username,
|
||||
department: this.searchPanelValue.department
|
||||
},
|
||||
disableSuccessMsg: true
|
||||
}
|
||||
this.$request(request)
|
||||
.asyncThen((resp) => {
|
||||
// 处理返回数据,支持不同的数据结构
|
||||
if (resp && resp.data) {
|
||||
this.tableData = resp.data.list || []
|
||||
// 如果返回对象中有 total 字段
|
||||
this.pagination.total = resp.data.totalCount || 0
|
||||
} else {
|
||||
this.tableData = []
|
||||
this.pagination.total = 0
|
||||
}
|
||||
})
|
||||
.asyncErrorCatch((err) => {
|
||||
console.error('加载管理数据失败:', err)
|
||||
this.tableData = []
|
||||
this.pagination.total = 0
|
||||
})
|
||||
},
|
||||
handleSearch() {
|
||||
this.pagination.currentPage = 1
|
||||
this.loadManagerData()
|
||||
},
|
||||
resetSearch() {
|
||||
this.searchPanelValue = {
|
||||
roleName: '',
|
||||
username: '',
|
||||
department: ''
|
||||
}
|
||||
this.loadManagerData()
|
||||
},
|
||||
// 处理每页条数变化
|
||||
handleSizeChange(val) {
|
||||
this.pagination.pageSize = val
|
||||
this.pagination.currentPage = 1 // 重置到第一页
|
||||
this.loadManagerData()
|
||||
},
|
||||
// 处理当前页变化
|
||||
handleCurrentChange(val) {
|
||||
this.pagination.currentPage = val
|
||||
this.loadManagerData()
|
||||
},
|
||||
// 处理刷新
|
||||
handleRefresh() {
|
||||
this.pagination.currentPage = 1
|
||||
this.loadManagerData()
|
||||
},
|
||||
// 导出
|
||||
handleExport() {
|
||||
const { url, method = 'get', headers = {} } = api.EXPORT_PERMISSION_USER_DATA || {}
|
||||
const requestConfig = {
|
||||
url,
|
||||
method,
|
||||
responseType: 'blob',
|
||||
headers,
|
||||
disableSuccessMsg: true
|
||||
}
|
||||
if (!requestConfig.url) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '未配置下载地址'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.$axios(requestConfig)
|
||||
.then((response) => {
|
||||
const blobData = response.data
|
||||
if (!blobData) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '导出失败,文件内容为空'
|
||||
})
|
||||
return
|
||||
}
|
||||
const contentType =
|
||||
response.headers &&
|
||||
(response.headers['content-type'] || response.headers['Content-Type'])
|
||||
if (contentType && contentType.includes('application/json')) {
|
||||
try {
|
||||
const reader = new FileReader()
|
||||
reader.onload = () => {
|
||||
try {
|
||||
const errorData = JSON.parse(reader.result)
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: errorData.message || '导出失败'
|
||||
})
|
||||
} catch (e) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '导出失败'
|
||||
})
|
||||
}
|
||||
}
|
||||
reader.readAsText(blobData)
|
||||
} catch (err) {
|
||||
console.error('解析导出失败响应异常:', err)
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '导出失败'
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
const disposition =
|
||||
response.headers &&
|
||||
(response.headers['content-disposition'] || response.headers['Content-Disposition'])
|
||||
let filename = '责任人管理数据.xlsx'
|
||||
if (disposition) {
|
||||
const filenameMatch = /filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i.exec(
|
||||
disposition
|
||||
)
|
||||
const matchedName = filenameMatch ? filenameMatch[1] || filenameMatch[2] : ''
|
||||
if (matchedName) {
|
||||
try {
|
||||
filename = decodeURIComponent(matchedName)
|
||||
} catch (err) {
|
||||
filename = matchedName
|
||||
}
|
||||
}
|
||||
}
|
||||
const downloadUrl = window.URL.createObjectURL(blobData)
|
||||
const link = document.createElement('a')
|
||||
link.href = downloadUrl
|
||||
link.download = filename
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
window.URL.revokeObjectURL(downloadUrl)
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '导出成功'
|
||||
})
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('导出失败:', err)
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '导出失败,请稍后重试'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.manager-data-page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20px;
|
||||
background: #fff;
|
||||
|
||||
.page-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.header-section {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
|
||||
.comment-text {
|
||||
color: #909399;
|
||||
font-size: 14px;
|
||||
}
|
||||
.title {
|
||||
color: #303133;
|
||||
font-weight: 700;
|
||||
margin-left: 20px;
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex: 1;
|
||||
flex: 1;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.table-section {
|
||||
width: 100%;
|
||||
|
||||
.perms-cell {
|
||||
white-space: pre-line;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.table-toolbar {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.pagination-section {
|
||||
margin-top: 16px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.link-separator {
|
||||
margin: 0 8px;
|
||||
color: #dcdfe6;
|
||||
}
|
||||
|
||||
.footer-comment {
|
||||
margin-top: 16px;
|
||||
|
||||
.red-comment {
|
||||
color: #f56c6c;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .el-popper {
|
||||
width: auto !important;
|
||||
}
|
||||
.page-content {
|
||||
width: calc(100% - 80px) !important;
|
||||
}
|
||||
.handler-select {
|
||||
width: 100%;
|
||||
}
|
||||
.el-select-dropdown__item {
|
||||
display: flex !important;
|
||||
justify-content: space-between !important;
|
||||
padding-right: 20px !important;
|
||||
}
|
||||
.username-text {
|
||||
color: #303133 !important;
|
||||
display: inline-block;
|
||||
text-align: right !important;
|
||||
}
|
||||
.user-id-text {
|
||||
color: #909399 !important;
|
||||
display: inline-block;
|
||||
margin-left: 20px;
|
||||
margin-right: 30px;
|
||||
text-align: right !important;
|
||||
}
|
||||
.department-tree-search {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.department-tree {
|
||||
max-height: 400px;
|
||||
overflow-y: auto;
|
||||
border: 1px solid #ebeef5;
|
||||
border-radius: 4px;
|
||||
padding: 8px;
|
||||
}
|
||||
.import-uploader {
|
||||
width: 100%;
|
||||
.el-upload {
|
||||
width: 100%;
|
||||
}
|
||||
.el-upload-dragger {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
::v-deep .el-button {
|
||||
line-height: 0.85 !important;
|
||||
}
|
||||
::v-deep .searched-fields{
|
||||
display: flex;
|
||||
gap: 6px !important;
|
||||
}
|
||||
</style>
|
||||
@ -15,7 +15,7 @@
|
||||
<el-select
|
||||
v-model="currentVersionId"
|
||||
size="small"
|
||||
:disabled="!canSwitchVersion || isEditMode || isEditDeptMode"
|
||||
:disabled="!canSwitchVersion || isEditMode || isEditDeptMode || isTreeAndContentLoading"
|
||||
style="width: 120px;"
|
||||
@change="onVersionChange"
|
||||
>
|
||||
@ -35,6 +35,9 @@
|
||||
<el-button size="small" @click="handleBatchModifyResponsible">
|
||||
{{ dispatchType === 'update_param' ? '批量修改填写人' : '批量修改责任人' }}
|
||||
</el-button>
|
||||
<el-button v-if="isCompetitiveEngineEntry" size="small" @click="handleReplaceAllPerson">
|
||||
{{ dispatchType === 'update_param' ? '修改全部填写人' : '修改全部责任人' }}
|
||||
</el-button>
|
||||
<!-- <el-button size="small" @click="handleSave">保存</el-button> -->
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -134,7 +137,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="!isApprovalMode" class="detail-body">
|
||||
<div
|
||||
v-if="!isApprovalMode"
|
||||
v-loading="isTreeAndContentLoading"
|
||||
class="detail-body"
|
||||
>
|
||||
<div class="left-tree-panel">
|
||||
<div class="tree-search-header">
|
||||
<el-radio-group v-model="treeSearchMode" size="mini" class="search-mode-switch">
|
||||
@ -188,15 +195,20 @@
|
||||
<div v-if="isWholeEngineParamsSelected" class="section" :key="sectionKey">
|
||||
<div class="section-title">{{ sectionKey }}</div>
|
||||
<div class="grid whole-engine-grid">
|
||||
<div class="grid-header whole-engine-header">
|
||||
<div
|
||||
class="grid-header whole-engine-header"
|
||||
:class="{ 'without-parameter-source': isCompetitiveEngineEntry }"
|
||||
>
|
||||
<div class="cell header-cell">参数名称</div>
|
||||
<div class="cell header-cell">单位</div>
|
||||
<div class="cell header-cell">参数值</div>
|
||||
<div v-if="!isCompetitiveEngineEntry" class="cell header-cell">参数计划来源</div>
|
||||
</div>
|
||||
<div
|
||||
class="grid-row whole-engine-row"
|
||||
v-for="(row, idx) in sectionData"
|
||||
:key="sectionKey + '-' + idx"
|
||||
:class="{ 'without-parameter-source': isCompetitiveEngineEntry }"
|
||||
>
|
||||
<div class="cell">{{ row.parameterName }}</div>
|
||||
<div class="cell">
|
||||
@ -205,6 +217,9 @@
|
||||
<div class="cell">
|
||||
<span>{{ row.parameterValue || '/' }}</span>
|
||||
</div>
|
||||
<div v-if="!isCompetitiveEngineEntry" class="cell">
|
||||
<span>{{ row.parameterSource || '/' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -219,12 +234,14 @@
|
||||
:class="{
|
||||
'edit-mode': isEditMode && !isDispatchMode,
|
||||
'dispatch-mode': isDispatchMode && dispatchType !== 'update_param',
|
||||
'dispatch-filler-mode': isDispatchMode && dispatchType === 'update_param'
|
||||
'dispatch-filler-mode': isDispatchMode && dispatchType === 'update_param',
|
||||
'without-parameter-source': isCompetitiveEngineEntry
|
||||
}"
|
||||
>
|
||||
<div class="cell header-cell">参数名称</div>
|
||||
<div class="cell header-cell">单位</div>
|
||||
<div class="cell header-cell">参数值</div>
|
||||
<div v-if="!isCompetitiveEngineEntry" class="cell header-cell">参数计划来源</div>
|
||||
<div class="cell header-cell" v-if="!isEditMode || isDispatchMode">填写部门</div>
|
||||
<div
|
||||
class="cell header-cell"
|
||||
@ -253,7 +270,8 @@
|
||||
:class="{
|
||||
'edit-mode': isEditMode && !isDispatchMode,
|
||||
'dispatch-mode': isDispatchMode && dispatchType !== 'update_param',
|
||||
'dispatch-filler-mode': isDispatchMode && dispatchType === 'update_param'
|
||||
'dispatch-filler-mode': isDispatchMode && dispatchType === 'update_param',
|
||||
'without-parameter-source': isCompetitiveEngineEntry
|
||||
}"
|
||||
>
|
||||
<div class="cell">{{ row.parameterName }}</div>
|
||||
@ -274,6 +292,9 @@
|
||||
}}</span>
|
||||
<span v-else>{{ row.parameterValue || '/' }}</span>
|
||||
</div>
|
||||
<div v-if="!isCompetitiveEngineEntry" class="cell">
|
||||
<span>{{ row.parameterSource || '/' }}</span>
|
||||
</div>
|
||||
<div v-if="!isEditMode || isDispatchMode" class="cell">
|
||||
<span v-if="!isEditDeptMode">{{ formatDepartmentDisplay(row.department) }}</span>
|
||||
<el-select
|
||||
@ -528,6 +549,7 @@
|
||||
<batch-modify-responsible-modal
|
||||
ref="batchModifyResponsibleModal"
|
||||
:responsible-persons="responsiblePersons"
|
||||
:is-competitor-engine="isCompetitiveEngineEntry"
|
||||
:filler-persons="fillerPersons"
|
||||
:dispatch-type="dispatchType"
|
||||
:version-data="versionData"
|
||||
@ -536,6 +558,55 @@
|
||||
@refresh-responsible-persons="loadResponsiblePersons"
|
||||
/>
|
||||
|
||||
<!-- 竞品发动机:修改全部填写人/责任人(仅选人,不触发修改责任人接口) -->
|
||||
<el-dialog
|
||||
:title="dispatchType === 'update_param' ? '修改全部填写人' : '修改全部责任人'"
|
||||
:visible.sync="replaceAllPersonDialogVisible"
|
||||
width="520px"
|
||||
append-to-body
|
||||
@close="handleReplaceAllPersonDialogClose"
|
||||
>
|
||||
<el-form ref="replaceAllPersonForm" :model="replaceAllPersonFormData" label-width="90px">
|
||||
<el-form-item
|
||||
label="人员:"
|
||||
prop="userId"
|
||||
:rules="[{ required: true, message: '请选择人员', trigger: 'change' }]"
|
||||
>
|
||||
<el-select
|
||||
v-model="replaceAllPersonFormData.userId"
|
||||
placeholder="请输入人员姓名进行搜索"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
:remote-method="handleReplaceAllPersonRemoteSearch"
|
||||
:loading="replaceAllPersonUserLoading"
|
||||
@change="handleReplaceAllPersonChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="person in replaceAllPersonUserOptions"
|
||||
:key="person.userNumber"
|
||||
:value="person.userId"
|
||||
:label="person.username"
|
||||
>
|
||||
<span class="username-text">{{ person.username }}</span>
|
||||
<span class="user-id-text">{{ person.userNumber }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleReplaceAllPersonDialogClose">取消</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
:loading="replaceAllPersonSubmitting"
|
||||
@click="handleReplaceAllPersonConfirm"
|
||||
>
|
||||
确定
|
||||
</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 批量修改部门弹窗 -->
|
||||
<el-dialog
|
||||
title="批量修改部门"
|
||||
@ -702,6 +773,7 @@ export default {
|
||||
batchModifyDeptPartsNameList: [], // 零部件名称列表
|
||||
batchModifyDeptSearchText: '', // 批量修改部门搜索文本
|
||||
currentVersionId: '',
|
||||
isTreeAndContentLoading: false, // 左侧树和右侧内容区域 loading 状态
|
||||
hasVersionChanged: false, // 是否切换过版本
|
||||
treeFilterText: '',
|
||||
treeSearchMode: 'subsystem', // 搜索模式:'subsystem' 搜索子系统,'parts' 搜索零部件名称
|
||||
@ -713,6 +785,16 @@ export default {
|
||||
fillerPersons: [], // 填写人列表(从 GET_FILLER_DATA 接口获取)
|
||||
fillerUserOptions: {}, // 填写人选项(按行存储,key: rowId, value: [userOptions])
|
||||
fillerUserLoading: false, // 填写人搜索loading状态
|
||||
// 竞品发动机:修改全部填写人/责任人(只选人)
|
||||
replaceAllPersonDialogVisible: false,
|
||||
replaceAllPersonSubmitting: false,
|
||||
replaceAllPersonFormData: {
|
||||
userId: '',
|
||||
userNumber: '',
|
||||
username: ''
|
||||
},
|
||||
replaceAllPersonUserOptions: [],
|
||||
replaceAllPersonUserLoading: false,
|
||||
// 树节点ID到右侧数据部分的映射
|
||||
versions: [],
|
||||
treeData: [],
|
||||
@ -918,6 +1000,17 @@ export default {
|
||||
整车参数: params
|
||||
}
|
||||
},
|
||||
// 竞品发动机入口判断:整机参数中是否存在“生产日期”参数
|
||||
// 规则:只要整机参数列表中出现“生产日期”,即视为竞品发动机入口
|
||||
isCompetitiveEngineEntry() {
|
||||
if (!this.wholeEngineParamsRawData || !Array.isArray(this.wholeEngineParamsRawData)) {
|
||||
return false
|
||||
}
|
||||
return this.wholeEngineParamsRawData.some((raw) => {
|
||||
const name = String(raw || '').split(':')[0]
|
||||
return String(name || '').trim() === '生产日期'
|
||||
})
|
||||
},
|
||||
// 流程详情
|
||||
progressDetail() {
|
||||
if (this.progressDetailData && Object.keys(this.progressDetailData).length > 0) {
|
||||
@ -1575,6 +1668,9 @@ export default {
|
||||
},
|
||||
// 加载责任人列表(从 GET_MANAGER_DATA 接口获取)
|
||||
loadResponsiblePersons() {
|
||||
if(this.isCompetitiveEngineEntry) {
|
||||
|
||||
}else{
|
||||
const request = {
|
||||
...api.GET_MANAGER_DATA,
|
||||
params: {
|
||||
@ -1605,6 +1701,8 @@ export default {
|
||||
console.error('加载责任人列表失败:', err)
|
||||
this.responsiblePersons = []
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
// 加载填写人列表(从 GET_FILLER_DATA 接口获取)
|
||||
loadFillerPersons() {
|
||||
@ -1829,6 +1927,10 @@ export default {
|
||||
return time
|
||||
},
|
||||
onVersionChange() {
|
||||
// loading 期间禁用版本切换事件
|
||||
if (this.isTreeAndContentLoading) {
|
||||
return
|
||||
}
|
||||
// 标记已切换版本
|
||||
this.hasVersionChanged = true
|
||||
// 切换版本时,如果处于编辑模式,退出编辑模式并恢复原始数据
|
||||
@ -2602,6 +2704,204 @@ export default {
|
||||
// 直接打开弹窗,弹窗内部会处理数据加载
|
||||
this.$refs.batchModifyResponsibleModal.showModal()
|
||||
},
|
||||
// 竞品发动机:修改全部填写人/责任人(仅选人,不触发修改责任人接口)
|
||||
handleReplaceAllPerson() {
|
||||
this.replaceAllPersonDialogVisible = true
|
||||
this.replaceAllPersonSubmitting = false
|
||||
this.replaceAllPersonFormData = {
|
||||
userId: '',
|
||||
userNumber: '',
|
||||
username: ''
|
||||
}
|
||||
this.replaceAllPersonUserOptions = []
|
||||
this.replaceAllPersonUserLoading = false
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.replaceAllPersonForm) {
|
||||
this.$refs.replaceAllPersonForm.clearValidate()
|
||||
}
|
||||
})
|
||||
},
|
||||
handleReplaceAllPersonDialogClose() {
|
||||
this.replaceAllPersonDialogVisible = false
|
||||
this.replaceAllPersonSubmitting = false
|
||||
this.replaceAllPersonFormData = {
|
||||
userId: '',
|
||||
userNumber: '',
|
||||
username: ''
|
||||
}
|
||||
this.replaceAllPersonUserOptions = []
|
||||
this.replaceAllPersonUserLoading = false
|
||||
},
|
||||
handleReplaceAllPersonRemoteSearch(query) {
|
||||
if (!query || query.trim() === '') {
|
||||
if (this.replaceAllPersonFormData.userId) {
|
||||
const selectedOptions = this.replaceAllPersonUserOptions.filter(
|
||||
(opt) => opt.userId === this.replaceAllPersonFormData.userId
|
||||
)
|
||||
this.replaceAllPersonUserOptions = selectedOptions
|
||||
} else {
|
||||
this.replaceAllPersonUserOptions = []
|
||||
}
|
||||
return
|
||||
}
|
||||
this.replaceAllPersonUserLoading = true
|
||||
const trimmedQuery = query.trim()
|
||||
const request = {
|
||||
...api.GET_ALLUSERS,
|
||||
params: {
|
||||
name: trimmedQuery
|
||||
},
|
||||
disableSuccessMsg: true
|
||||
}
|
||||
this.$request(request)
|
||||
.asyncThen((resp) => {
|
||||
const respData = resp && resp.data
|
||||
let result = []
|
||||
if (Array.isArray(respData)) {
|
||||
result = respData
|
||||
} else if (respData && Array.isArray(respData.result)) {
|
||||
result = respData.result
|
||||
} else if (respData && respData.data && Array.isArray(respData.data)) {
|
||||
result = respData.data
|
||||
}
|
||||
const users = result
|
||||
.map((user) => ({
|
||||
userId: user.userId || user.id,
|
||||
username: user.username || user.name,
|
||||
userNumber: user.userNumber || user.userId || user.id
|
||||
}))
|
||||
.filter((user) => user.userId && user.userNumber)
|
||||
const selectedUserId = this.replaceAllPersonFormData.userId
|
||||
const selectedOptions = this.replaceAllPersonUserOptions.filter(
|
||||
(opt) => opt.userId && opt.userId === selectedUserId
|
||||
)
|
||||
const optionsMap = new Map()
|
||||
selectedOptions.forEach((opt) => {
|
||||
if (opt.userNumber) {
|
||||
optionsMap.set(opt.userNumber, opt)
|
||||
}
|
||||
})
|
||||
users.forEach((user) => {
|
||||
if (user.userNumber && !optionsMap.has(user.userNumber)) {
|
||||
optionsMap.set(user.userNumber, user)
|
||||
}
|
||||
})
|
||||
this.replaceAllPersonUserOptions = Array.from(optionsMap.values())
|
||||
this.replaceAllPersonUserLoading = false
|
||||
})
|
||||
.asyncErrorCatch((err) => {
|
||||
console.error('搜索人员失败:', err)
|
||||
if (this.replaceAllPersonFormData.userId) {
|
||||
const selectedOptions = this.replaceAllPersonUserOptions.filter(
|
||||
(opt) => opt.userId === this.replaceAllPersonFormData.userId
|
||||
)
|
||||
this.replaceAllPersonUserOptions = selectedOptions
|
||||
} else {
|
||||
this.replaceAllPersonUserOptions = []
|
||||
}
|
||||
this.replaceAllPersonUserLoading = false
|
||||
})
|
||||
},
|
||||
handleReplaceAllPersonChange(selectedUserId) {
|
||||
if (selectedUserId) {
|
||||
const selectedOption = this.replaceAllPersonUserOptions.find((opt) => opt.userId === selectedUserId)
|
||||
if (selectedOption) {
|
||||
this.replaceAllPersonFormData.userId = selectedOption.userId
|
||||
this.replaceAllPersonFormData.userNumber = selectedOption.userNumber || selectedOption.userId
|
||||
this.replaceAllPersonFormData.username = selectedOption.username || ''
|
||||
} else {
|
||||
this.replaceAllPersonFormData.userId = selectedUserId
|
||||
this.replaceAllPersonFormData.userNumber = selectedUserId
|
||||
this.replaceAllPersonFormData.username = ''
|
||||
}
|
||||
} else {
|
||||
this.replaceAllPersonFormData.userId = ''
|
||||
this.replaceAllPersonFormData.userNumber = ''
|
||||
this.replaceAllPersonFormData.username = ''
|
||||
}
|
||||
},
|
||||
handleReplaceAllPersonConfirm() {
|
||||
if (!this.$refs.replaceAllPersonForm) {
|
||||
return
|
||||
}
|
||||
this.$refs.replaceAllPersonForm.validate((valid) => {
|
||||
if (!valid) {
|
||||
return
|
||||
}
|
||||
const { userId, userNumber, username } = this.replaceAllPersonFormData
|
||||
if (!userId) {
|
||||
this.$message.warning('请选择人员')
|
||||
return
|
||||
}
|
||||
|
||||
const currentData = this.versionData[this.currentVersionId] || {}
|
||||
let updateCount = 0
|
||||
|
||||
if (this.dispatchType === 'update_param') {
|
||||
const fillerOption = {
|
||||
userId: userId,
|
||||
username: username || '',
|
||||
userNumber: userNumber || userId
|
||||
}
|
||||
Object.keys(currentData).forEach((dataPartsName) => {
|
||||
const params = currentData[dataPartsName] || []
|
||||
params.forEach((param, index) => {
|
||||
if (param.isDistributedFilled === 1) {
|
||||
return
|
||||
}
|
||||
param.filledBy = userId
|
||||
param.filledByUserId = userId
|
||||
param.filledByName = username || param.filledByName || ''
|
||||
this.$set(currentData[dataPartsName], index, param)
|
||||
|
||||
const rowId = param.id || `${param.subsystemName}-${param.parameterName}`
|
||||
if (!this.fillerUserOptions[rowId]) {
|
||||
this.$set(this.fillerUserOptions, rowId, [])
|
||||
}
|
||||
const existingOption = this.fillerUserOptions[rowId].find(
|
||||
(opt) => opt.userId === userId || opt.userNumber === userNumber
|
||||
)
|
||||
if (!existingOption) {
|
||||
this.fillerUserOptions[rowId].push(fillerOption)
|
||||
} else {
|
||||
existingOption.userId = userId
|
||||
existingOption.userNumber = userNumber || userId
|
||||
existingOption.username = username || existingOption.username || ''
|
||||
}
|
||||
|
||||
updateCount++
|
||||
})
|
||||
})
|
||||
} else {
|
||||
Object.keys(currentData).forEach((dataPartsName) => {
|
||||
const params = currentData[dataPartsName] || []
|
||||
params.forEach((param, index) => {
|
||||
if (param.isDistributedRes === 1) {
|
||||
return
|
||||
}
|
||||
param.resPersonId = userId
|
||||
param.owner = username || param.owner || ''
|
||||
this.$set(currentData[dataPartsName], index, param)
|
||||
updateCount++
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$forceUpdate()
|
||||
})
|
||||
|
||||
if (updateCount === 0) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '没有参数被修改'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.handleReplaceAllPersonDialogClose()
|
||||
})
|
||||
},
|
||||
handleBatchModifyConfirm(change) {
|
||||
// change 格式: { subsystem: '子系统名称', department: '部门名称', oldResponsiblePersonId: '1', newResponsiblePersonId: '2', userId: 'userId', userNumber: 'userNumber' }
|
||||
if (!change) {
|
||||
@ -2715,7 +3015,74 @@ export default {
|
||||
return
|
||||
}
|
||||
|
||||
// 批量修改责任人:重新加载责任人列表,确保数据是最新的
|
||||
// 批量修改责任人
|
||||
// 竞品发动机入口:只在前端替换页面上的责任人显示,不触发修改责任人相关接口
|
||||
if (this.isCompetitiveEngineEntry) {
|
||||
const { subsystem, department, userId, username } = change
|
||||
const hasUserId = userId !== undefined && userId !== null && userId !== ''
|
||||
if (!subsystem || !department || !hasUserId) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '缺少必要参数,无法更新责任人'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const currentData = this.versionData[this.currentVersionId] || {}
|
||||
// 人员名称:优先用弹窗传来的 username,其次从责任人列表中匹配
|
||||
let ownerName = username || ''
|
||||
if (!ownerName && Array.isArray(this.responsiblePersons) && this.responsiblePersons.length > 0) {
|
||||
const newResponsiblePersonId = change.newResponsiblePersonId
|
||||
const matchedPerson = this.responsiblePersons.find((p) => {
|
||||
const pid = p.userId || p.id || p.userNumber
|
||||
return (
|
||||
pid === userId ||
|
||||
(newResponsiblePersonId && (p.userNumber === newResponsiblePersonId || pid === newResponsiblePersonId))
|
||||
)
|
||||
})
|
||||
if (matchedPerson) {
|
||||
ownerName = matchedPerson.userName || matchedPerson.username || ''
|
||||
}
|
||||
}
|
||||
|
||||
let updatedCount = 0
|
||||
Object.keys(currentData).forEach((partsName) => {
|
||||
const params = currentData[partsName] || []
|
||||
params.forEach((param, index) => {
|
||||
// 只更新选中的子系统 + 部门,其他保持原值;已分发的责任人不动
|
||||
if (
|
||||
param.subsystemName === subsystem &&
|
||||
param.department === department &&
|
||||
param.isDistributedRes !== 1
|
||||
) {
|
||||
const newParam = {
|
||||
...param,
|
||||
resPersonId: userId,
|
||||
owner: ownerName || param.owner || ''
|
||||
}
|
||||
this.$set(currentData[partsName], index, newParam)
|
||||
updatedCount++
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
if (updatedCount === 0) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '未找到需要更新的责任人数据'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 强制刷新视图,避免缓存
|
||||
this.$nextTick(() => {
|
||||
this.$forceUpdate()
|
||||
})
|
||||
this.$message.success(`已更新 ${updatedCount} 条责任人记录`)
|
||||
return
|
||||
}
|
||||
|
||||
// 非竞品:保持原逻辑,重新加载责任人列表并刷新详情
|
||||
this.loadResponsiblePersons().then(() => {
|
||||
// 责任人列表加载完成后,重新调用接口获取详情数据并重新渲染责任人
|
||||
// 保存当前的选中节点,以便重新加载后恢复
|
||||
@ -2866,8 +3233,11 @@ export default {
|
||||
// 这里可以根据实际接口获取机型详情信息
|
||||
// 暂时使用 props 中的 detail 或 model
|
||||
console.log(this.detail, 'this.detail', this.detail.id)
|
||||
const tableDetailApi = this.filledBy
|
||||
? api.GET_ENGINE_TABLE_DETAIL_FOR_FILLED_BY
|
||||
: api.GET_ENGINE_TABLE_DETAIL
|
||||
const request = {
|
||||
...api.GET_ENGINE_TABLE_DETAIL,
|
||||
...tableDetailApi,
|
||||
params: {
|
||||
modelID: this.detail.id,
|
||||
parameterVersion: this.currentVersionId || 1 // 默认版本为1
|
||||
@ -2894,8 +3264,12 @@ export default {
|
||||
console.warn('缺少 detail.id,无法加载树数据')
|
||||
return
|
||||
}
|
||||
this.isTreeAndContentLoading = true
|
||||
const tableDetailApi = this.filledBy
|
||||
? api.GET_ENGINE_TABLE_DETAIL_FOR_FILLED_BY
|
||||
: api.GET_ENGINE_TABLE_DETAIL
|
||||
const request = {
|
||||
...api.GET_ENGINE_TABLE_DETAIL,
|
||||
...tableDetailApi,
|
||||
params: {
|
||||
modelID: this.detail.id,
|
||||
userID: getUserId(),
|
||||
@ -2959,13 +3333,18 @@ export default {
|
||||
}
|
||||
// 如果有 detail.id,加载详情数据(默认全选后自动加载)
|
||||
if (this.detail && this.detail.id && allKeys.length > 0) {
|
||||
this.loadEngineDetail()
|
||||
this.loadEngineDetail({ withPanelLoading: true })
|
||||
} else {
|
||||
this.isTreeAndContentLoading = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.isTreeAndContentLoading = false
|
||||
}
|
||||
})
|
||||
.asyncErrorCatch((err) => {
|
||||
console.error('获取参数列表失败:', err)
|
||||
this.isTreeAndContentLoading = false
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '获取参数列表失败'
|
||||
@ -3585,11 +3964,18 @@ export default {
|
||||
})
|
||||
},
|
||||
// 加载引擎详情数据
|
||||
loadEngineDetail() {
|
||||
loadEngineDetail(options = {}) {
|
||||
const { withPanelLoading = false } = options
|
||||
if (withPanelLoading) {
|
||||
this.isTreeAndContentLoading = true
|
||||
}
|
||||
// 优先使用 detail.id,如果没有则使用 currentEngineModelID
|
||||
const modelID = (this.detail && this.detail.id) || this.currentEngineModelID
|
||||
if (!modelID) {
|
||||
console.warn('缺少 engineModelID,无法加载详情')
|
||||
if (withPanelLoading) {
|
||||
this.isTreeAndContentLoading = false
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -3601,6 +3987,9 @@ export default {
|
||||
|
||||
// 如果没有选中任何节点,不调用接口
|
||||
if (subsystemNames.length === 0 && parameterTypes.length === 0) {
|
||||
if (withPanelLoading) {
|
||||
this.isTreeAndContentLoading = false
|
||||
}
|
||||
return
|
||||
}
|
||||
console.log(subsystemNames, parameterTypes, subsystemTypes)
|
||||
@ -3640,18 +4029,22 @@ export default {
|
||||
params.isRes = 1
|
||||
}
|
||||
|
||||
const request = {
|
||||
...api.GET_ENGINE_DETAIL,
|
||||
params: params,
|
||||
disableSuccessMsg: true
|
||||
}
|
||||
const subsystemPartBatches = this.chunkSubsystemParts(params.subsystemParts, 60)
|
||||
const requestTasks = subsystemPartBatches.map((subsystemParts) => {
|
||||
return this.requestEngineDetailBatch({
|
||||
...params,
|
||||
subsystemParts
|
||||
})
|
||||
})
|
||||
|
||||
this.$request(request)
|
||||
.asyncThen((resp) => {
|
||||
// 处理返回的详情数据
|
||||
console.log('接口返回数据:', resp)
|
||||
if (resp && resp.data) {
|
||||
console.log('准备处理的数据:', resp.data)
|
||||
Promise.all(requestTasks)
|
||||
.then((responses) => {
|
||||
const mergedData = this.mergeEngineDetailBatchData(
|
||||
responses.map((resp) => (resp && resp.data) || {})
|
||||
)
|
||||
console.log('接口返回数据:', responses)
|
||||
if (mergedData && Object.keys(mergedData).length > 0) {
|
||||
console.log('准备处理的数据:', mergedData)
|
||||
// 如果处于分发模式且还没有保存原始数据,先保存原始数据(在自动赋值责任人之前)
|
||||
// 创建一个临时副本,用于保存未自动赋值责任人的原始数据
|
||||
let tempOriginalData = null
|
||||
@ -3660,7 +4053,7 @@ export default {
|
||||
// 由于 processDetailData 会修改 versionData,我们需要先保存当前状态
|
||||
tempOriginalData = JSON.parse(JSON.stringify(this.versionData))
|
||||
}
|
||||
this.processDetailData(resp.data)
|
||||
this.processDetailData(mergedData)
|
||||
// 如果处于分发模式且还没有保存原始数据,使用之前保存的原始数据(不包含自动赋值的责任人)
|
||||
if (this.isDispatchMode && !this.dispatchOriginalData && tempOriginalData) {
|
||||
this.$nextTick(() => {
|
||||
@ -3676,14 +4069,64 @@ export default {
|
||||
// 移除展开状态同步逻辑,避免在选中节点时触发收起操作
|
||||
// 树组件的展开状态由用户手动控制,不应在接口返回后自动修改
|
||||
} else {
|
||||
console.warn('接口返回数据为空或格式不正确', resp)
|
||||
console.warn('接口返回数据为空或格式不正确', responses)
|
||||
}
|
||||
if (withPanelLoading) {
|
||||
this.isTreeAndContentLoading = false
|
||||
}
|
||||
})
|
||||
.asyncErrorCatch((err) => {
|
||||
.catch((err) => {
|
||||
console.error('获取引擎详情失败:', err)
|
||||
if (withPanelLoading) {
|
||||
this.isTreeAndContentLoading = false
|
||||
}
|
||||
this.$message.error('获取引擎详情失败')
|
||||
})
|
||||
},
|
||||
chunkSubsystemParts(subsystemParts = [], batchSize = 60) {
|
||||
if (!Array.isArray(subsystemParts) || subsystemParts.length === 0) {
|
||||
return []
|
||||
}
|
||||
const batches = []
|
||||
for (let index = 0; index < subsystemParts.length; index += batchSize) {
|
||||
batches.push(subsystemParts.slice(index, index + batchSize))
|
||||
}
|
||||
return batches
|
||||
},
|
||||
requestEngineDetailBatch(params) {
|
||||
const request = {
|
||||
...api.GET_ENGINE_DETAIL,
|
||||
params,
|
||||
disableSuccessMsg: true
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$request(request)
|
||||
.asyncThen((resp) => {
|
||||
resolve(resp)
|
||||
})
|
||||
.asyncErrorCatch((err) => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
},
|
||||
mergeEngineDetailBatchData(batchDataList = []) {
|
||||
return batchDataList.reduce((mergedData, batchData) => {
|
||||
if (!batchData || typeof batchData !== 'object') {
|
||||
return mergedData
|
||||
}
|
||||
Object.keys(batchData).forEach((subsystemName) => {
|
||||
const currentList = batchData[subsystemName]
|
||||
if (!Array.isArray(currentList)) {
|
||||
return
|
||||
}
|
||||
if (!mergedData[subsystemName]) {
|
||||
mergedData[subsystemName] = []
|
||||
}
|
||||
mergedData[subsystemName] = mergedData[subsystemName].concat(currentList)
|
||||
})
|
||||
return mergedData
|
||||
}, {})
|
||||
},
|
||||
// 处理详情数据,转换为格式
|
||||
// 返回数据结构: { "系统参数": [{ partsName: "基本规格", parameterName: "发动机排量", ... }] }
|
||||
// 对象的key是子系统名称(父节点),数组中的partsName是零件名称(子节点)
|
||||
@ -3798,6 +4241,7 @@ export default {
|
||||
parameterName: parameterName,
|
||||
partsName: partsName,
|
||||
parameterValue: item.parameterValue || item.value || '', // 如果接口返回中没有这个字段,默认为空
|
||||
parameterSource: item.parameterSource || '', // 参数计划来源:直接使用 GET_ENGINE_DETAIL 返回字段
|
||||
unit: item.unit || '-',
|
||||
department: department,
|
||||
owner: owner,
|
||||
@ -4985,7 +5429,7 @@ export default {
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
margin-left: 20px;
|
||||
overflow-y: auto !important;
|
||||
overflow: auto !important;
|
||||
}
|
||||
|
||||
.section {
|
||||
@ -5004,54 +5448,96 @@ export default {
|
||||
.grid {
|
||||
border: 1px solid #ebeef5;
|
||||
border-radius: 0;
|
||||
width: max-content;
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
.grid-header {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 100px 120px 200px 120px;
|
||||
grid-template-columns: minmax(240px, 1fr) 100px 120px 140px 200px 120px;
|
||||
background: #f5f7fa;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
|
||||
&.without-parameter-source {
|
||||
grid-template-columns: minmax(240px, 1fr) 100px 120px 200px 120px;
|
||||
}
|
||||
|
||||
&.edit-mode {
|
||||
grid-template-columns: 1fr 100px 1fr;
|
||||
grid-template-columns: minmax(240px, 1fr) 100px minmax(220px, 1fr) 200px;
|
||||
|
||||
&.without-parameter-source {
|
||||
grid-template-columns: minmax(240px, 1fr) 100px minmax(220px, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
&.dispatch-mode {
|
||||
grid-template-columns: 1fr 100px 120px 140px 100px 140px;
|
||||
grid-template-columns: minmax(220px, 1fr) 100px 120px 140px 140px 100px 140px;
|
||||
|
||||
&.without-parameter-source {
|
||||
grid-template-columns: minmax(220px, 1fr) 100px 120px 140px 100px 140px;
|
||||
}
|
||||
}
|
||||
|
||||
&.dispatch-filler-mode {
|
||||
grid-template-columns: 1fr 100px 120px 140px 100px 140px;
|
||||
grid-template-columns: minmax(220px, 1fr) 100px 120px 140px 140px 100px 140px;
|
||||
|
||||
&.without-parameter-source {
|
||||
grid-template-columns: minmax(220px, 1fr) 100px 120px 140px 100px 140px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.grid-row {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 100px 120px 200px 120px;
|
||||
grid-template-columns: minmax(240px, 1fr) 100px 120px 140px 200px 120px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
background: #fff;
|
||||
|
||||
&.without-parameter-source {
|
||||
grid-template-columns: minmax(240px, 1fr) 100px 120px 200px 120px;
|
||||
}
|
||||
|
||||
&.edit-mode {
|
||||
grid-template-columns: 1fr 100px 1fr;
|
||||
grid-template-columns: minmax(240px, 1fr) 100px minmax(220px, 1fr) 200px;
|
||||
|
||||
&.without-parameter-source {
|
||||
grid-template-columns: minmax(240px, 1fr) 100px minmax(220px, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
&.dispatch-mode {
|
||||
grid-template-columns: 1fr 100px 120px 140px 100px 140px;
|
||||
grid-template-columns: minmax(220px, 1fr) 100px 120px 140px 140px 100px 140px;
|
||||
|
||||
&.without-parameter-source {
|
||||
grid-template-columns: minmax(220px, 1fr) 100px 120px 140px 100px 140px;
|
||||
}
|
||||
}
|
||||
|
||||
&.dispatch-filler-mode {
|
||||
grid-template-columns: 1fr 100px 120px 140px 100px 140px;
|
||||
grid-template-columns: minmax(220px, 1fr) 100px 120px 140px 140px 100px 140px;
|
||||
|
||||
&.without-parameter-source {
|
||||
grid-template-columns: minmax(220px, 1fr) 100px 120px 140px 100px 140px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 整车参数表格样式(只有3列:参数名称、单位、参数值)
|
||||
// 整车参数表格样式(4列:参数名称、单位、参数值、参数计划来源)
|
||||
.whole-engine-grid {
|
||||
.whole-engine-header {
|
||||
grid-template-columns: 1fr 100px 1fr;
|
||||
grid-template-columns: minmax(240px, 1fr) 100px minmax(220px, 1fr) 200px;
|
||||
|
||||
&.without-parameter-source {
|
||||
grid-template-columns: minmax(240px, 1fr) 100px minmax(220px, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
.whole-engine-row {
|
||||
grid-template-columns: 1fr 100px 1fr;
|
||||
grid-template-columns: minmax(240px, 1fr) 100px minmax(220px, 1fr) 200px;
|
||||
|
||||
&.without-parameter-source {
|
||||
grid-template-columns: minmax(240px, 1fr) 100px minmax(220px, 1fr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -29,43 +29,16 @@
|
||||
</div>
|
||||
|
||||
<div class="table-section">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
width="90"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="department"
|
||||
label="责任部门"
|
||||
align="center"
|
||||
>
|
||||
<el-table :data="tableData" border style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="90" align="center" />
|
||||
<el-table-column prop="department" label="责任部门" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ formatDepartmentDisplay(scope.row.department) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="subsystem"
|
||||
label="子系统"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="username"
|
||||
label="责任人"
|
||||
width="250"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="hasEditPermission()"
|
||||
label="操作"
|
||||
width="200"
|
||||
align="center"
|
||||
>
|
||||
<el-table-column prop="subsystem" label="子系统" align="center" />
|
||||
<el-table-column prop="username" label="责任人" width="250" align="center" />
|
||||
<el-table-column v-if="hasEditPermission()" label="操作" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
<a
|
||||
href="javascript:void(0)"
|
||||
@ -126,12 +99,7 @@
|
||||
:modal="false"
|
||||
@close="handleDialogClose"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form ref="form" :model="formData" :rules="formRules" label-width="100px">
|
||||
<el-form-item label="子系统:" prop="subsystem">
|
||||
<el-select
|
||||
v-model="formData.subsystem"
|
||||
@ -232,7 +200,11 @@
|
||||
<el-button @click="handleDepartmentDialogClose">
|
||||
取消
|
||||
</el-button>
|
||||
<el-button type="primary" :disabled="!selectedDepartmentId" @click="handleDepartmentDialogConfirm">
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="!selectedDepartmentId"
|
||||
@click="handleDepartmentDialogConfirm"
|
||||
>
|
||||
确定
|
||||
</el-button>
|
||||
</div>
|
||||
@ -259,9 +231,7 @@
|
||||
:disabled="importing"
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">
|
||||
将文件拖到此处,或<em>点击上传</em>
|
||||
</div>
|
||||
<div class="el-upload__text"> 将文件拖到此处,或<em>点击上传</em> </div>
|
||||
<div slot="tip" class="el-upload__tip">
|
||||
仅支持Excel模板文件
|
||||
</div>
|
||||
@ -306,15 +276,9 @@ export default {
|
||||
departmentId: '' // 部门ID(编辑时使用)
|
||||
},
|
||||
formRules: {
|
||||
department: [
|
||||
{ required: true, message: '请选择责任部门', trigger: 'change' }
|
||||
],
|
||||
subsystem: [
|
||||
{ required: true, message: '请输入子系统', trigger: 'blur' }
|
||||
],
|
||||
responsible: [
|
||||
{ required: true, message: '请选择责任人', trigger: 'change' }
|
||||
]
|
||||
department: [{ required: true, message: '请选择责任部门', trigger: 'change' }],
|
||||
subsystem: [{ required: true, message: '请输入子系统', trigger: 'blur' }],
|
||||
responsible: [{ required: true, message: '请选择责任人', trigger: 'change' }]
|
||||
},
|
||||
subsystemList: [],
|
||||
userOptions: [], // 人员选项列表
|
||||
@ -628,11 +592,13 @@ export default {
|
||||
// 设置表单数据,确保级联选择器和选择器能正确回显
|
||||
// 初始化已选择的人员选项
|
||||
if (row.userId) {
|
||||
this.userOptions = [{
|
||||
this.userOptions = [
|
||||
{
|
||||
userId: row.userId,
|
||||
username: row.username || row.userId,
|
||||
userNumber: row.userNumber || row.userId
|
||||
}]
|
||||
}
|
||||
]
|
||||
} else {
|
||||
this.userOptions = []
|
||||
}
|
||||
@ -692,7 +658,9 @@ export default {
|
||||
params: {
|
||||
departmentId: this.formData.selectDeptId,
|
||||
department: this.formData.selectDeptName,
|
||||
subsystem: Array.isArray(this.formData.subsystem) ? this.formData.subsystem.join(',') : this.formData.subsystem,
|
||||
subsystem: Array.isArray(this.formData.subsystem)
|
||||
? this.formData.subsystem.join(',')
|
||||
: this.formData.subsystem,
|
||||
userId: this.formData.userId || this.formData.responsible
|
||||
},
|
||||
disableSuccessMsg: true
|
||||
@ -720,7 +688,9 @@ export default {
|
||||
params: {
|
||||
departmentId: this.formData.selectDeptId,
|
||||
department: this.formData.selectDeptName,
|
||||
subsystem: Array.isArray(this.formData.subsystem) ? this.formData.subsystem.join(',') : this.formData.subsystem,
|
||||
subsystem: Array.isArray(this.formData.subsystem)
|
||||
? this.formData.subsystem.join(',')
|
||||
: this.formData.subsystem,
|
||||
userId: this.formData.responsible,
|
||||
rowId: this.formData.rowId
|
||||
},
|
||||
@ -827,7 +797,9 @@ export default {
|
||||
if (!query || query.trim() === '') {
|
||||
if (this.formData.responsible) {
|
||||
// 从现有 options 中查找已选择的人员信息
|
||||
const selectedOptions = this.userOptions.filter((opt) => opt.userNumber === this.formData.responsible)
|
||||
const selectedOptions = this.userOptions.filter(
|
||||
(opt) => opt.userNumber === this.formData.responsible
|
||||
)
|
||||
this.userOptions = selectedOptions
|
||||
} else {
|
||||
this.userOptions = []
|
||||
@ -903,7 +875,9 @@ export default {
|
||||
console.error('搜索责任人失败:', err)
|
||||
// 搜索失败时,保留已选择的人员信息
|
||||
if (this.formData.responsible) {
|
||||
const selectedOptions = this.userOptions.filter((opt) => opt.userNumber === this.formData.responsible)
|
||||
const selectedOptions = this.userOptions.filter(
|
||||
(opt) => opt.userNumber === this.formData.responsible
|
||||
)
|
||||
this.userOptions = selectedOptions
|
||||
} else {
|
||||
this.userOptions = []
|
||||
@ -1012,7 +986,7 @@ export default {
|
||||
// 将 · 替换为 -
|
||||
const normalizedDept = department.replace(/·/g, '-')
|
||||
// 按 - 分割
|
||||
const parts = normalizedDept.split('-').filter(part => part.trim() !== '')
|
||||
const parts = normalizedDept.split('-').filter((part) => part.trim() !== '')
|
||||
// 只显示最后一个节点
|
||||
if (parts.length > 0) {
|
||||
return parts[parts.length - 1]
|
||||
@ -1349,6 +1323,15 @@ export default {
|
||||
color: #909399;
|
||||
font-size: 14px;
|
||||
}
|
||||
.title {
|
||||
color: #303133;
|
||||
font-weight: 700;
|
||||
margin-left: 20px;
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex: 1;
|
||||
flex: 1;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.table-section {
|
||||
|
||||
@ -63,6 +63,15 @@
|
||||
clearable
|
||||
class="tree-search"
|
||||
></el-input>
|
||||
<div class="tree-select-actions">
|
||||
<el-checkbox
|
||||
v-model="treeSelectAllMaster"
|
||||
:indeterminate="treeSelectAllIndeterminate"
|
||||
class="tree-select-checkbox"
|
||||
>
|
||||
全选
|
||||
</el-checkbox>
|
||||
</div>
|
||||
<el-tree
|
||||
ref="paramTree"
|
||||
:data="treeData"
|
||||
@ -595,6 +604,24 @@ export default {
|
||||
}
|
||||
|
||||
return filtered
|
||||
},
|
||||
// 左侧树「全选」:与树勾选数量同步;勾选为全选,取消为全不选
|
||||
treeSelectAllIndeterminate() {
|
||||
const { allKeys, selectedCount } = this.getTreeSelectAllStats()
|
||||
return allKeys.length > 0 && selectedCount > 0 && selectedCount < allKeys.length
|
||||
},
|
||||
treeSelectAllMaster: {
|
||||
get() {
|
||||
const { allKeys, selectedCount } = this.getTreeSelectAllStats()
|
||||
return allKeys.length > 0 && selectedCount === allKeys.length
|
||||
},
|
||||
set(val) {
|
||||
if (val) {
|
||||
this.handleTreeSelectAll()
|
||||
} else {
|
||||
this.handleTreeDeselectAll()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -840,6 +867,48 @@ export default {
|
||||
// 如果有已添加的机型,根据新选中的树节点重新加载参数数据
|
||||
this.reloadModelDetailsForCheckedNodes()
|
||||
},
|
||||
// 统计完整树节点总数与当前已勾选数量(用于「全选」复选框状态)
|
||||
getTreeSelectAllStats() {
|
||||
const source =
|
||||
this.allTreeData && this.allTreeData.length > 0 ? this.allTreeData : this.treeData
|
||||
if (!source || !source.length) {
|
||||
return { allKeys: [], selectedCount: 0 }
|
||||
}
|
||||
const allKeys = this.getAllNodeKeys(source)
|
||||
const checkedSet = new Set(this.checkedKeys)
|
||||
const selectedCount = allKeys.filter((id) => checkedSet.has(id)).length
|
||||
return { allKeys, selectedCount }
|
||||
},
|
||||
// 左侧参数树:全选(基于完整树数据)
|
||||
handleTreeSelectAll() {
|
||||
const source =
|
||||
this.allTreeData && this.allTreeData.length > 0 ? this.allTreeData : this.treeData
|
||||
if (!source || !source.length) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '暂无参数树数据'
|
||||
})
|
||||
return
|
||||
}
|
||||
const allKeys = this.getAllNodeKeys(source)
|
||||
this.checkedKeys = allKeys
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.paramTree && allKeys.length > 0) {
|
||||
this.$refs.paramTree.setCheckedKeys(allKeys)
|
||||
}
|
||||
this.reloadModelDetailsForCheckedNodes()
|
||||
})
|
||||
},
|
||||
// 左侧参数树:全不选
|
||||
handleTreeDeselectAll() {
|
||||
this.checkedKeys = []
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.paramTree) {
|
||||
this.$refs.paramTree.setCheckedKeys([])
|
||||
}
|
||||
this.reloadModelDetailsForCheckedNodes()
|
||||
})
|
||||
},
|
||||
getParamValue(model, param) {
|
||||
// param 是 { parameterName, subsystemName, parameterId, partsName }
|
||||
if (!model || !model.id || !param) {
|
||||
@ -951,7 +1020,8 @@ export default {
|
||||
...api.GET_MODEL_QUERT_TABLE_BY_VERSION,
|
||||
params: {
|
||||
page: 1,
|
||||
size: 999
|
||||
size: 999,
|
||||
userId: getUserId()
|
||||
},
|
||||
disableSuccessMsg: true
|
||||
}
|
||||
@ -2659,7 +2729,7 @@ export default {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
height: 100%;
|
||||
height: calc(100% - 30px);
|
||||
|
||||
.tree-search-header {
|
||||
margin-bottom: 8px;
|
||||
@ -2680,6 +2750,20 @@ export default {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.tree-select-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 8px;
|
||||
flex-shrink: 0;
|
||||
.tree-select-checkbox {
|
||||
::v-deep .el-checkbox__label {
|
||||
font-size: 12px;
|
||||
padding-left: 6px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.custom-tree-node {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
@ -477,6 +477,20 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="数值类型:" prop="isNumber">
|
||||
<el-radio-group v-model="paramFormData.isNumber">
|
||||
<el-radio label="数值">
|
||||
数值
|
||||
</el-radio>
|
||||
<el-radio label="非数值">
|
||||
非数值
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="填写部门:" prop="department">
|
||||
<el-input
|
||||
v-model="paramFormData.departmentName"
|
||||
@ -672,7 +686,8 @@ export default {
|
||||
parameterSource: '',
|
||||
numberOrFormula: '',
|
||||
fillDepartment: '',
|
||||
remarks: ''
|
||||
remarks: '',
|
||||
isNumber: '数值'
|
||||
},
|
||||
departmentDialogVisible: false, // 部门选择弹窗显示状态
|
||||
departmentTreeData: [], // 部门树数据(用于 el-tree)
|
||||
@ -929,6 +944,14 @@ export default {
|
||||
width: '100',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'isNumber',
|
||||
label: '数值类型',
|
||||
showOverflowTooltip: true,
|
||||
width: '100',
|
||||
align: 'center',
|
||||
formatter: ({ cellValue }) => this.formatIsNumberDisplay(cellValue)
|
||||
},
|
||||
{
|
||||
prop: 'parameterSource',
|
||||
label: '参数计划来源',
|
||||
@ -1026,6 +1049,14 @@ export default {
|
||||
width: '100',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'isNumber',
|
||||
label: '数值类型',
|
||||
showOverflowTooltip: true,
|
||||
width: '100',
|
||||
align: 'center',
|
||||
formatter: ({ cellValue }) => this.formatIsNumberDisplay(cellValue)
|
||||
},
|
||||
{
|
||||
prop: 'parameterSource',
|
||||
label: '参数计划来源',
|
||||
@ -1884,6 +1915,21 @@ export default {
|
||||
// 否则显示全部
|
||||
return normalizedDept
|
||||
},
|
||||
formatIsNumberDisplay(value) {
|
||||
if (value === '非数值' || value === false || value === 0 || value === '0') {
|
||||
return '非数值'
|
||||
}
|
||||
if (value === '数值' || value === true || value === 1 || value === '1') {
|
||||
return '数值'
|
||||
}
|
||||
return value === undefined || value === null || value === '' ? '—' : String(value)
|
||||
},
|
||||
normalizeParamIsNumberForForm(value) {
|
||||
if (value === '非数值' || value === false || value === 0 || value === '0') {
|
||||
return '非数值'
|
||||
}
|
||||
return '数值'
|
||||
},
|
||||
handleBack() {
|
||||
// 如果在审批模式下,取消审批而不是返回
|
||||
if (this.isApprovalMode) {
|
||||
@ -3292,7 +3338,8 @@ export default {
|
||||
parameterSource: '',
|
||||
numberOrFormula: '',
|
||||
fillDepartment: '',
|
||||
remarks: ''
|
||||
remarks: '',
|
||||
isNumber: '数值'
|
||||
}
|
||||
this.paramModalVisible = true
|
||||
// 清除表单验证
|
||||
@ -3322,7 +3369,8 @@ export default {
|
||||
parameterSource: row.parameterSource || '',
|
||||
numberOrFormula: row.numberOrFormula || '',
|
||||
fillDepartment: row.fillDepartment || '',
|
||||
remarks: row.remarks || ''
|
||||
remarks: row.remarks || '',
|
||||
isNumber: this.normalizeParamIsNumberForForm(row.isNumber)
|
||||
}
|
||||
this.paramModalVisible = true
|
||||
// 清除表单验证
|
||||
@ -3602,6 +3650,7 @@ export default {
|
||||
numberOrFormula: this.paramFormData.numberOrFormula,
|
||||
unit: this.paramFormData.unit,
|
||||
remarks: this.paramFormData.remarks,
|
||||
isNumber: this.paramFormData.isNumber,
|
||||
number:
|
||||
this.tableData.length > 0
|
||||
? Math.max(...this.tableData.map((item) => item.number || 0)) + 1
|
||||
@ -3648,6 +3697,7 @@ export default {
|
||||
numberOrFormula: this.paramFormData.numberOrFormula,
|
||||
unit: this.paramFormData.unit,
|
||||
remarks: this.paramFormData.remarks,
|
||||
isNumber: this.paramFormData.isNumber,
|
||||
operation: 'update'
|
||||
})
|
||||
}
|
||||
@ -3675,7 +3725,8 @@ export default {
|
||||
parameterSource: '',
|
||||
numberOrFormula: '',
|
||||
fillDepartment: '',
|
||||
remarks: ''
|
||||
remarks: '',
|
||||
isNumber: '数值'
|
||||
}
|
||||
this.paramCurrentRow = null
|
||||
this.paramCurrentRowIndex = -1
|
||||
@ -3737,7 +3788,8 @@ export default {
|
||||
numberOrFormula: this.paramFormData.numberOrFormula,
|
||||
department: this.paramFormData.department,
|
||||
fillDepartment: this.paramFormData.fillDepartment,
|
||||
remarks: this.paramFormData.remarks
|
||||
remarks: this.paramFormData.remarks,
|
||||
isNumber: this.paramFormData.isNumber
|
||||
}
|
||||
},
|
||||
loadTemplateInfo() {
|
||||
|
||||
239
src/custom/apaas-custom-mydemo/custom-page/myDemo.vue
Normal file
239
src/custom/apaas-custom-mydemo/custom-page/myDemo.vue
Normal file
@ -0,0 +1,239 @@
|
||||
<template>
|
||||
<div class="apaas-custom-page-todo custom-page">
|
||||
<div class="list-container">
|
||||
<div v-for="(item, index) in list" :key="index" class="list-item">
|
||||
<div class="list-item-time">
|
||||
{{ item.time }}
|
||||
</div>
|
||||
<div class="list-item-content-wrap">
|
||||
<div
|
||||
ref="contentEls"
|
||||
class="list-item-content"
|
||||
:class="{ 'is-expanded': expanded[index] }"
|
||||
>
|
||||
<span class="list-item-content-text">
|
||||
{{
|
||||
overflow[index] && !expanded[index]
|
||||
? collapsedText[index]
|
||||
: item.content
|
||||
}}
|
||||
</span>
|
||||
<button
|
||||
v-if="overflow[index]"
|
||||
type="button"
|
||||
class="list-item-toggle"
|
||||
@click="toggle(index)"
|
||||
>
|
||||
{{ expanded[index] ? '收起' : '展开' }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ref="measureEl" class="list-item-measure" aria-hidden="true"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'TodoPage',
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
time: '123123',
|
||||
content:
|
||||
'74weugfiufbewbfewhfwiufhwefhwekfhwkjfasdkg撒扩大刚放假规范几个房间看过尽快发给外交国大刚放假规范几个房间看过尽快发给外大刚放假规范几个房间看过尽快发给外大刚放假规范几个房间看过尽快发给外大刚放假规范几个房间看过尽快发给外防科技股份较为规范会计1疯狂攻击反馈'
|
||||
},
|
||||
{ time: '123123', content: '74weugfiufbewbfewhfwiufhwefhwekfhwkjf' },
|
||||
{ time: '123123', content: '74weugfiufbewbfewhfwiufhwefhwekfhwkjf' }
|
||||
],
|
||||
expanded: [],
|
||||
overflow: [],
|
||||
collapsedText: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
list: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler() {
|
||||
this.ensureStateSize()
|
||||
this.measureOverflow()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('resize', this.onResize, { passive: true })
|
||||
this.ensureStateSize()
|
||||
this.measureOverflow()
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.onResize)
|
||||
},
|
||||
methods: {
|
||||
ensureStateSize() {
|
||||
const n = this.list.length
|
||||
if (this.expanded.length !== n) {
|
||||
this.expanded = Array.from({ length: n }, (_, i) => !!this.expanded[i])
|
||||
}
|
||||
if (this.overflow.length !== n) {
|
||||
this.overflow = Array.from({ length: n }, (_, i) => !!this.overflow[i])
|
||||
}
|
||||
if (this.collapsedText.length !== n) {
|
||||
this.collapsedText = Array.from({ length: n }, (_, i) => this.collapsedText[i] || '')
|
||||
}
|
||||
},
|
||||
measureOverflow() {
|
||||
this.$nextTick(() => {
|
||||
const els = Array.isArray(this.$refs.contentEls)
|
||||
? this.$refs.contentEls
|
||||
: this.$refs.contentEls
|
||||
? [this.$refs.contentEls]
|
||||
: []
|
||||
|
||||
const measureEl = this.$refs.measureEl
|
||||
if (!measureEl) return
|
||||
|
||||
const nextOverflow = []
|
||||
const nextCollapsed = []
|
||||
|
||||
this.list.forEach((item, idx) => {
|
||||
const hostEl = els[idx]
|
||||
if (!hostEl) {
|
||||
nextOverflow[idx] = false
|
||||
nextCollapsed[idx] = ''
|
||||
return
|
||||
}
|
||||
|
||||
const hostStyle = window.getComputedStyle(hostEl)
|
||||
const contentWidth = hostEl.clientWidth
|
||||
if (!contentWidth) {
|
||||
nextOverflow[idx] = false
|
||||
nextCollapsed[idx] = ''
|
||||
return
|
||||
}
|
||||
|
||||
measureEl.style.width = `${contentWidth}px`
|
||||
measureEl.style.font = hostStyle.font
|
||||
measureEl.style.fontSize = hostStyle.fontSize
|
||||
measureEl.style.fontFamily = hostStyle.fontFamily
|
||||
measureEl.style.fontWeight = hostStyle.fontWeight
|
||||
measureEl.style.letterSpacing = hostStyle.letterSpacing
|
||||
measureEl.style.lineHeight = hostStyle.lineHeight
|
||||
measureEl.style.wordBreak = hostStyle.wordBreak
|
||||
measureEl.style.whiteSpace = 'normal'
|
||||
|
||||
const lineHeightStr = hostStyle.lineHeight
|
||||
let lineHeight = parseFloat(lineHeightStr)
|
||||
if (!Number.isFinite(lineHeight)) {
|
||||
const fontSize = parseFloat(hostStyle.fontSize) || 14
|
||||
lineHeight = fontSize * 1.2
|
||||
}
|
||||
const maxHeight = lineHeight * 3 + 0.5
|
||||
|
||||
// 先判断是否超过三行
|
||||
measureEl.textContent = item.content
|
||||
const isOverflow = measureEl.scrollHeight > maxHeight
|
||||
nextOverflow[idx] = isOverflow
|
||||
|
||||
if (!isOverflow) {
|
||||
nextCollapsed[idx] = item.content
|
||||
return
|
||||
}
|
||||
|
||||
// 计算三行内可放下的最大字符数(预留“...展开”的空间,保证按钮同一行)
|
||||
const suffixForMeasure = `…展开`
|
||||
let low = 0
|
||||
let high = item.content.length
|
||||
let best = 0
|
||||
|
||||
while (low <= high) {
|
||||
const mid = Math.floor((low + high) / 2)
|
||||
const candidate = item.content.slice(0, mid) + suffixForMeasure
|
||||
measureEl.textContent = candidate
|
||||
if (measureEl.scrollHeight <= maxHeight) {
|
||||
best = mid
|
||||
low = mid + 1
|
||||
} else {
|
||||
high = mid - 1
|
||||
}
|
||||
}
|
||||
|
||||
nextCollapsed[idx] = item.content.slice(0, best) + '…'
|
||||
})
|
||||
|
||||
this.overflow = nextOverflow
|
||||
this.collapsedText = nextCollapsed
|
||||
})
|
||||
},
|
||||
toggle(index) {
|
||||
this.$set(this.expanded, index, !this.expanded[index])
|
||||
this.measureOverflow()
|
||||
},
|
||||
onResize() {
|
||||
this.ensureStateSize()
|
||||
this.measureOverflow()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.list-container {
|
||||
width: 220px;
|
||||
height: 100%;
|
||||
border: 1px solid #e0e0e0;
|
||||
background-color: #f0f0f0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
.list-item {
|
||||
width: 100%;
|
||||
min-height: 100px;
|
||||
height: auto;
|
||||
background-color: #f0f0f0;
|
||||
padding: 8px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.list-item:hover {
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
|
||||
.list-item-content-wrap {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.list-item-content {
|
||||
position: relative;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.list-item-toggle {
|
||||
padding: 0 0 0 6px;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: #1677ff;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.list-item-toggle:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.list-item-measure {
|
||||
position: absolute;
|
||||
left: -99999px;
|
||||
top: -99999px;
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
word-break: break-word;
|
||||
white-space: normal;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -3,7 +3,7 @@
|
||||
<template v-if="!showEngineDetail">
|
||||
<div class="page-header">
|
||||
<div class="title">
|
||||
玉柴发动机数据
|
||||
竞品发动机数据
|
||||
</div>
|
||||
<div class="operation">
|
||||
<el-button v-if="hasEngineDataEditPermission()" type="primary" @click="handleDownloadTemplate">下载模板</el-button>
|
||||
@ -109,6 +109,16 @@
|
||||
>
|
||||
查看
|
||||
</a>
|
||||
<!-- <span v-if="row.distributeStatus != '部分分发' && hasEngineDataEditPermission() && row.versionNumber === 1" class="link-separator"></span> -->
|
||||
<!-- <a
|
||||
v-if="row.distributeStatus != '部分分发' && hasEngineDataEditPermission() && row.versionNumber === 1"
|
||||
href="javascript:void(0)"
|
||||
class="el-link el-link--primary"
|
||||
style="margin-left: 5px;"
|
||||
@click.stop="handleRowEdit(row)"
|
||||
>
|
||||
编辑
|
||||
</a> -->
|
||||
<span v-if=" (row.distributeStatus === '未分发' || row.distributeStatus === '部分分发') &&hasEngineDataEditPermission()" class="link-separator"></span>
|
||||
<a
|
||||
v-if=" (row.distributeStatus === '未分发' || row.distributeStatus === '部分分发') && hasEngineDataEditPermission()"
|
||||
@ -352,7 +362,7 @@ export default {
|
||||
label: '操作',
|
||||
customSlot: 'options',
|
||||
align: 'center',
|
||||
width: '120',
|
||||
width: '160',
|
||||
fixed: 'right'
|
||||
}
|
||||
],
|
||||
@ -435,7 +445,7 @@ export default {
|
||||
return false
|
||||
}
|
||||
},
|
||||
// 检查是否有玉柴发动机数据的编辑权限
|
||||
// 检查是否有竞品发动机数据的编辑权限
|
||||
hasEngineDataEditPermission() {
|
||||
// 如果是管理员,拥有全部权限
|
||||
if (this.isAdmin()) {
|
||||
@ -450,14 +460,14 @@ export default {
|
||||
if (!Array.isArray(permissionData)) {
|
||||
return false
|
||||
}
|
||||
// 检查是否有 permissionPath 为 "玉柴发动机数据" 且 parameterPer 是编辑的权限
|
||||
// 检查是否有 permissionPath 为 "竞品发动机数据" 且 parameterPer 是编辑的权限
|
||||
return permissionData.some((perm) => {
|
||||
const permissionPath = perm.permissionPath || ''
|
||||
const parameterPer = perm.parameterPer || ''
|
||||
return permissionPath === '玉柴发动机数据' && parameterPer === '编辑'
|
||||
return permissionPath === '竞品发动机数据' && parameterPer === '编辑'
|
||||
})
|
||||
} catch (err) {
|
||||
console.error('检查玉柴发动机数据编辑权限失败:', err)
|
||||
console.error('检查竞品发动机数据编辑权限失败:', err)
|
||||
return false
|
||||
}
|
||||
},
|
||||
@ -771,6 +781,9 @@ export default {
|
||||
// 从 selfEnginedata.vue 跳转,设置 ycOrOth 为 "竞品"
|
||||
this.$refs.addEngineModelModal.showModal('竞品')
|
||||
},
|
||||
handleRowEdit(row) {
|
||||
this.$refs.addEngineModelModal.showModalForEdit('竞品', row)
|
||||
},
|
||||
handleAddSuccess() {
|
||||
// 子组件已经关闭弹窗,这里只需要刷新列表
|
||||
this.loadData()
|
||||
@ -977,4 +990,7 @@ export default {
|
||||
width: 4px;
|
||||
height: 14px;
|
||||
}
|
||||
.add-engine-model-modal .modal-body{
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -174,24 +174,22 @@
|
||||
<!-- 配置部门模式 -->
|
||||
<template v-if="personConfigFormData.configType === 'department'">
|
||||
<el-form-item label="责任部门:" prop="department">
|
||||
<el-cascader
|
||||
ref="departmentCascader"
|
||||
v-model="personConfigFormData.department"
|
||||
:options="departmentList"
|
||||
:props="{
|
||||
multiple: true,
|
||||
checkStrictly: true,
|
||||
value: 'id',
|
||||
label: 'name',
|
||||
children: 'children',
|
||||
emitPath: true
|
||||
}"
|
||||
<el-select
|
||||
v-model="personConfigFormData.selectDeptIds"
|
||||
multiple
|
||||
filterable
|
||||
placeholder="请选择责任部门(可多选)"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@change="handlePersonDepartmentChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in departmentSelectOptionsMerged"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<!-- 配置人员模式 -->
|
||||
@ -382,12 +380,14 @@ export default {
|
||||
},
|
||||
personOptions: [], // 人员选项列表
|
||||
personSearchLoading: false, // 人员搜索loading状态
|
||||
selectedDepartmentOptions: [], // 从接口解析的已选部门选项 { value, label },用于反显时显示部门名称
|
||||
personConfigFormRules: {
|
||||
department: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (this.personConfigFormData.configType === 'department') {
|
||||
if (!value || (Array.isArray(value) && value.length === 0)) {
|
||||
const deptIds = this.personConfigFormData.selectDeptIds
|
||||
if (!deptIds || (Array.isArray(deptIds) && deptIds.length === 0)) {
|
||||
callback(new Error('请选择责任部门'))
|
||||
} else {
|
||||
callback()
|
||||
@ -457,6 +457,34 @@ export default {
|
||||
}
|
||||
})
|
||||
return nodes
|
||||
},
|
||||
// 部门树扁平化为 el-select 选项(多选用),value 统一为字符串以便与 selectDeptIds 匹配反显
|
||||
departmentSelectOptions() {
|
||||
const list = this.departmentList || []
|
||||
const result = []
|
||||
const flatten = (nodes) => {
|
||||
if (!Array.isArray(nodes)) return
|
||||
nodes.forEach((node) => {
|
||||
result.push({
|
||||
value: node.id == null ? '' : String(node.id),
|
||||
label: node.name || node.label || ''
|
||||
})
|
||||
if (node.children && node.children.length > 0) {
|
||||
flatten(node.children)
|
||||
}
|
||||
})
|
||||
}
|
||||
flatten(list)
|
||||
return result
|
||||
},
|
||||
// 合并部门树选项与接口返回的已选部门选项,保证反显时能显示部门名称(接口中的名称优先)
|
||||
departmentSelectOptionsMerged() {
|
||||
const treeOptions = this.departmentSelectOptions || []
|
||||
const apiOptions = this.selectedDepartmentOptions || []
|
||||
const map = new Map()
|
||||
treeOptions.forEach((opt) => map.set(opt.value, { value: opt.value, label: opt.label }))
|
||||
apiOptions.forEach((opt) => map.set(opt.value, { value: opt.value, label: opt.label }))
|
||||
return Array.from(map.values())
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -1488,6 +1516,7 @@ export default {
|
||||
roleId: row.rowId || row.id || '',
|
||||
roleName: row.roleName || ''
|
||||
}
|
||||
this.selectedDepartmentOptions = []
|
||||
const request = {
|
||||
...api.CHECK_ROLE_USER_DEPT,
|
||||
params: {
|
||||
@ -1498,9 +1527,38 @@ export default {
|
||||
this.$request(request)
|
||||
.asyncThen((resp) => {
|
||||
if (resp && resp.data) {
|
||||
// 解析返回数据,格式:{ "部门": [], "人员": ["李亚松-yc90117847"] }
|
||||
// 解析返回数据,格式:{ "部门": ["部门名-部门ID"], "人员": ["李亚松-yc90117847"] }
|
||||
const respData = resp.data
|
||||
const personArray = respData['人员'] || respData.person || []
|
||||
const departmentArray = respData['部门'] || respData.department || []
|
||||
|
||||
// 解析部门数组,格式:["部门名-部门ID"] 或 [{ deptId, deptName }],提取部门ID(统一字符串)并保存部门名称用于反显
|
||||
if (departmentArray.length > 0) {
|
||||
const deptIds = []
|
||||
const optionsFromApi = []
|
||||
departmentArray.forEach((item) => {
|
||||
if (typeof item === 'string' && item.includes('-')) {
|
||||
const parts = item.split('-')
|
||||
if (parts.length >= 2) {
|
||||
const deptName = parts[0]
|
||||
const deptId = parts.slice(1).join('-')
|
||||
const idStr = deptId == null ? '' : String(deptId)
|
||||
deptIds.push(idStr)
|
||||
optionsFromApi.push({ value: idStr, label: deptName || idStr })
|
||||
}
|
||||
} else if (item && typeof item === 'object' && (item.deptId != null || item.id != null)) {
|
||||
const id = item.deptId != null ? item.deptId : item.id
|
||||
const name = item.deptName || item.name || item.label || ''
|
||||
const idStr = id == null ? '' : String(id)
|
||||
deptIds.push(idStr)
|
||||
optionsFromApi.push({ value: idStr, label: name || idStr })
|
||||
}
|
||||
})
|
||||
this.personConfigFormData.selectDeptIds = deptIds
|
||||
this.personConfigFormData.department = deptIds
|
||||
this.selectedDepartmentOptions = optionsFromApi
|
||||
}
|
||||
|
||||
// 解析人员数组,格式:["userName-userId"]
|
||||
const userIds = []
|
||||
const personOptionsMap = new Map()
|
||||
@ -1538,21 +1596,17 @@ export default {
|
||||
},
|
||||
// 配置类型切换
|
||||
handleConfigTypeChange(value) {
|
||||
// 切换配置类型时,清空相关数据
|
||||
// 切换到配置部门时:将 department 中的部门 id 数组同步到 selectDeptIds,保证 el-select 能反显(并统一为字符串以匹配选项)
|
||||
if (value === 'department') {
|
||||
// 切换到配置部门模式
|
||||
this.personConfigFormData.department = []
|
||||
this.personConfigFormData.selectDeptIds = []
|
||||
this.personConfigFormData.person = []
|
||||
this.personOptions = []
|
||||
} else {
|
||||
// 切换到配置人员模式
|
||||
this.personConfigFormData.department = ''
|
||||
this.personConfigFormData.selectDeptId = ''
|
||||
this.personConfigFormData.selectDeptName = ''
|
||||
this.personConfigFormData.selectDeptIds = []
|
||||
const raw = this.personConfigFormData.department
|
||||
if (Array.isArray(raw) && raw.length > 0) {
|
||||
const isFlatIds = !Array.isArray(raw[0])
|
||||
if (isFlatIds) {
|
||||
const ids = raw.map((id) => (id == null ? '' : String(id)))
|
||||
this.personConfigFormData.selectDeptIds = ids
|
||||
}
|
||||
}
|
||||
}
|
||||
// 清除表单验证
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.personConfigForm) {
|
||||
this.$refs.personConfigForm.clearValidate()
|
||||
@ -1605,26 +1659,7 @@ export default {
|
||||
// 处理部门选择变化
|
||||
handlePersonDepartmentChange(value) {
|
||||
if (this.personConfigFormData.configType === 'department') {
|
||||
// 配置部门模式:value 是数组,每个元素是级联路径数组(多选)
|
||||
// 例如:[[id1, id2], [id3, id4]] 表示选中了两个部门
|
||||
if (value && Array.isArray(value) && value.length > 0) {
|
||||
// 提取所有选中部门的最后一级ID,存入数组
|
||||
this.personConfigFormData.selectDeptIds = value
|
||||
.map((path) => {
|
||||
// path 是级联路径数组,取最后一级作为部门ID
|
||||
if (Array.isArray(path) && path.length > 0) {
|
||||
return path[path.length - 1]
|
||||
}
|
||||
// 如果 path 不是数组,可能是直接的ID
|
||||
return path
|
||||
})
|
||||
.filter((id) => id) // 过滤掉空值
|
||||
} else {
|
||||
this.personConfigFormData.selectDeptIds = []
|
||||
}
|
||||
console.log('配置部门模式 - 选中的部门值:', value)
|
||||
console.log('配置部门模式 - 选中的部门ID数组:', this.personConfigFormData.selectDeptIds)
|
||||
// 触发表单验证
|
||||
// 配置部门模式:el-select 多选,value 即为选中的部门 id 数组,v-model 已绑定 selectDeptIds
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.personConfigForm) {
|
||||
this.$refs.personConfigForm.validateField('department')
|
||||
@ -1794,31 +1829,49 @@ export default {
|
||||
const path = findNodePath(this.departmentList, deptId)
|
||||
return path ? path.join('-') : ''
|
||||
},
|
||||
// 根据部门id获取部门路径ID数组(用于级联选择器反显)
|
||||
getDepartmentPathIds(deptId) {
|
||||
if (!deptId || !this.departmentList || this.departmentList.length === 0) {
|
||||
return null
|
||||
}
|
||||
const findNodePathIds = (nodes, targetId, pathIds = []) => {
|
||||
for (const node of nodes) {
|
||||
const currentPath = [...pathIds, node.id]
|
||||
if (node.id === targetId) {
|
||||
return currentPath
|
||||
}
|
||||
if (node.children && node.children.length > 0) {
|
||||
const found = findNodePathIds(node.children, targetId, currentPath)
|
||||
if (found) {
|
||||
return found
|
||||
}
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
return findNodePathIds(this.departmentList, deptId)
|
||||
},
|
||||
// 人员配置提交
|
||||
handlePersonConfigSubmit() {
|
||||
this.$refs.personConfigForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.personConfigSubmitting = true
|
||||
|
||||
let userOrDeptId = []
|
||||
let isDept = 0
|
||||
|
||||
if (this.personConfigFormData.configType === 'department') {
|
||||
// 配置部门模式:传部门ID数组
|
||||
isDept = 1
|
||||
// 优先使用 selectDeptIds,如果没有则从 department 中提取
|
||||
// 收集人员ID(isDept=0)
|
||||
let personIds = (this.personConfigFormData.person || []).filter((id) => id)
|
||||
// 收集部门ID(isDept=1):优先 selectDeptIds,否则从 department 提取
|
||||
let deptIds = []
|
||||
if (
|
||||
this.personConfigFormData.selectDeptIds &&
|
||||
this.personConfigFormData.selectDeptIds.length > 0
|
||||
) {
|
||||
userOrDeptId = this.personConfigFormData.selectDeptIds
|
||||
deptIds = [...this.personConfigFormData.selectDeptIds]
|
||||
} else if (
|
||||
this.personConfigFormData.department &&
|
||||
Array.isArray(this.personConfigFormData.department) &&
|
||||
this.personConfigFormData.department.length > 0
|
||||
) {
|
||||
// 如果 selectDeptIds 为空,从 department 中提取
|
||||
userOrDeptId = this.personConfigFormData.department
|
||||
deptIds = this.personConfigFormData.department
|
||||
.map((path) => {
|
||||
if (Array.isArray(path) && path.length > 0) {
|
||||
return path[path.length - 1]
|
||||
@ -1826,47 +1879,44 @@ export default {
|
||||
return path
|
||||
})
|
||||
.filter((id) => id)
|
||||
} else {
|
||||
userOrDeptId = []
|
||||
}
|
||||
if (userOrDeptId.length === 0) {
|
||||
this.$message.warning('请至少选择一个部门')
|
||||
this.personConfigSubmitting = false
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// 配置人员模式:传人员ID数组(person 已经是 userId 数组)
|
||||
isDept = 0
|
||||
userOrDeptId = (this.personConfigFormData.person || []).filter((id) => id)
|
||||
if (userOrDeptId.length === 0) {
|
||||
this.$message.warning('请至少选择一个人员')
|
||||
this.personConfigSubmitting = false
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 处理 userOrDeptId,去掉 "ID:" 前缀
|
||||
const processedUserOrDeptId = userOrDeptId.map((id) => {
|
||||
// 校验:至少有一个人员或部门
|
||||
if (personIds.length === 0 && deptIds.length === 0) {
|
||||
this.$message.warning(
|
||||
this.personConfigFormData.configType === 'department'
|
||||
? '请至少选择一个部门'
|
||||
: '请至少选择一个人员'
|
||||
)
|
||||
this.personConfigSubmitting = false
|
||||
return
|
||||
}
|
||||
|
||||
const normalizeId = (id) => {
|
||||
if (typeof id === 'string' && id.startsWith('ID:')) {
|
||||
return id.substring(3) // 去掉 "ID:" 前缀(3个字符)
|
||||
return id.substring(3)
|
||||
}
|
||||
return id
|
||||
})
|
||||
}
|
||||
|
||||
// 合并:原来已配置的人员 + 已配置的部门,统一为 { id, isDept }
|
||||
const processedUserOrDeptIds = [
|
||||
...personIds.map((id) => ({ userOrDeptId: normalizeId(id), isDept: 0 })),
|
||||
...deptIds.map((id) => ({ userOrDeptId: normalizeId(id), isDept: 1 }))
|
||||
]
|
||||
|
||||
console.log('人员配置数据:', {
|
||||
roleId: this.personConfigFormData.roleId,
|
||||
roleName: this.personConfigFormData.roleName,
|
||||
configType: this.personConfigFormData.configType,
|
||||
isDept: isDept,
|
||||
userOrDeptIds: processedUserOrDeptId
|
||||
userOrDeptIds: processedUserOrDeptIds
|
||||
})
|
||||
|
||||
const request = {
|
||||
...api.GET_ROLE_PERMISSION_BING,
|
||||
params: {
|
||||
roleId: this.personConfigFormData.roleId,
|
||||
userOrDeptIds: processedUserOrDeptId,
|
||||
isDept: isDept
|
||||
userOrDept: processedUserOrDeptIds
|
||||
},
|
||||
disableSuccessMsg: true
|
||||
}
|
||||
|
||||
@ -109,6 +109,16 @@
|
||||
>
|
||||
查看
|
||||
</a>
|
||||
<!-- <span v-if="row.distributeStatus != '部分分发' && hasEngineDataEditPermission() && row.versionNumber === 1" class="link-separator"></span> -->
|
||||
<!-- <a
|
||||
v-if="row.distributeStatus != '部分分发' && hasEngineDataEditPermission() && row.versionNumber === 1"
|
||||
href="javascript:void(0)"
|
||||
class="el-link el-link--primary"
|
||||
style="margin-left: 5px;"
|
||||
@click.stop="handleRowEdit(row)"
|
||||
>
|
||||
编辑
|
||||
</a> -->
|
||||
<span v-if=" (row.distributeStatus === '未分发' || row.distributeStatus === '部分分发') &&hasEngineDataEditPermission()" class="link-separator"></span>
|
||||
<a
|
||||
v-if=" (row.distributeStatus === '未分发' || row.distributeStatus === '部分分发') && hasEngineDataEditPermission()"
|
||||
@ -117,6 +127,8 @@
|
||||
style="margin-left: 5px;"
|
||||
@click.stop="handleRowDispatch(row, rowIndex)"
|
||||
>
|
||||
|
||||
|
||||
分发
|
||||
</a>
|
||||
<span class="link-separator" v-if="row.distributeStatus === '未分发' && hasEngineDataEditPermission() && row.versionNumber === 1"></span>
|
||||
@ -352,7 +364,7 @@ export default {
|
||||
label: '操作',
|
||||
customSlot: 'options',
|
||||
align: 'center',
|
||||
width: '120',
|
||||
width: '160',
|
||||
fixed: 'right'
|
||||
}
|
||||
],
|
||||
@ -771,6 +783,9 @@ export default {
|
||||
// 从 selfEnginedata.vue 跳转,设置 ycOrOth 为 "玉柴"
|
||||
this.$refs.addEngineModelModal.showModal('玉柴')
|
||||
},
|
||||
handleRowEdit(row) {
|
||||
this.$refs.addEngineModelModal.showModalForEdit('玉柴', row)
|
||||
},
|
||||
handleAddSuccess() {
|
||||
// 子组件已经关闭弹窗,这里只需要刷新列表
|
||||
this.loadData()
|
||||
|
||||
@ -18,6 +18,7 @@ import ApaasCustomApprovalManagement from './custom-page/approvalManagement.vue'
|
||||
import ApaasCustomTodoList from './custom-page/todo.vue'
|
||||
import ApaasCustomMyDone from './custom-page/myDone.vue'
|
||||
import ApaasCustomMySend from './custom-page/mySend.vue'
|
||||
import ApaasCustomCheckPersonPermission from './custom-page/checkPersonPermission.vue'
|
||||
import ApaasCustomPermissionManagement from './custom-page/permissionManagement.vue'
|
||||
import ApaasCustomLayout from './custom-layout/custom-layout.vue'
|
||||
import { customFormComponentList } from './custom-component/form-component'
|
||||
@ -45,6 +46,7 @@ const install = function(Vue, opts) {
|
||||
Vue.component('apaas-custom-otherEngineCheck', ApaasOtherEngineCheck)
|
||||
Vue.component('apaas-custom-myDone', ApaasCustomMyDone)
|
||||
Vue.component('apaas-custom-mySend', ApaasCustomMySend)
|
||||
Vue.component('apaas-custom-checkPersonPermission', ApaasCustomCheckPersonPermission)
|
||||
Vue.component('apaas-custom-permissionManagement', ApaasCustomPermissionManagement)
|
||||
Vue.component('apaas-custom-layout', ApaasCustomLayout)
|
||||
// 安装表单部件
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user