fix:各种问题

This commit is contained in:
大黑 2026-05-08 16:14:57 +08:00
parent fd5ae6a55e
commit a399336d3d
35 changed files with 11832 additions and 5769 deletions

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

View File

@ -100,6 +100,13 @@
"title": "我发起的" "title": "我发起的"
} }
}, },
"apaas-custom-myDemo":{
"name": "apaas-custom-myDemo",
"path": "apaas-custom-myDemo",
"meta": {
"title": "我的测试"
}
},
"apaas-custom-selfEngineCheck":{ "apaas-custom-selfEngineCheck":{
"name": "apaas-custom-selfEngineCheck", "name": "apaas-custom-selfEngineCheck",
"path": "apaas-custom-selfEngineCheck", "path": "apaas-custom-selfEngineCheck",
@ -134,6 +141,13 @@
"meta": { "meta": {
"title": "权限管理" "title": "权限管理"
} }
},
"apaas-custom-checkPersonPermission":{
"name": "apaas-custom-checkPersonPermission",
"path": "apaas-custom-checkPersonPermission",
"meta": {
"title": "权限检查"
}
} }
}, },
"customWidgetList": [ "customWidgetList": [

Binary file not shown.

View 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>

View 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);
/***/ })
/******/ });

View 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);
/***/ })
/******/ });
});

View 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}})}));

View 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
}
}

View 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>

View 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);
/***/ })
/******/ });

View 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);
/***/ })
/******/ });
});

View 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}})}));

View 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>

View 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);
/***/ })
/******/ });

View 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);
/***/ })
/******/ });
});

View 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
View File

@ -4401,6 +4401,217 @@
"@xtuc/long": "4.2.2" "@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": { "@x-apaas/x-apaas-frontend-i18n": {
"version": "3.3.4-rc.1", "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", "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", "version": "4.1.0",
"resolved": "https://registry.npmmirror.com/bl/-/bl-4.1.0.tgz", "resolved": "https://registry.npmmirror.com/bl/-/bl-4.1.0.tgz",
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
"dev": true,
"requires": { "requires": {
"buffer": "^5.5.0", "buffer": "^5.5.0",
"inherits": "^2.0.4", "inherits": "^2.0.4",
@ -6424,7 +6634,6 @@
"version": "5.7.1", "version": "5.7.1",
"resolved": "https://registry.npmmirror.com/buffer/-/buffer-5.7.1.tgz", "resolved": "https://registry.npmmirror.com/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"dev": true,
"requires": { "requires": {
"base64-js": "^1.3.1", "base64-js": "^1.3.1",
"ieee754": "^1.1.13" "ieee754": "^1.1.13"
@ -6957,6 +7166,22 @@
"get-intrinsic": "^1.0.2" "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": { "call-me-maybe": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmmirror.com/call-me-maybe/-/call-me-maybe-1.0.2.tgz", "resolved": "https://registry.npmmirror.com/call-me-maybe/-/call-me-maybe-1.0.2.tgz",
@ -7420,8 +7645,7 @@
"cli-spinners": { "cli-spinners": {
"version": "2.7.0", "version": "2.7.0",
"resolved": "https://registry.npmmirror.com/cli-spinners/-/cli-spinners-2.7.0.tgz", "resolved": "https://registry.npmmirror.com/cli-spinners/-/cli-spinners-2.7.0.tgz",
"integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==", "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw=="
"dev": true
}, },
"cli-table3": { "cli-table3": {
"version": "0.5.1", "version": "0.5.1",
@ -10425,7 +10649,6 @@
"version": "1.0.4", "version": "1.0.4",
"resolved": "https://registry.npmmirror.com/defaults/-/defaults-1.0.4.tgz", "resolved": "https://registry.npmmirror.com/defaults/-/defaults-1.0.4.tgz",
"integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==",
"dev": true,
"requires": { "requires": {
"clone": "^1.0.2" "clone": "^1.0.2"
}, },
@ -10433,8 +10656,7 @@
"clone": { "clone": {
"version": "1.0.4", "version": "1.0.4",
"resolved": "https://registry.npmmirror.com/clone/-/clone-1.0.4.tgz", "resolved": "https://registry.npmmirror.com/clone/-/clone-1.0.4.tgz",
"integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg=="
"dev": true
} }
} }
}, },
@ -10939,6 +11161,23 @@
"dotenv-defaults": "^1.0.2" "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": { "duplexer": {
"version": "0.1.2", "version": "0.1.2",
"resolved": "https://registry.npmmirror.com/duplexer/-/duplexer-0.1.2.tgz", "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", "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==" "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": { "es-get-iterator": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/es-get-iterator/-/es-get-iterator-1.1.3.tgz", "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": { "es-shim-unscopables": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmmirror.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", "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": { "get-stdin": {
"version": "4.0.1", "version": "4.0.1",
"resolved": "https://registry.npmmirror.com/get-stdin/-/get-stdin-4.0.1.tgz", "resolved": "https://registry.npmmirror.com/get-stdin/-/get-stdin-4.0.1.tgz",
@ -14348,6 +14667,21 @@
"minimalistic-assert": "^1.0.1" "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": { "hast-util-parse-selector": {
"version": "2.2.5", "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", "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": { "is-interactive": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmmirror.com/is-interactive/-/is-interactive-1.0.0.tgz", "resolved": "https://registry.npmmirror.com/is-interactive/-/is-interactive-1.0.0.tgz",
"integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w=="
"dev": true
}, },
"is-map": { "is-map": {
"version": "2.0.2", "version": "2.0.2",
@ -15660,8 +15993,7 @@
"is-unicode-supported": { "is-unicode-supported": {
"version": "0.1.0", "version": "0.1.0",
"resolved": "https://registry.npmmirror.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "resolved": "https://registry.npmmirror.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz",
"integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw=="
"dev": true
}, },
"is-utf8": { "is-utf8": {
"version": "0.2.1", "version": "0.2.1",
@ -16996,7 +17328,6 @@
"version": "2.7.0", "version": "2.7.0",
"resolved": "https://registry.npmmirror.com/jszip/-/jszip-2.7.0.tgz", "resolved": "https://registry.npmmirror.com/jszip/-/jszip-2.7.0.tgz",
"integrity": "sha512-JIsRKRVC3gTRo2vM4Wy9WBC3TRcfnIZU8k65Phi3izkvPH975FowRYtKGT6PxevA0XnJ/yO8b0QwV0ydVyQwfw==", "integrity": "sha512-JIsRKRVC3gTRo2vM4Wy9WBC3TRcfnIZU8k65Phi3izkvPH975FowRYtKGT6PxevA0XnJ/yO8b0QwV0ydVyQwfw==",
"dev": true,
"requires": { "requires": {
"pako": "~1.0.2" "pako": "~1.0.2"
} }
@ -18184,6 +18515,11 @@
"unquote": "^1.1.0" "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": { "md5": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmmirror.com/md5/-/md5-2.3.0.tgz", "resolved": "https://registry.npmmirror.com/md5/-/md5-2.3.0.tgz",
@ -26475,7 +26811,6 @@
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmmirror.com/wcwidth/-/wcwidth-1.0.1.tgz", "resolved": "https://registry.npmmirror.com/wcwidth/-/wcwidth-1.0.1.tgz",
"integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==",
"dev": true,
"requires": { "requires": {
"defaults": "^1.0.3" "defaults": "^1.0.3"
} }
@ -27856,7 +28191,6 @@
"version": "0.3.5", "version": "0.3.5",
"resolved": "https://registry.npmmirror.com/zip-local/-/zip-local-0.3.5.tgz", "resolved": "https://registry.npmmirror.com/zip-local/-/zip-local-0.3.5.tgz",
"integrity": "sha512-GRV3D5TJY+/PqyeRm5CYBs7xVrKTKzljBoEXvocZu0HJ7tPEcgpSOYa2zFIsCZWgKWMuc4U3yMFgFkERGFIB9w==", "integrity": "sha512-GRV3D5TJY+/PqyeRm5CYBs7xVrKTKzljBoEXvocZu0HJ7tPEcgpSOYa2zFIsCZWgKWMuc4U3yMFgFkERGFIB9w==",
"dev": true,
"requires": { "requires": {
"async": "^1.4.2", "async": "^1.4.2",
"graceful-fs": "^4.1.3", "graceful-fs": "^4.1.3",
@ -27867,8 +28201,7 @@
"async": { "async": {
"version": "1.5.2", "version": "1.5.2",
"resolved": "https://registry.npmmirror.com/async/-/async-1.5.2.tgz", "resolved": "https://registry.npmmirror.com/async/-/async-1.5.2.tgz",
"integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w=="
"dev": true
} }
} }
} }

View File

@ -13,6 +13,7 @@
"cm": "git-cz" "cm": "git-cz"
}, },
"dependencies": { "dependencies": {
"@x-apaas/x-apaas-cli": "0.0.17",
"@x-apaas/x-apaas-frontend-i18n": "rc", "@x-apaas/x-apaas-frontend-i18n": "rc",
"@x-apaas/x-dcloud-page-engine": "rc", "@x-apaas/x-dcloud-page-engine": "rc",
"@x-apaas/x-dcloud-page-web": "rc", "@x-apaas/x-dcloud-page-web": "rc",

View File

@ -21,6 +21,11 @@ export default {
url: '/custom/dataEntryEngineModel/insert', url: '/custom/dataEntryEngineModel/insert',
method: 'post' method: 'post'
}, },
// 更新引擎(列表编辑机型)
UPDATE_ENGINE_MODEL: {
url: '/custom/dataEntryEngineModel/update',
method: 'post'
},
// 导入引擎 // 导入引擎
IMPORT_ENGINE_MODEL: { IMPORT_ENGINE_MODEL: {
url: '/custom/engineParamDetailPojo/excelImport', url: '/custom/engineParamDetailPojo/excelImport',
@ -44,6 +49,11 @@ export default {
url: '/custom/engineParamDetailPojo/selectParamListAndModel', url: '/custom/engineParamDetailPojo/selectParamListAndModel',
method: 'get' method: 'get'
}, },
// 填写人进入详情页时获取参数树(传参与 GET_ENGINE_TABLE_DETAIL 相同)
GET_ENGINE_TABLE_DETAIL_FOR_FILLED_BY: {
url: '/custom/engineParamDetailPojo/selectParamListAndModelForFilledBy',
method: 'get'
},
GET_NEW_MODEL_VERSION: { GET_NEW_MODEL_VERSION: {
url: '/custom/dataEntryEngineModel/synchronizeParams', url: '/custom/dataEntryEngineModel/synchronizeParams',
method: 'get' method: 'get'
@ -63,5 +73,13 @@ export default {
REJECT_TODO_TASK: { REJECT_TODO_TASK: {
url: '/custom/todoTaskPojo/rejectTodo', url: '/custom/todoTaskPojo/rejectTodo',
method: 'post' method: 'post'
},
CHECK_PERMISSION_USER_DATA: {
url: '/custom/permission/getPreAndRoleByCondition',
method: 'post'
},
EXPORT_PERMISSION_USER_DATA: {
url: '/custom/permission/exportPreAndRole',
method: 'get'
} }
} }

View File

@ -100,6 +100,13 @@
"title": "我发起的" "title": "我发起的"
} }
}, },
"apaas-custom-myDemo":{
"name": "apaas-custom-myDemo",
"path": "apaas-custom-myDemo",
"meta": {
"title": "我的测试"
}
},
"apaas-custom-selfEngineCheck":{ "apaas-custom-selfEngineCheck":{
"name": "apaas-custom-selfEngineCheck", "name": "apaas-custom-selfEngineCheck",
"path": "apaas-custom-selfEngineCheck", "path": "apaas-custom-selfEngineCheck",
@ -134,6 +141,13 @@
"meta": { "meta": {
"title": "权限管理" "title": "权限管理"
} }
},
"apaas-custom-checkPersonPermission":{
"name": "apaas-custom-checkPersonPermission",
"path": "apaas-custom-checkPersonPermission",
"meta": {
"title": "权限检查"
}
} }
}, },
"customWidgetList": [ "customWidgetList": [

View File

@ -7,7 +7,7 @@
:destroy-on-close="true" :destroy-on-close="true"
:modalVisible.sync="visible" :modalVisible.sync="visible"
:wrapper-class="'add-engine-model-modal'" :wrapper-class="'add-engine-model-modal'"
title="添加机型" :title="modalTitle"
:width="850" :width="850"
> >
<el-form <el-form
@ -124,6 +124,8 @@ export default {
return { return {
visible: false, visible: false,
submitting: false, submitting: false,
isEditMode: false,
editingModelId: null,
ycOrOth: '竞品', // ycOrOth: '竞品', //
formData: { formData: {
modelName: '', modelName: '',
@ -136,6 +138,9 @@ export default {
projectName: '', projectName: '',
projectNumber: '', projectNumber: '',
dispatchStatus: '', dispatchStatus: '',
emission: '',
burnType: '',
engineCapacity: '',
// //
manufacturerName: '', manufacturerName: '',
manufacturerAbbreviation: '', manufacturerAbbreviation: '',
@ -151,7 +156,8 @@ export default {
series: [{ required: true, message: '请输入系列', trigger: 'blur' }], series: [{ required: true, message: '请输入系列', trigger: 'blur' }],
marketSegment: [{ required: true, message: '请输入细分市场', trigger: 'blur' }], marketSegment: [{ required: true, message: '请输入细分市场', trigger: 'blur' }],
projectName: [{ 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: [ dispatchStatusOptions: [
@ -160,10 +166,17 @@ export default {
] ]
} }
}, },
computed: {
modalTitle() {
return this.isEditMode ? '编辑机型' : '添加机型'
}
},
methods: { methods: {
showModal(ycOrOth = '竞品') { showModal(ycOrOth = '竞品') {
// ycOrOth // ycOrOth
// selfEnginedata.vue ""otherEnginedata.vue "" // selfEnginedata.vue ""otherEnginedata.vue ""
this.isEditMode = false
this.editingModelId = null
this.ycOrOth = ycOrOth this.ycOrOth = ycOrOth
this.visible = true 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() { closeModal() {
this.visible = false this.visible = false
this.isEditMode = false
this.editingModelId = null
this.ycOrOth = '竞品' // this.ycOrOth = '竞品' //
this.resetForm('竞品') this.resetForm('竞品')
}, },
@ -193,6 +244,9 @@ export default {
projectName: '', projectName: '',
projectNumber: '', projectNumber: '',
distributeStatus: '未分发', distributeStatus: '未分发',
emission: '',
burnType: '',
engineCapacity: '',
// //
manufacturerName: '', manufacturerName: '',
manufacturerAbbreviation: '', manufacturerAbbreviation: '',
@ -204,17 +258,26 @@ export default {
this.$refs.addForm.validate((valid) => { this.$refs.addForm.validate((valid) => {
if (valid) { if (valid) {
this.submitting = true 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 = { const request = {
...api.ADD_ENGINE_MODEL, ...apiDef,
params: { params: {
...this.formData ...params
}, },
disableSuccessMsg: true disableSuccessMsg: true
} }
this.$request(request) this.$request(request)
.asyncThen((resp) => { .asyncThen((resp) => {
this.$message({ this.$message({
message: '提交成功', message: isEdit ? '保存成功' : '提交成功',
type: 'success' type: 'success'
}) })
this.closeModal() this.closeModal()
@ -222,9 +285,9 @@ export default {
this.$emit('success') this.$emit('success')
}) })
.asyncErrorCatch((err) => { .asyncErrorCatch((err) => {
console.error('添加失败:', err) console.error(isEdit ? '更新失败:' : '添加失败:', err)
this.$message({ this.$message({
message: '添加失败', message: isEdit ? '更新失败' : '添加失败',
type: 'error' type: 'error'
}) })
}) })
@ -242,7 +305,8 @@ export default {
.add-engine-model-modal { .add-engine-model-modal {
.add-engine-form { .add-engine-form {
padding: 20px 0; padding: 20px 0;
height: calc(70vh - 120px) !important;
overflow-y: auto !important;
.form-row { .form-row {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -265,4 +329,5 @@ export default {
padding-top: 20px; padding-top: 20px;
} }
} }
</style> </style>

View File

@ -12,12 +12,7 @@
:width="680" :width="680"
> >
<div class="batch-modify-content"> <div class="batch-modify-content">
<el-form <el-form ref="form" :model="formData" :rules="formRules" label-width="100px">
ref="form"
:model="formData"
:rules="formRules"
label-width="100px"
>
<el-form-item label="子系统:" prop="subsystem"> <el-form-item label="子系统:" prop="subsystem">
<el-select <el-select
v-model="formData.subsystem" v-model="formData.subsystem"
@ -26,12 +21,7 @@
style="width: 100%" style="width: 100%"
@change="handleSubsystemChange" @change="handleSubsystemChange"
> >
<el-option <el-option v-for="item in subsystemList" :key="item" :label="item" :value="item" />
v-for="item in subsystemList"
:key="item"
:label="item"
:value="item"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="dispatchType === 'update_param'" label="零部件名称:" prop="partsName"> <el-form-item v-if="dispatchType === 'update_param'" label="零部件名称:" prop="partsName">
@ -58,7 +48,14 @@
placeholder="请选择部门" placeholder="请选择部门"
clearable clearable
style="width: 100%" 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" @change="handleDepartmentChange"
> >
<el-option <el-option
@ -78,10 +75,17 @@
style="width: 100%" style="width: 100%"
/> />
</el-form-item> </el-form-item>
<el-form-item :label="dispatchType === 'update_param' ? '人员:' : '责任人:'" prop="userId"> <el-form-item
:label="dispatchType === 'update_param' ? '人员:' : '责任人:'"
prop="userId"
>
<el-select <el-select
v-model="formData.userId" v-model="formData.userId"
:placeholder="dispatchType === 'update_param' ? '请输入人员姓名进行搜索' : '请输入责任人姓名进行搜索'" :placeholder="
dispatchType === 'update_param'
? '请输入人员姓名进行搜索'
: '请输入责任人姓名进行搜索'
"
style="width: 100%" style="width: 100%"
clearable clearable
:disabled="!formData.department" :disabled="!formData.department"
@ -128,6 +132,10 @@ export default {
type: Array, type: Array,
default: () => [] default: () => []
}, },
isCompetitorEngine: {
type: Boolean,
default: false
},
fillerPersons: { fillerPersons: {
type: Array, type: Array,
default: () => [] default: () => []
@ -177,17 +185,17 @@ export default {
}, },
formRules() { formRules() {
const rules = { const rules = {
subsystem: [ subsystem: [{ required: true, message: '请选择子系统', trigger: 'change' }],
{ required: true, message: '请选择子系统', trigger: 'change' }
],
userId: [ userId: [
{ required: true, message: this.dispatchType === 'update_param' ? '请选择人员' : '请选择责任人', trigger: 'change' } {
required: true,
message: this.dispatchType === 'update_param' ? '请选择人员' : '请选择责任人',
trigger: 'change'
}
] ]
} }
// //
rules.department = [ rules.department = [{ required: true, message: '请选择部门', trigger: 'change' }]
{ required: true, message: '请选择部门', trigger: 'change' }
]
// //
if (this.dispatchType === 'update_param') { if (this.dispatchType === 'update_param') {
rules.partsName = [ rules.partsName = [
@ -212,7 +220,7 @@ export default {
// · - // · -
const normalizedDept = department.replace(/·/g, '-') 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) { if (parts.length > 0) {
return parts[parts.length - 1] return parts[parts.length - 1]
@ -393,13 +401,23 @@ export default {
this.availableDepartments = [] this.availableDepartments = []
this.userOptions = [] 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() this.filterDepartmentsByPartsName()
} }
}, },
// //
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 = [] this.availableDepartments = []
return return
} }
@ -448,10 +466,7 @@ export default {
const matchedItem = this.allManagerData.find((item) => { const matchedItem = this.allManagerData.find((item) => {
// //
const itemSubsystems = item.subsystem ? item.subsystem.split(',') : [] const itemSubsystems = item.subsystem ? item.subsystem.split(',') : []
return ( return itemSubsystems.includes(this.formData.subsystem) && item.department === department
itemSubsystems.includes(this.formData.subsystem) &&
item.department === department
)
}) })
if (matchedItem) { if (matchedItem) {
// //
@ -475,7 +490,9 @@ export default {
} }
if (!query || query.trim() === '') { if (!query || query.trim() === '') {
if (this.formData.userId) { 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 this.userOptions = selectedOptions
} else { } else {
this.userOptions = [] this.userOptions = []
@ -531,7 +548,9 @@ export default {
.asyncErrorCatch((err) => { .asyncErrorCatch((err) => {
console.error('搜索责任人失败:', err) console.error('搜索责任人失败:', err)
if (this.formData.userId) { 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 this.userOptions = selectedOptions
} else { } else {
this.userOptions = [] this.userOptions = []
@ -583,7 +602,11 @@ export default {
// //
if (this.dispatchType === 'update_param') { 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('请至少选择一个零部件名称') this.$message.warning('请至少选择一个零部件名称')
return return
} }
@ -604,7 +627,29 @@ export default {
return 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) { if (this.formData.currentResponsibleId && this.formData.rowId) {
// //
const request = { const request = {
@ -690,7 +735,7 @@ export default {
.asyncThen((resp) => { .asyncThen((resp) => {
let result = [] let result = []
if (resp && resp.data) { if (resp && resp.data) {
result = resp.data.data || resp.data || [] result = resp.data.data || resp.data || []
} }
this.departmentTreeData = this.formatDepartmentTreeData(result) this.departmentTreeData = this.formatDepartmentTreeData(result)
}) })
@ -711,11 +756,11 @@ export default {
children: undefined children: undefined
} }
if (node.children && Array.isArray(node.children) && node.children.length > 0) { 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 formatted
} }
return data.map(node => formatNode(node)) return data.map((node) => formatNode(node))
}, },
// ID // ID
getDepartmentIdByDepartment(department) { getDepartmentIdByDepartment(department) {
@ -723,7 +768,7 @@ export default {
// allManagerData // allManagerData
if (this.allManagerData && this.allManagerData.length > 0) { if (this.allManagerData && this.allManagerData.length > 0) {
const matchedItem = this.allManagerData.find((item) => item.department === department) const matchedItem = this.allManagerData.find((item) => item.department === department)
return matchedItem ? (matchedItem.departmentId || '') : '' return matchedItem ? matchedItem.departmentId || '' : ''
} }
return '' return ''
} }
@ -751,7 +796,7 @@ export default {
// allManagerData // allManagerData
if (this.allManagerData && this.allManagerData.length > 0) { if (this.allManagerData && this.allManagerData.length > 0) {
const matchedItem = this.allManagerData.find((item) => item.department === department) const matchedItem = this.allManagerData.find((item) => item.department === department)
return matchedItem ? (matchedItem.departmentId || '') : '' return matchedItem ? matchedItem.departmentId || '' : ''
} }
return '' return ''
}, },

View File

@ -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>

View File

@ -15,7 +15,7 @@
<el-select <el-select
v-model="currentVersionId" v-model="currentVersionId"
size="small" size="small"
:disabled="!canSwitchVersion || isEditMode || isEditDeptMode" :disabled="!canSwitchVersion || isEditMode || isEditDeptMode || isTreeAndContentLoading"
style="width: 120px;" style="width: 120px;"
@change="onVersionChange" @change="onVersionChange"
> >
@ -35,6 +35,9 @@
<el-button size="small" @click="handleBatchModifyResponsible"> <el-button size="small" @click="handleBatchModifyResponsible">
{{ dispatchType === 'update_param' ? '批量修改填写人' : '批量修改责任人' }} {{ dispatchType === 'update_param' ? '批量修改填写人' : '批量修改责任人' }}
</el-button> </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 size="small" @click="handleSave">保存</el-button> -->
<el-button <el-button
type="primary" type="primary"
@ -134,7 +137,11 @@
</div> </div>
</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="left-tree-panel">
<div class="tree-search-header"> <div class="tree-search-header">
<el-radio-group v-model="treeSearchMode" size="mini" class="search-mode-switch"> <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 v-if="isWholeEngineParamsSelected" class="section" :key="sectionKey">
<div class="section-title">{{ sectionKey }}</div> <div class="section-title">{{ sectionKey }}</div>
<div class="grid whole-engine-grid"> <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 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>
<div <div
class="grid-row whole-engine-row" class="grid-row whole-engine-row"
v-for="(row, idx) in sectionData" v-for="(row, idx) in sectionData"
:key="sectionKey + '-' + idx" :key="sectionKey + '-' + idx"
:class="{ 'without-parameter-source': isCompetitiveEngineEntry }"
> >
<div class="cell">{{ row.parameterName }}</div> <div class="cell">{{ row.parameterName }}</div>
<div class="cell"> <div class="cell">
@ -205,6 +217,9 @@
<div class="cell"> <div class="cell">
<span>{{ row.parameterValue || '/' }}</span> <span>{{ row.parameterValue || '/' }}</span>
</div> </div>
<div v-if="!isCompetitiveEngineEntry" class="cell">
<span>{{ row.parameterSource || '/' }}</span>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -219,12 +234,14 @@
:class="{ :class="{
'edit-mode': isEditMode && !isDispatchMode, 'edit-mode': isEditMode && !isDispatchMode,
'dispatch-mode': isDispatchMode && dispatchType !== 'update_param', '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 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" v-if="!isEditMode || isDispatchMode">填写部门</div>
<div <div
class="cell header-cell" class="cell header-cell"
@ -253,7 +270,8 @@
:class="{ :class="{
'edit-mode': isEditMode && !isDispatchMode, 'edit-mode': isEditMode && !isDispatchMode,
'dispatch-mode': isDispatchMode && dispatchType !== 'update_param', '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> <div class="cell">{{ row.parameterName }}</div>
@ -274,6 +292,9 @@
}}</span> }}</span>
<span v-else>{{ row.parameterValue || '/' }}</span> <span v-else>{{ row.parameterValue || '/' }}</span>
</div> </div>
<div v-if="!isCompetitiveEngineEntry" class="cell">
<span>{{ row.parameterSource || '/' }}</span>
</div>
<div v-if="!isEditMode || isDispatchMode" class="cell"> <div v-if="!isEditMode || isDispatchMode" class="cell">
<span v-if="!isEditDeptMode">{{ formatDepartmentDisplay(row.department) }}</span> <span v-if="!isEditDeptMode">{{ formatDepartmentDisplay(row.department) }}</span>
<el-select <el-select
@ -528,6 +549,7 @@
<batch-modify-responsible-modal <batch-modify-responsible-modal
ref="batchModifyResponsibleModal" ref="batchModifyResponsibleModal"
:responsible-persons="responsiblePersons" :responsible-persons="responsiblePersons"
:is-competitor-engine="isCompetitiveEngineEntry"
:filler-persons="fillerPersons" :filler-persons="fillerPersons"
:dispatch-type="dispatchType" :dispatch-type="dispatchType"
:version-data="versionData" :version-data="versionData"
@ -536,6 +558,55 @@
@refresh-responsible-persons="loadResponsiblePersons" @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 <el-dialog
title="批量修改部门" title="批量修改部门"
@ -702,6 +773,7 @@ export default {
batchModifyDeptPartsNameList: [], // batchModifyDeptPartsNameList: [], //
batchModifyDeptSearchText: '', // batchModifyDeptSearchText: '', //
currentVersionId: '', currentVersionId: '',
isTreeAndContentLoading: false, // loading
hasVersionChanged: false, // hasVersionChanged: false, //
treeFilterText: '', treeFilterText: '',
treeSearchMode: 'subsystem', // 'subsystem' 'parts' treeSearchMode: 'subsystem', // 'subsystem' 'parts'
@ -713,6 +785,16 @@ export default {
fillerPersons: [], // GET_FILLER_DATA fillerPersons: [], // GET_FILLER_DATA
fillerUserOptions: {}, // key: rowId, value: [userOptions] fillerUserOptions: {}, // key: rowId, value: [userOptions]
fillerUserLoading: false, // loading fillerUserLoading: false, // loading
// /
replaceAllPersonDialogVisible: false,
replaceAllPersonSubmitting: false,
replaceAllPersonFormData: {
userId: '',
userNumber: '',
username: ''
},
replaceAllPersonUserOptions: [],
replaceAllPersonUserLoading: false,
// ID // ID
versions: [], versions: [],
treeData: [], treeData: [],
@ -918,6 +1000,17 @@ export default {
整车参数: params 整车参数: 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() { progressDetail() {
if (this.progressDetailData && Object.keys(this.progressDetailData).length > 0) { if (this.progressDetailData && Object.keys(this.progressDetailData).length > 0) {
@ -1575,7 +1668,10 @@ export default {
}, },
// GET_MANAGER_DATA // GET_MANAGER_DATA
loadResponsiblePersons() { loadResponsiblePersons() {
const request = { if(this.isCompetitiveEngineEntry) {
}else{
const request = {
...api.GET_MANAGER_DATA, ...api.GET_MANAGER_DATA,
params: { params: {
pageNumber: 1, pageNumber: 1,
@ -1605,6 +1701,8 @@ export default {
console.error('加载责任人列表失败:', err) console.error('加载责任人列表失败:', err)
this.responsiblePersons = [] this.responsiblePersons = []
}) })
}
}, },
// GET_FILLER_DATA // GET_FILLER_DATA
loadFillerPersons() { loadFillerPersons() {
@ -1829,6 +1927,10 @@ export default {
return time return time
}, },
onVersionChange() { onVersionChange() {
// loading
if (this.isTreeAndContentLoading) {
return
}
// //
this.hasVersionChanged = true this.hasVersionChanged = true
// 退 // 退
@ -2602,6 +2704,204 @@ export default {
// //
this.$refs.batchModifyResponsibleModal.showModal() 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) { handleBatchModifyConfirm(change) {
// change : { subsystem: '', department: '', oldResponsiblePersonId: '1', newResponsiblePersonId: '2', userId: 'userId', userNumber: 'userNumber' } // change : { subsystem: '', department: '', oldResponsiblePersonId: '1', newResponsiblePersonId: '2', userId: 'userId', userNumber: 'userNumber' }
if (!change) { if (!change) {
@ -2715,7 +3015,74 @@ export default {
return 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(() => { this.loadResponsiblePersons().then(() => {
// //
// 便 // 便
@ -2866,8 +3233,11 @@ export default {
// //
// 使 props detail model // 使 props detail model
console.log(this.detail, 'this.detail', this.detail.id) 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 = { const request = {
...api.GET_ENGINE_TABLE_DETAIL, ...tableDetailApi,
params: { params: {
modelID: this.detail.id, modelID: this.detail.id,
parameterVersion: this.currentVersionId || 1 // 1 parameterVersion: this.currentVersionId || 1 // 1
@ -2894,8 +3264,12 @@ export default {
console.warn('缺少 detail.id无法加载树数据') console.warn('缺少 detail.id无法加载树数据')
return return
} }
this.isTreeAndContentLoading = true
const tableDetailApi = this.filledBy
? api.GET_ENGINE_TABLE_DETAIL_FOR_FILLED_BY
: api.GET_ENGINE_TABLE_DETAIL
const request = { const request = {
...api.GET_ENGINE_TABLE_DETAIL, ...tableDetailApi,
params: { params: {
modelID: this.detail.id, modelID: this.detail.id,
userID: getUserId(), userID: getUserId(),
@ -2959,13 +3333,18 @@ export default {
} }
// detail.id // detail.id
if (this.detail && this.detail.id && allKeys.length > 0) { 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) => { .asyncErrorCatch((err) => {
console.error('获取参数列表失败:', err) console.error('获取参数列表失败:', err)
this.isTreeAndContentLoading = false
this.$message({ this.$message({
type: 'error', type: 'error',
message: '获取参数列表失败' message: '获取参数列表失败'
@ -3585,11 +3964,18 @@ export default {
}) })
}, },
// //
loadEngineDetail() { loadEngineDetail(options = {}) {
const { withPanelLoading = false } = options
if (withPanelLoading) {
this.isTreeAndContentLoading = true
}
// 使 detail.id使 currentEngineModelID // 使 detail.id使 currentEngineModelID
const modelID = (this.detail && this.detail.id) || this.currentEngineModelID const modelID = (this.detail && this.detail.id) || this.currentEngineModelID
if (!modelID) { if (!modelID) {
console.warn('缺少 engineModelID无法加载详情') console.warn('缺少 engineModelID无法加载详情')
if (withPanelLoading) {
this.isTreeAndContentLoading = false
}
return return
} }
@ -3601,6 +3987,9 @@ export default {
// //
if (subsystemNames.length === 0 && parameterTypes.length === 0) { if (subsystemNames.length === 0 && parameterTypes.length === 0) {
if (withPanelLoading) {
this.isTreeAndContentLoading = false
}
return return
} }
console.log(subsystemNames, parameterTypes, subsystemTypes) console.log(subsystemNames, parameterTypes, subsystemTypes)
@ -3640,18 +4029,22 @@ export default {
params.isRes = 1 params.isRes = 1
} }
const request = { const subsystemPartBatches = this.chunkSubsystemParts(params.subsystemParts, 60)
...api.GET_ENGINE_DETAIL, const requestTasks = subsystemPartBatches.map((subsystemParts) => {
params: params, return this.requestEngineDetailBatch({
disableSuccessMsg: true ...params,
} subsystemParts
})
})
this.$request(request) Promise.all(requestTasks)
.asyncThen((resp) => { .then((responses) => {
// const mergedData = this.mergeEngineDetailBatchData(
console.log('接口返回数据:', resp) responses.map((resp) => (resp && resp.data) || {})
if (resp && resp.data) { )
console.log('准备处理的数据:', resp.data) console.log('接口返回数据:', responses)
if (mergedData && Object.keys(mergedData).length > 0) {
console.log('准备处理的数据:', mergedData)
// //
// //
let tempOriginalData = null let tempOriginalData = null
@ -3660,7 +4053,7 @@ export default {
// processDetailData versionData // processDetailData versionData
tempOriginalData = JSON.parse(JSON.stringify(this.versionData)) tempOriginalData = JSON.parse(JSON.stringify(this.versionData))
} }
this.processDetailData(resp.data) this.processDetailData(mergedData)
// 使 // 使
if (this.isDispatchMode && !this.dispatchOriginalData && tempOriginalData) { if (this.isDispatchMode && !this.dispatchOriginalData && tempOriginalData) {
this.$nextTick(() => { this.$nextTick(() => {
@ -3676,14 +4069,64 @@ export default {
// //
// //
} else { } else {
console.warn('接口返回数据为空或格式不正确', resp) console.warn('接口返回数据为空或格式不正确', responses)
}
if (withPanelLoading) {
this.isTreeAndContentLoading = false
} }
}) })
.asyncErrorCatch((err) => { .catch((err) => {
console.error('获取引擎详情失败:', err) console.error('获取引擎详情失败:', err)
if (withPanelLoading) {
this.isTreeAndContentLoading = false
}
this.$message.error('获取引擎详情失败') 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: "", ... }] } // : { "": [{ partsName: "", parameterName: "", ... }] }
// keypartsName // keypartsName
@ -3798,6 +4241,7 @@ export default {
parameterName: parameterName, parameterName: parameterName,
partsName: partsName, partsName: partsName,
parameterValue: item.parameterValue || item.value || '', // parameterValue: item.parameterValue || item.value || '', //
parameterSource: item.parameterSource || '', // 使 GET_ENGINE_DETAIL
unit: item.unit || '-', unit: item.unit || '-',
department: department, department: department,
owner: owner, owner: owner,
@ -4985,7 +5429,7 @@ export default {
background: #fff; background: #fff;
padding: 20px; padding: 20px;
margin-left: 20px; margin-left: 20px;
overflow-y: auto !important; overflow: auto !important;
} }
.section { .section {
@ -5004,54 +5448,96 @@ export default {
.grid { .grid {
border: 1px solid #ebeef5; border: 1px solid #ebeef5;
border-radius: 0; border-radius: 0;
width: max-content;
min-width: 100%;
} }
.grid-header { .grid-header {
display: grid; display: grid;
grid-template-columns: 1fr 100px 120px 200px 120px; grid-template-columns: minmax(240px, 1fr) 100px 120px 140px 200px 120px;
background: #f5f7fa; background: #f5f7fa;
border-bottom: 1px solid #ebeef5; border-bottom: 1px solid #ebeef5;
&.without-parameter-source {
grid-template-columns: minmax(240px, 1fr) 100px 120px 200px 120px;
}
&.edit-mode { &.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 { &.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 { &.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 { .grid-row {
display: grid; 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; border-bottom: 1px solid #ebeef5;
background: #fff; background: #fff;
&.without-parameter-source {
grid-template-columns: minmax(240px, 1fr) 100px 120px 200px 120px;
}
&.edit-mode { &.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 { &.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 { &.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-grid {
.whole-engine-header { .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 { .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);
}
} }
} }

View File

@ -29,43 +29,16 @@
</div> </div>
<div class="table-section"> <div class="table-section">
<el-table <el-table :data="tableData" border style="width: 100%">
:data="tableData" <el-table-column type="index" label="序号" width="90" align="center" />
border <el-table-column prop="department" label="责任部门" align="center">
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"> <template slot-scope="scope">
{{ formatDepartmentDisplay(scope.row.department) }} {{ formatDepartmentDisplay(scope.row.department) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="subsystem" label="子系统" align="center" />
prop="subsystem" <el-table-column prop="username" label="责任人" width="250" align="center" />
label="子系统" <el-table-column v-if="hasEditPermission()" label="操作" width="200" align="center">
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"> <template slot-scope="scope">
<a <a
href="javascript:void(0)" href="javascript:void(0)"
@ -126,12 +99,7 @@
:modal="false" :modal="false"
@close="handleDialogClose" @close="handleDialogClose"
> >
<el-form <el-form ref="form" :model="formData" :rules="formRules" label-width="100px">
ref="form"
:model="formData"
:rules="formRules"
label-width="100px"
>
<el-form-item label="子系统:" prop="subsystem"> <el-form-item label="子系统:" prop="subsystem">
<el-select <el-select
v-model="formData.subsystem" v-model="formData.subsystem"
@ -232,7 +200,11 @@
<el-button @click="handleDepartmentDialogClose"> <el-button @click="handleDepartmentDialogClose">
取消 取消
</el-button> </el-button>
<el-button type="primary" :disabled="!selectedDepartmentId" @click="handleDepartmentDialogConfirm"> <el-button
type="primary"
:disabled="!selectedDepartmentId"
@click="handleDepartmentDialogConfirm"
>
确定 确定
</el-button> </el-button>
</div> </div>
@ -259,9 +231,7 @@
:disabled="importing" :disabled="importing"
> >
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text"> <div class="el-upload__text"> 将文件拖到此处<em>点击上传</em> </div>
将文件拖到此处<em>点击上传</em>
</div>
<div slot="tip" class="el-upload__tip"> <div slot="tip" class="el-upload__tip">
仅支持Excel模板文件 仅支持Excel模板文件
</div> </div>
@ -306,15 +276,9 @@ export default {
departmentId: '' // ID使 departmentId: '' // ID使
}, },
formRules: { formRules: {
department: [ department: [{ required: true, message: '请选择责任部门', trigger: 'change' }],
{ required: true, message: '请选择责任部门', trigger: 'change' } subsystem: [{ required: true, message: '请输入子系统', trigger: 'blur' }],
], responsible: [{ required: true, message: '请选择责任人', trigger: 'change' }]
subsystem: [
{ required: true, message: '请输入子系统', trigger: 'blur' }
],
responsible: [
{ required: true, message: '请选择责任人', trigger: 'change' }
]
}, },
subsystemList: [], subsystemList: [],
userOptions: [], // userOptions: [], //
@ -596,8 +560,8 @@ export default {
// id name // id name
return data.map((node) => ({ return data.map((node) => ({
id: node.id, id: node.id,
name: node.name name: node.name
})) }))
}, },
handleAdd() { handleAdd() {
@ -628,11 +592,13 @@ export default {
// //
// //
if (row.userId) { if (row.userId) {
this.userOptions = [{ this.userOptions = [
userId: row.userId, {
username: row.username || row.userId, userId: row.userId,
userNumber: row.userNumber || row.userId username: row.username || row.userId,
}] userNumber: row.userNumber || row.userId
}
]
} else { } else {
this.userOptions = [] this.userOptions = []
} }
@ -692,7 +658,9 @@ export default {
params: { params: {
departmentId: this.formData.selectDeptId, departmentId: this.formData.selectDeptId,
department: this.formData.selectDeptName, 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 userId: this.formData.userId || this.formData.responsible
}, },
disableSuccessMsg: true disableSuccessMsg: true
@ -720,7 +688,9 @@ export default {
params: { params: {
departmentId: this.formData.selectDeptId, departmentId: this.formData.selectDeptId,
department: this.formData.selectDeptName, 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, userId: this.formData.responsible,
rowId: this.formData.rowId rowId: this.formData.rowId
}, },
@ -827,7 +797,9 @@ export default {
if (!query || query.trim() === '') { if (!query || query.trim() === '') {
if (this.formData.responsible) { if (this.formData.responsible) {
// options // 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 this.userOptions = selectedOptions
} else { } else {
this.userOptions = [] this.userOptions = []
@ -903,7 +875,9 @@ export default {
console.error('搜索责任人失败:', err) console.error('搜索责任人失败:', err)
// //
if (this.formData.responsible) { 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 this.userOptions = selectedOptions
} else { } else {
this.userOptions = [] this.userOptions = []
@ -1012,7 +986,7 @@ export default {
// · - // · -
const normalizedDept = department.replace(/·/g, '-') 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) { if (parts.length > 0) {
return parts[parts.length - 1] return parts[parts.length - 1]
@ -1349,6 +1323,15 @@ export default {
color: #909399; color: #909399;
font-size: 14px; 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 { .table-section {
@ -1381,10 +1364,10 @@ export default {
} }
} }
} }
::v-deep .el-popper{ ::v-deep .el-popper {
width: auto !important; width: auto !important;
} }
.page-content{ .page-content {
width: calc(100% - 80px) !important; width: calc(100% - 80px) !important;
} }
.handler-select { .handler-select {

View File

@ -63,6 +63,15 @@
clearable clearable
class="tree-search" class="tree-search"
></el-input> ></el-input>
<div class="tree-select-actions">
<el-checkbox
v-model="treeSelectAllMaster"
:indeterminate="treeSelectAllIndeterminate"
class="tree-select-checkbox"
>
全选
</el-checkbox>
</div>
<el-tree <el-tree
ref="paramTree" ref="paramTree"
:data="treeData" :data="treeData"
@ -595,6 +604,24 @@ export default {
} }
return filtered 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: { watch: {
@ -840,6 +867,48 @@ export default {
// //
this.reloadModelDetailsForCheckedNodes() 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) { getParamValue(model, param) {
// param { parameterName, subsystemName, parameterId, partsName } // param { parameterName, subsystemName, parameterId, partsName }
if (!model || !model.id || !param) { if (!model || !model.id || !param) {
@ -951,7 +1020,8 @@ export default {
...api.GET_MODEL_QUERT_TABLE_BY_VERSION, ...api.GET_MODEL_QUERT_TABLE_BY_VERSION,
params: { params: {
page: 1, page: 1,
size: 999 size: 999,
userId: getUserId()
}, },
disableSuccessMsg: true disableSuccessMsg: true
} }
@ -2659,7 +2729,7 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex-shrink: 0; flex-shrink: 0;
height: 100%; height: calc(100% - 30px);
.tree-search-header { .tree-search-header {
margin-bottom: 8px; margin-bottom: 8px;
@ -2680,6 +2750,20 @@ export default {
margin-bottom: 8px; 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 { .custom-tree-node {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;

View File

@ -477,6 +477,20 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </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-form-item label="填写部门:" prop="department">
<el-input <el-input
v-model="paramFormData.departmentName" v-model="paramFormData.departmentName"
@ -672,7 +686,8 @@ export default {
parameterSource: '', parameterSource: '',
numberOrFormula: '', numberOrFormula: '',
fillDepartment: '', fillDepartment: '',
remarks: '' remarks: '',
isNumber: '数值'
}, },
departmentDialogVisible: false, // departmentDialogVisible: false, //
departmentTreeData: [], // el-tree departmentTreeData: [], // el-tree
@ -929,6 +944,14 @@ export default {
width: '100', width: '100',
align: 'center' align: 'center'
}, },
{
prop: 'isNumber',
label: '数值类型',
showOverflowTooltip: true,
width: '100',
align: 'center',
formatter: ({ cellValue }) => this.formatIsNumberDisplay(cellValue)
},
{ {
prop: 'parameterSource', prop: 'parameterSource',
label: '参数计划来源', label: '参数计划来源',
@ -1026,6 +1049,14 @@ export default {
width: '100', width: '100',
align: 'center' align: 'center'
}, },
{
prop: 'isNumber',
label: '数值类型',
showOverflowTooltip: true,
width: '100',
align: 'center',
formatter: ({ cellValue }) => this.formatIsNumberDisplay(cellValue)
},
{ {
prop: 'parameterSource', prop: 'parameterSource',
label: '参数计划来源', label: '参数计划来源',
@ -1884,6 +1915,21 @@ export default {
// //
return normalizedDept 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() { handleBack() {
// //
if (this.isApprovalMode) { if (this.isApprovalMode) {
@ -3292,7 +3338,8 @@ export default {
parameterSource: '', parameterSource: '',
numberOrFormula: '', numberOrFormula: '',
fillDepartment: '', fillDepartment: '',
remarks: '' remarks: '',
isNumber: '数值'
} }
this.paramModalVisible = true this.paramModalVisible = true
// //
@ -3322,7 +3369,8 @@ export default {
parameterSource: row.parameterSource || '', parameterSource: row.parameterSource || '',
numberOrFormula: row.numberOrFormula || '', numberOrFormula: row.numberOrFormula || '',
fillDepartment: row.fillDepartment || '', fillDepartment: row.fillDepartment || '',
remarks: row.remarks || '' remarks: row.remarks || '',
isNumber: this.normalizeParamIsNumberForForm(row.isNumber)
} }
this.paramModalVisible = true this.paramModalVisible = true
// //
@ -3602,6 +3650,7 @@ export default {
numberOrFormula: this.paramFormData.numberOrFormula, numberOrFormula: this.paramFormData.numberOrFormula,
unit: this.paramFormData.unit, unit: this.paramFormData.unit,
remarks: this.paramFormData.remarks, remarks: this.paramFormData.remarks,
isNumber: this.paramFormData.isNumber,
number: number:
this.tableData.length > 0 this.tableData.length > 0
? Math.max(...this.tableData.map((item) => item.number || 0)) + 1 ? Math.max(...this.tableData.map((item) => item.number || 0)) + 1
@ -3648,6 +3697,7 @@ export default {
numberOrFormula: this.paramFormData.numberOrFormula, numberOrFormula: this.paramFormData.numberOrFormula,
unit: this.paramFormData.unit, unit: this.paramFormData.unit,
remarks: this.paramFormData.remarks, remarks: this.paramFormData.remarks,
isNumber: this.paramFormData.isNumber,
operation: 'update' operation: 'update'
}) })
} }
@ -3675,7 +3725,8 @@ export default {
parameterSource: '', parameterSource: '',
numberOrFormula: '', numberOrFormula: '',
fillDepartment: '', fillDepartment: '',
remarks: '' remarks: '',
isNumber: '数值'
} }
this.paramCurrentRow = null this.paramCurrentRow = null
this.paramCurrentRowIndex = -1 this.paramCurrentRowIndex = -1
@ -3737,7 +3788,8 @@ export default {
numberOrFormula: this.paramFormData.numberOrFormula, numberOrFormula: this.paramFormData.numberOrFormula,
department: this.paramFormData.department, department: this.paramFormData.department,
fillDepartment: this.paramFormData.fillDepartment, fillDepartment: this.paramFormData.fillDepartment,
remarks: this.paramFormData.remarks remarks: this.paramFormData.remarks,
isNumber: this.paramFormData.isNumber
} }
}, },
loadTemplateInfo() { loadTemplateInfo() {

View 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>

View File

@ -3,7 +3,7 @@
<template v-if="!showEngineDetail"> <template v-if="!showEngineDetail">
<div class="page-header"> <div class="page-header">
<div class="title"> <div class="title">
玉柴发动机数据 竞品发动机数据
</div> </div>
<div class="operation"> <div class="operation">
<el-button v-if="hasEngineDataEditPermission()" type="primary" @click="handleDownloadTemplate">下载模板</el-button> <el-button v-if="hasEngineDataEditPermission()" type="primary" @click="handleDownloadTemplate">下载模板</el-button>
@ -109,6 +109,16 @@
> >
查看 查看
</a> </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> <span v-if=" (row.distributeStatus === '未分发' || row.distributeStatus === '部分分发') &&hasEngineDataEditPermission()" class="link-separator"></span>
<a <a
v-if=" (row.distributeStatus === '未分发' || row.distributeStatus === '部分分发') && hasEngineDataEditPermission()" v-if=" (row.distributeStatus === '未分发' || row.distributeStatus === '部分分发') && hasEngineDataEditPermission()"
@ -352,7 +362,7 @@ export default {
label: '操作', label: '操作',
customSlot: 'options', customSlot: 'options',
align: 'center', align: 'center',
width: '120', width: '160',
fixed: 'right' fixed: 'right'
} }
], ],
@ -435,7 +445,7 @@ export default {
return false return false
} }
}, },
// //
hasEngineDataEditPermission() { hasEngineDataEditPermission() {
// //
if (this.isAdmin()) { if (this.isAdmin()) {
@ -450,14 +460,14 @@ export default {
if (!Array.isArray(permissionData)) { if (!Array.isArray(permissionData)) {
return false return false
} }
// permissionPath "" parameterPer // permissionPath "" parameterPer
return permissionData.some((perm) => { return permissionData.some((perm) => {
const permissionPath = perm.permissionPath || '' const permissionPath = perm.permissionPath || ''
const parameterPer = perm.parameterPer || '' const parameterPer = perm.parameterPer || ''
return permissionPath === '玉柴发动机数据' && parameterPer === '编辑' return permissionPath === '竞品发动机数据' && parameterPer === '编辑'
}) })
} catch (err) { } catch (err) {
console.error('检查玉柴发动机数据编辑权限失败:', err) console.error('检查竞品发动机数据编辑权限失败:', err)
return false return false
} }
}, },
@ -771,6 +781,9 @@ export default {
// selfEnginedata.vue ycOrOth "" // selfEnginedata.vue ycOrOth ""
this.$refs.addEngineModelModal.showModal('竞品') this.$refs.addEngineModelModal.showModal('竞品')
}, },
handleRowEdit(row) {
this.$refs.addEngineModelModal.showModalForEdit('竞品', row)
},
handleAddSuccess() { handleAddSuccess() {
// //
this.loadData() this.loadData()
@ -977,4 +990,7 @@ export default {
width: 4px; width: 4px;
height: 14px; height: 14px;
} }
.add-engine-model-modal .modal-body{
}
</style> </style>

View File

@ -174,24 +174,22 @@
<!-- 配置部门模式 --> <!-- 配置部门模式 -->
<template v-if="personConfigFormData.configType === 'department'"> <template v-if="personConfigFormData.configType === 'department'">
<el-form-item label="责任部门:" prop="department"> <el-form-item label="责任部门:" prop="department">
<el-cascader <el-select
ref="departmentCascader" v-model="personConfigFormData.selectDeptIds"
v-model="personConfigFormData.department" multiple
:options="departmentList"
:props="{
multiple: true,
checkStrictly: true,
value: 'id',
label: 'name',
children: 'children',
emitPath: true
}"
filterable filterable
placeholder="请选择责任部门(可多选)" placeholder="请选择责任部门(可多选)"
clearable clearable
style="width: 100%" style="width: 100%"
@change="handlePersonDepartmentChange" @change="handlePersonDepartmentChange"
/> >
<el-option
v-for="item in departmentSelectOptionsMerged"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item> </el-form-item>
</template> </template>
<!-- 配置人员模式 --> <!-- 配置人员模式 -->
@ -382,12 +380,14 @@ export default {
}, },
personOptions: [], // personOptions: [], //
personSearchLoading: false, // loading personSearchLoading: false, // loading
selectedDepartmentOptions: [], // { value, label }
personConfigFormRules: { personConfigFormRules: {
department: [ department: [
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (this.personConfigFormData.configType === 'department') { 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('请选择责任部门')) callback(new Error('请选择责任部门'))
} else { } else {
callback() callback()
@ -457,6 +457,34 @@ export default {
} }
}) })
return nodes 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: { watch: {
@ -1488,6 +1516,7 @@ export default {
roleId: row.rowId || row.id || '', roleId: row.rowId || row.id || '',
roleName: row.roleName || '' roleName: row.roleName || ''
} }
this.selectedDepartmentOptions = []
const request = { const request = {
...api.CHECK_ROLE_USER_DEPT, ...api.CHECK_ROLE_USER_DEPT,
params: { params: {
@ -1498,9 +1527,38 @@ export default {
this.$request(request) this.$request(request)
.asyncThen((resp) => { .asyncThen((resp) => {
if (resp && resp.data) { if (resp && resp.data) {
// { "": [], "": ["-yc90117847"] } // { "": ["-ID"], "": ["-yc90117847"] }
const respData = resp.data const respData = resp.data
const personArray = respData['人员'] || respData.person || [] 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"] // ["userName-userId"]
const userIds = [] const userIds = []
const personOptionsMap = new Map() const personOptionsMap = new Map()
@ -1538,21 +1596,17 @@ export default {
}, },
// //
handleConfigTypeChange(value) { handleConfigTypeChange(value) {
// // department id selectDeptIds el-select
if (value === 'department') { if (value === 'department') {
// const raw = this.personConfigFormData.department
this.personConfigFormData.department = [] if (Array.isArray(raw) && raw.length > 0) {
this.personConfigFormData.selectDeptIds = [] const isFlatIds = !Array.isArray(raw[0])
this.personConfigFormData.person = [] if (isFlatIds) {
this.personOptions = [] const ids = raw.map((id) => (id == null ? '' : String(id)))
} else { this.personConfigFormData.selectDeptIds = ids
// }
this.personConfigFormData.department = '' }
this.personConfigFormData.selectDeptId = ''
this.personConfigFormData.selectDeptName = ''
this.personConfigFormData.selectDeptIds = []
} }
//
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.personConfigForm) { if (this.$refs.personConfigForm) {
this.$refs.personConfigForm.clearValidate() this.$refs.personConfigForm.clearValidate()
@ -1605,26 +1659,7 @@ export default {
// //
handlePersonDepartmentChange(value) { handlePersonDepartmentChange(value) {
if (this.personConfigFormData.configType === 'department') { if (this.personConfigFormData.configType === 'department') {
// value // el-select value id v-model selectDeptIds
// [[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)
//
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.personConfigForm) { if (this.$refs.personConfigForm) {
this.$refs.personConfigForm.validateField('department') this.$refs.personConfigForm.validateField('department')
@ -1794,79 +1829,94 @@ export default {
const path = findNodePath(this.departmentList, deptId) const path = findNodePath(this.departmentList, deptId)
return path ? path.join('-') : '' return path ? path.join('-') : ''
}, },
// idID
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() { handlePersonConfigSubmit() {
this.$refs.personConfigForm.validate((valid) => { this.$refs.personConfigForm.validate((valid) => {
if (valid) { if (valid) {
this.personConfigSubmitting = true this.personConfigSubmitting = true
let userOrDeptId = [] // IDisDept=0
let isDept = 0 let personIds = (this.personConfigFormData.person || []).filter((id) => id)
// IDisDept=1 selectDeptIds department
if (this.personConfigFormData.configType === 'department') { let deptIds = []
// ID if (
isDept = 1 this.personConfigFormData.selectDeptIds &&
// 使 selectDeptIds department this.personConfigFormData.selectDeptIds.length > 0
if ( ) {
this.personConfigFormData.selectDeptIds && deptIds = [...this.personConfigFormData.selectDeptIds]
this.personConfigFormData.selectDeptIds.length > 0 } else if (
) { this.personConfigFormData.department &&
userOrDeptId = this.personConfigFormData.selectDeptIds Array.isArray(this.personConfigFormData.department) &&
} else if ( this.personConfigFormData.department.length > 0
this.personConfigFormData.department && ) {
Array.isArray(this.personConfigFormData.department) && deptIds = this.personConfigFormData.department
this.personConfigFormData.department.length > 0 .map((path) => {
) { if (Array.isArray(path) && path.length > 0) {
// selectDeptIds department return path[path.length - 1]
userOrDeptId = this.personConfigFormData.department }
.map((path) => { return path
if (Array.isArray(path) && path.length > 0) { })
return path[path.length - 1] .filter((id) => id)
}
return path
})
.filter((id) => id)
} else {
userOrDeptId = []
}
if (userOrDeptId.length === 0) {
this.$message.warning('请至少选择一个部门')
this.personConfigSubmitting = false
return
}
} else {
// IDperson 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:')) { if (typeof id === 'string' && id.startsWith('ID:')) {
return id.substring(3) // "ID:" 3 return id.substring(3)
} }
return id return id
}) }
// + { id, isDept }
const processedUserOrDeptIds = [
...personIds.map((id) => ({ userOrDeptId: normalizeId(id), isDept: 0 })),
...deptIds.map((id) => ({ userOrDeptId: normalizeId(id), isDept: 1 }))
]
console.log('人员配置数据:', { console.log('人员配置数据:', {
roleId: this.personConfigFormData.roleId, roleId: this.personConfigFormData.roleId,
roleName: this.personConfigFormData.roleName, roleName: this.personConfigFormData.roleName,
configType: this.personConfigFormData.configType, configType: this.personConfigFormData.configType,
isDept: isDept, userOrDeptIds: processedUserOrDeptIds
userOrDeptIds: processedUserOrDeptId
}) })
const request = { const request = {
...api.GET_ROLE_PERMISSION_BING, ...api.GET_ROLE_PERMISSION_BING,
params: { params: {
roleId: this.personConfigFormData.roleId, roleId: this.personConfigFormData.roleId,
userOrDeptIds: processedUserOrDeptId, userOrDept: processedUserOrDeptIds
isDept: isDept
}, },
disableSuccessMsg: true disableSuccessMsg: true
} }

View File

@ -109,6 +109,16 @@
> >
查看 查看
</a> </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> <span v-if=" (row.distributeStatus === '未分发' || row.distributeStatus === '部分分发') &&hasEngineDataEditPermission()" class="link-separator"></span>
<a <a
v-if=" (row.distributeStatus === '未分发' || row.distributeStatus === '部分分发') && hasEngineDataEditPermission()" v-if=" (row.distributeStatus === '未分发' || row.distributeStatus === '部分分发') && hasEngineDataEditPermission()"
@ -117,6 +127,8 @@
style="margin-left: 5px;" style="margin-left: 5px;"
@click.stop="handleRowDispatch(row, rowIndex)" @click.stop="handleRowDispatch(row, rowIndex)"
> >
分发 分发
</a> </a>
<span class="link-separator" v-if="row.distributeStatus === '未分发' && hasEngineDataEditPermission() && row.versionNumber === 1"></span> <span class="link-separator" v-if="row.distributeStatus === '未分发' && hasEngineDataEditPermission() && row.versionNumber === 1"></span>
@ -352,7 +364,7 @@ export default {
label: '操作', label: '操作',
customSlot: 'options', customSlot: 'options',
align: 'center', align: 'center',
width: '120', width: '160',
fixed: 'right' fixed: 'right'
} }
], ],
@ -771,6 +783,9 @@ export default {
// selfEnginedata.vue ycOrOth "" // selfEnginedata.vue ycOrOth ""
this.$refs.addEngineModelModal.showModal('玉柴') this.$refs.addEngineModelModal.showModal('玉柴')
}, },
handleRowEdit(row) {
this.$refs.addEngineModelModal.showModalForEdit('玉柴', row)
},
handleAddSuccess() { handleAddSuccess() {
// //
this.loadData() this.loadData()

View File

@ -18,6 +18,7 @@ import ApaasCustomApprovalManagement from './custom-page/approvalManagement.vue'
import ApaasCustomTodoList from './custom-page/todo.vue' import ApaasCustomTodoList from './custom-page/todo.vue'
import ApaasCustomMyDone from './custom-page/myDone.vue' import ApaasCustomMyDone from './custom-page/myDone.vue'
import ApaasCustomMySend from './custom-page/mySend.vue' import ApaasCustomMySend from './custom-page/mySend.vue'
import ApaasCustomCheckPersonPermission from './custom-page/checkPersonPermission.vue'
import ApaasCustomPermissionManagement from './custom-page/permissionManagement.vue' import ApaasCustomPermissionManagement from './custom-page/permissionManagement.vue'
import ApaasCustomLayout from './custom-layout/custom-layout.vue' import ApaasCustomLayout from './custom-layout/custom-layout.vue'
import { customFormComponentList } from './custom-component/form-component' 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-otherEngineCheck', ApaasOtherEngineCheck)
Vue.component('apaas-custom-myDone', ApaasCustomMyDone) Vue.component('apaas-custom-myDone', ApaasCustomMyDone)
Vue.component('apaas-custom-mySend', ApaasCustomMySend) Vue.component('apaas-custom-mySend', ApaasCustomMySend)
Vue.component('apaas-custom-checkPersonPermission', ApaasCustomCheckPersonPermission)
Vue.component('apaas-custom-permissionManagement', ApaasCustomPermissionManagement) Vue.component('apaas-custom-permissionManagement', ApaasCustomPermissionManagement)
Vue.component('apaas-custom-layout', ApaasCustomLayout) Vue.component('apaas-custom-layout', ApaasCustomLayout)
// 安装表单部件 // 安装表单部件