AEG项目中所涉及到的开发
@ -0,0 +1,13 @@
|
||||
require.config({
|
||||
paths : {
|
||||
'app' : './VueWidget/js/app.f3689074',
|
||||
'chunk-vendors' : './VueWidget/js/chunk-vendors.2d039da3'
|
||||
}
|
||||
})
|
||||
|
||||
function init(){
|
||||
require(['app','chunk-vendors'], function(){
|
||||
})
|
||||
console.log(9999);
|
||||
|
||||
}
|
@ -0,0 +1 @@
|
||||
.el-table .warning-row{background:oldlace}.el-table .success-row{background:#f0f9eb}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50;margin-top:60px}
|
After Width: | Height: | Size: 4.2 KiB |
@ -0,0 +1,47 @@
|
||||
<!doctype html>
|
||||
<html lang="">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<link rel="stylesheet" type="text/css" href="./css/app.d743e96b.css">
|
||||
<link rel="stylesheet" type="text/css" href="./css/chunk-vendors.eedde3e4.css">
|
||||
<title>widget-vue</title>
|
||||
|
||||
</head>
|
||||
<script src="./Main.js"></script>
|
||||
<script>
|
||||
function widgetLoading(){
|
||||
console.log(123);
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
widgetLoading();
|
||||
</script>
|
||||
|
||||
<body>
|
||||
<div class="scroll-container">
|
||||
<div id="app" style="width: 50px; height: 500px; background-color: lightblue;"></div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<style>
|
||||
body, html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
overflow: hidden; /* 防止body滚动 */
|
||||
}
|
||||
|
||||
.scroll-container {
|
||||
width: 100%; /* 或你想要的固定宽度 */
|
||||
height: 1500px; /* 设定一个固定高度 */
|
||||
overflow-y: auto; /* 允许Y轴滚动 */
|
||||
border: 1px solid #ccc; /* 可选,仅为了视觉上区分 */
|
||||
}
|
||||
|
||||
</style>
|
@ -0,0 +1,541 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
var t = {
|
||||
68332: function (t, e, l) {
|
||||
var n = l(66848),
|
||||
a = function () {
|
||||
var t = this,
|
||||
e = t.$createElement,
|
||||
l = t._self._c || e;
|
||||
return l("div", {
|
||||
attrs: {
|
||||
id: "app"
|
||||
}
|
||||
}, [l("HelloWorld"), l("TestElementUi"), l("TestTdesignUi")], 1)
|
||||
},
|
||||
o = [],
|
||||
s = function () {
|
||||
var t = this,
|
||||
e = t.$createElement,
|
||||
l = t._self._c || e;
|
||||
return l("section", [l("b-field", {
|
||||
attrs: {
|
||||
grouped: "",
|
||||
"group-multiline": ""
|
||||
}
|
||||
}, [l("div", {
|
||||
staticClass: "control"
|
||||
}, [l("b-switch", {
|
||||
model: {
|
||||
value: t.isBordered,
|
||||
callback: function (e) {
|
||||
t.isBordered = e
|
||||
},
|
||||
expression: "isBordered"
|
||||
}
|
||||
}, [t._v("Bordered")])], 1), l("div", {
|
||||
staticClass: "control"
|
||||
}, [l("b-switch", {
|
||||
model: {
|
||||
value: t.isStriped,
|
||||
callback: function (e) {
|
||||
t.isStriped = e
|
||||
},
|
||||
expression: "isStriped"
|
||||
}
|
||||
}, [t._v("Striped")])], 1), l("div", {
|
||||
staticClass: "control"
|
||||
}, [l("b-switch", {
|
||||
model: {
|
||||
value: t.isNarrowed,
|
||||
callback: function (e) {
|
||||
t.isNarrowed = e
|
||||
},
|
||||
expression: "isNarrowed"
|
||||
}
|
||||
}, [t._v("Narrowed")])], 1), l("div", {
|
||||
staticClass: "control"
|
||||
}, [l("b-switch", {
|
||||
model: {
|
||||
value: t.isHoverable,
|
||||
callback: function (e) {
|
||||
t.isHoverable = e
|
||||
},
|
||||
expression: "isHoverable"
|
||||
}
|
||||
}, [t._v("Hoverable")])], 1), l("div", {
|
||||
staticClass: "control"
|
||||
}, [l("b-switch", {
|
||||
model: {
|
||||
value: t.isFocusable,
|
||||
callback: function (e) {
|
||||
t.isFocusable = e
|
||||
},
|
||||
expression: "isFocusable"
|
||||
}
|
||||
}, [t._v("Focusable")])], 1), l("div", {
|
||||
staticClass: "control"
|
||||
}, [l("b-switch", {
|
||||
model: {
|
||||
value: t.isLoading,
|
||||
callback: function (e) {
|
||||
t.isLoading = e
|
||||
},
|
||||
expression: "isLoading"
|
||||
}
|
||||
}, [t._v("Loading state")])], 1), l("div", {
|
||||
staticClass: "control"
|
||||
}, [l("b-switch", {
|
||||
model: {
|
||||
value: t.isEmpty,
|
||||
callback: function (e) {
|
||||
t.isEmpty = e
|
||||
},
|
||||
expression: "isEmpty"
|
||||
}
|
||||
}, [t._v("Empty")])], 1), l("div", {
|
||||
staticClass: "control"
|
||||
}, [l("b-switch", {
|
||||
model: {
|
||||
value: t.hasMobileCards,
|
||||
callback: function (e) {
|
||||
t.hasMobileCards = e
|
||||
},
|
||||
expression: "hasMobileCards"
|
||||
}
|
||||
}, [t._v("Mobile cards "), l("small", [t._v("(collapsed rows)")])])], 1)]), l("b-table", {
|
||||
attrs: {
|
||||
data: t.isEmpty ? [] : t.data,
|
||||
bordered: t.isBordered,
|
||||
striped: t.isStriped,
|
||||
narrowed: t.isNarrowed,
|
||||
hoverable: t.isHoverable,
|
||||
loading: t.isLoading,
|
||||
focusable: t.isFocusable,
|
||||
"mobile-cards": t.hasMobileCards
|
||||
},
|
||||
scopedSlots: t._u([{
|
||||
key: "empty",
|
||||
fn: function () {
|
||||
return [l("div", {
|
||||
staticClass: "has-text-centered"
|
||||
}, [t._v("No records")])]
|
||||
},
|
||||
proxy: !0
|
||||
}])
|
||||
}, [l("b-table-column", {
|
||||
attrs: {
|
||||
field: "id",
|
||||
label: "ID",
|
||||
width: "40",
|
||||
"td-attrs": t.columnTdAttrs,
|
||||
numeric: ""
|
||||
},
|
||||
scopedSlots: t._u([{
|
||||
key: "default",
|
||||
fn: function (e) {
|
||||
return [t._v(" " + t._s(e.row.id) + " ")]
|
||||
}
|
||||
}])
|
||||
}), l("b-table-column", {
|
||||
attrs: {
|
||||
field: "name",
|
||||
label: "name",
|
||||
"td-attrs": t.columnTdAttrs
|
||||
},
|
||||
scopedSlots: t._u([{
|
||||
key: "default",
|
||||
fn: function (e) {
|
||||
return [t._v(" " + t._s(e.row.name) + " ")]
|
||||
}
|
||||
}])
|
||||
}), l("b-table-column", {
|
||||
attrs: {
|
||||
field: "type",
|
||||
label: "type",
|
||||
"td-attrs": t.columnTdAttrs
|
||||
},
|
||||
scopedSlots: t._u([{
|
||||
key: "default",
|
||||
fn: function (e) {
|
||||
return [t._v(" " + t._s(e.row.type) + " ")]
|
||||
}
|
||||
}])
|
||||
})], 1)], 1)
|
||||
},
|
||||
r = [],
|
||||
i = (l(44114), {
|
||||
data() {
|
||||
const t = [];
|
||||
return {
|
||||
data: t,
|
||||
isEmpty: !1,
|
||||
isBordered: !1,
|
||||
isStriped: !1,
|
||||
isNarrowed: !1,
|
||||
isHoverable: !1,
|
||||
isFocusable: !1,
|
||||
isLoading: !1,
|
||||
hasMobileCards: !0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.axios.get("https://r2023x.mydomain.com/3dspace/FindChangeActions/getChangeInfo").then((t => {
|
||||
let e = t.data.data,
|
||||
l = e.split("\n"),
|
||||
n = [];
|
||||
for (let a = 0; a < l.length; a++) {
|
||||
const t = l[a],
|
||||
e = t.split("|"),
|
||||
o = {};
|
||||
o.id = e[4], o.name = e[5], o.type = e[3], n.push(o)
|
||||
}
|
||||
this.data = n
|
||||
}))
|
||||
},
|
||||
methods: {
|
||||
dateThAttrs(t) {
|
||||
return "Date" === t.label ? {
|
||||
title: 'This title is sponsored by "th-attrs" prop',
|
||||
class: "has-text-success"
|
||||
} : null
|
||||
},
|
||||
columnTdAttrs(t, e) {
|
||||
return "Total" === t.id ? "ID" === e.label ? {
|
||||
colspan: 4,
|
||||
class: "has-text-weight-bold",
|
||||
style: {
|
||||
"text-align": "left !important"
|
||||
}
|
||||
} : "Gender" === e.label ? {
|
||||
class: "has-text-weight-semibold"
|
||||
} : {
|
||||
style: {
|
||||
display: "none"
|
||||
}
|
||||
} : null
|
||||
}
|
||||
}
|
||||
}),
|
||||
c = i,
|
||||
d = l(81656),
|
||||
u = (0, d.A)(c, s, r, !1, null, null, null),
|
||||
p = u.exports,
|
||||
f = function () {
|
||||
var t = this,
|
||||
e = t.$createElement,
|
||||
l = t._self._c || e;
|
||||
return l("el-table", {
|
||||
staticStyle: {
|
||||
width: "100%"
|
||||
},
|
||||
attrs: {
|
||||
data: t.tableData,
|
||||
"row-class-name": t.tableRowClassName
|
||||
}
|
||||
}, [l("el-table-column", {
|
||||
attrs: {
|
||||
prop: "id",
|
||||
label: "ID",
|
||||
width: "180"
|
||||
}
|
||||
}), l("el-table-column", {
|
||||
attrs: {
|
||||
prop: "name",
|
||||
label: "姓名",
|
||||
width: "180"
|
||||
}
|
||||
}), l("el-table-column", {
|
||||
attrs: {
|
||||
prop: "type",
|
||||
label: "类型"
|
||||
}
|
||||
})], 1)
|
||||
},
|
||||
b = [],
|
||||
m = {
|
||||
methods: {
|
||||
tableRowClassName({
|
||||
row: t,
|
||||
rowIndex: e
|
||||
}) {
|
||||
return 1 === e ? (console.log(t), "warning-row") : 3 === e ? (console.log(t), "success-row") : ""
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.axios.get("https://r2023x.mydomain.com/3dspace/FindChangeActions/getChangeInfo").then((t => {
|
||||
let e = t.data.data,
|
||||
l = e.split("\n"),
|
||||
n = [];
|
||||
for (let a = 0; a < l.length; a++) {
|
||||
const t = l[a],
|
||||
e = t.split("|"),
|
||||
o = {};
|
||||
o.id = e[4], o.name = e[5], o.type = e[3], n.push(o)
|
||||
}
|
||||
this.tableData = n
|
||||
}))
|
||||
}
|
||||
},
|
||||
h = m,
|
||||
v = (0, d.A)(h, f, b, !1, null, null, null),
|
||||
y = v.exports,
|
||||
w = function () {
|
||||
var t = this,
|
||||
e = t.$createElement,
|
||||
l = t._self._c || e;
|
||||
return l("t-table", {
|
||||
attrs: {
|
||||
data: t.data,
|
||||
columns: t.columns,
|
||||
rowKey: "property",
|
||||
lazyLoad: ""
|
||||
},
|
||||
scopedSlots: t._u([{
|
||||
key: "title-slot-name",
|
||||
fn: function () {
|
||||
return [l("user-circle-icon"), t._v(" 类型 ")]
|
||||
},
|
||||
proxy: !0
|
||||
}])
|
||||
})
|
||||
},
|
||||
g = [],
|
||||
_ = l(8601),
|
||||
x = l(98981),
|
||||
C = l(87203),
|
||||
T = l(80185);
|
||||
const k = [];
|
||||
for (let U = 0; U < 5; U++) k.push({
|
||||
index: U + 1,
|
||||
applicant: ["贾明", "张三", "王芳"][U % 3],
|
||||
status: U % 3,
|
||||
channel: ["电子签署", "纸质签署", "纸质签署"][U % 3],
|
||||
detail: {
|
||||
email: ["w.cezkdudy@lhll.au", "r.nmgw@peurezgn.sl", "p.cumx@rampblpa.ru"][U % 3]
|
||||
},
|
||||
matters: ["宣传物料制作费用", "algolia 服务报销", "相关周边制作费", "激励奖品快递费"][U % 4],
|
||||
time: [2, 3, 1, 4][U % 4],
|
||||
createTime: ["2022-01-01", "2022-02-01", "2022-03-01", "2022-04-01", "2022-05-01"][U % 4]
|
||||
});
|
||||
const A = [{
|
||||
colKey: "applicant",
|
||||
title: "title-slot-name",
|
||||
width: 120
|
||||
}, {
|
||||
colKey: "matters",
|
||||
title: (t, {
|
||||
colIndex: e
|
||||
}) => t("b", {
|
||||
style: "font-wight: bold"
|
||||
}, [
|
||||
["", "申请事项"][e]
|
||||
])
|
||||
}, {
|
||||
colKey: "status",
|
||||
title: "审批状态",
|
||||
width: 120,
|
||||
cell: (t, {
|
||||
row: e
|
||||
}) => {
|
||||
const l = {
|
||||
0: {
|
||||
label: "审批通过",
|
||||
theme: "success",
|
||||
icon: t(_.A)
|
||||
},
|
||||
1: {
|
||||
label: "审批失败",
|
||||
theme: "danger",
|
||||
icon: t(x.A)
|
||||
},
|
||||
2: {
|
||||
label: "审批过期",
|
||||
theme: "warning",
|
||||
icon: t(C.A)
|
||||
}
|
||||
};
|
||||
return t("t-tag", {
|
||||
attrs: {
|
||||
shape: "round",
|
||||
theme: l[e.status].theme,
|
||||
variant: "light-outline"
|
||||
}
|
||||
}, [l[e.status].icon, l[e.status].label])
|
||||
}
|
||||
}, {
|
||||
title: "邮箱地址",
|
||||
colKey: "detail.email",
|
||||
width: 200
|
||||
}, {
|
||||
colKey: "createTime",
|
||||
render(t, e) {
|
||||
const {
|
||||
type: l,
|
||||
row: n,
|
||||
col: a
|
||||
} = e;
|
||||
return {
|
||||
title: "申请时间",
|
||||
cell: n && n[a.colKey]
|
||||
} [l]
|
||||
}
|
||||
}];
|
||||
var S = {
|
||||
components: {
|
||||
UserCircleIcon: T.A
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
data: k,
|
||||
columns: A
|
||||
}
|
||||
}
|
||||
},
|
||||
O = S,
|
||||
E = (0, d.A)(O, w, g, !1, null, null, null),
|
||||
F = E.exports,
|
||||
M = {
|
||||
name: "App",
|
||||
components: {
|
||||
HelloWorld: p,
|
||||
TestElementUi: y,
|
||||
TestTdesignUi: F
|
||||
}
|
||||
},
|
||||
N = M,
|
||||
j = (0, d.A)(N, a, o, !1, null, null, null),
|
||||
H = j.exports,
|
||||
I = l(6079),
|
||||
D = (l(18830), l(89143)),
|
||||
K = l.n(D),
|
||||
L = l(60523),
|
||||
B = (l(91457), l(94373));
|
||||
n["default"].use(L.Ay), n["default"].use(K()), n["default"].use(I.Ay), n["default"].config.productionTip = !1, n["default"].prototype.axios = B.A, new n["default"]({
|
||||
render: t => t(H)
|
||||
}).$mount("#app")
|
||||
}
|
||||
},
|
||||
e = {};
|
||||
|
||||
function l(n) {
|
||||
var a = e[n];
|
||||
if (void 0 !== a) return a.exports;
|
||||
var o = e[n] = {
|
||||
id: n,
|
||||
loaded: !1,
|
||||
exports: {}
|
||||
};
|
||||
return t[n].call(o.exports, o, o.exports, l), o.loaded = !0, o.exports
|
||||
}
|
||||
l.m = t,
|
||||
function () {
|
||||
l.amdO = {}
|
||||
}(),
|
||||
function () {
|
||||
var t = [];
|
||||
l.O = function (e, n, a, o) {
|
||||
if (!n) {
|
||||
var s = 1 / 0;
|
||||
for (d = 0; d < t.length; d++) {
|
||||
n = t[d][0], a = t[d][1], o = t[d][2];
|
||||
for (var r = !0, i = 0; i < n.length; i++)(!1 & o || s >= o) && Object.keys(l.O).every((function (t) {
|
||||
return l.O[t](n[i])
|
||||
})) ? n.splice(i--, 1) : (r = !1, o < s && (s = o));
|
||||
if (r) {
|
||||
t.splice(d--, 1);
|
||||
var c = a();
|
||||
void 0 !== c && (e = c)
|
||||
}
|
||||
}
|
||||
return e
|
||||
}
|
||||
o = o || 0;
|
||||
for (var d = t.length; d > 0 && t[d - 1][2] > o; d--) t[d] = t[d - 1];
|
||||
t[d] = [n, a, o]
|
||||
}
|
||||
}(),
|
||||
function () {
|
||||
l.n = function (t) {
|
||||
var e = t && t.__esModule ? function () {
|
||||
return t["default"]
|
||||
} : function () {
|
||||
return t
|
||||
};
|
||||
return l.d(e, {
|
||||
a: e
|
||||
}), e
|
||||
}
|
||||
}(),
|
||||
function () {
|
||||
l.d = function (t, e) {
|
||||
for (var n in e) l.o(e, n) && !l.o(t, n) && Object.defineProperty(t, n, {
|
||||
enumerable: !0,
|
||||
get: e[n]
|
||||
})
|
||||
}
|
||||
}(),
|
||||
function () {
|
||||
l.g = function () {
|
||||
if ("object" === typeof globalThis) return globalThis;
|
||||
try {
|
||||
return this || new Function("return this")()
|
||||
} catch (t) {
|
||||
if ("object" === typeof window) return window
|
||||
}
|
||||
}()
|
||||
}(),
|
||||
function () {
|
||||
l.o = function (t, e) {
|
||||
return Object.prototype.hasOwnProperty.call(t, e)
|
||||
}
|
||||
}(),
|
||||
function () {
|
||||
l.r = function (t) {
|
||||
"undefined" !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
|
||||
value: "Module"
|
||||
}), Object.defineProperty(t, "__esModule", {
|
||||
value: !0
|
||||
})
|
||||
}
|
||||
}(),
|
||||
function () {
|
||||
l.nmd = function (t) {
|
||||
return t.paths = [], t.children || (t.children = []), t
|
||||
}
|
||||
}(),
|
||||
function () {
|
||||
var t = {
|
||||
524: 0
|
||||
};
|
||||
l.O.j = function (e) {
|
||||
return 0 === t[e]
|
||||
};
|
||||
var e = function (e, n) {
|
||||
var a, o, s = n[0],
|
||||
r = n[1],
|
||||
i = n[2],
|
||||
c = 0;
|
||||
if (s.some((function (e) {
|
||||
return 0 !== t[e]
|
||||
}))) {
|
||||
for (a in r) l.o(r, a) && (l.m[a] = r[a]);
|
||||
if (i) var d = i(l)
|
||||
}
|
||||
for (e && e(n); c < s.length; c++) o = s[c], l.o(t, o) && t[o] && t[o][0](), t[o] = 0;
|
||||
return l.O(d)
|
||||
},
|
||||
n = self["webpackChunkwidget_vue"] = self["webpackChunkwidget_vue"] || [];
|
||||
n.forEach(e.bind(null, 0)), n.push = e.bind(null, n.push.bind(n))
|
||||
}();
|
||||
var n = l.O(void 0, [504], (function () {
|
||||
return l(68332)
|
||||
}));
|
||||
n = l.O(n)
|
||||
})();
|
||||
//# sourceMappingURL=app.f3689074.js.map
|
@ -0,0 +1,144 @@
|
||||
/* enoECMChangeReportUX
|
||||
*
|
||||
** Copyright (c) 1993-2020 Dassault Systemes. All Rights Reserved.
|
||||
** This program contains proprietary and trade secret information of
|
||||
** Dassault Systemes.
|
||||
** Copyright notice is precautionary only and does not evidence any actual
|
||||
** or intended publication of such program
|
||||
*
|
||||
*/
|
||||
|
||||
import com.dassault_systemes.enovia.changeorder.factory.ChangeOrderFactory;
|
||||
import com.dassault_systemes.enovia.changeorder.interfaces.IChangeOrderServices;
|
||||
import com.dassault_systemes.enovia.changerequest.factory.ChangeRequestFactory;
|
||||
import com.dassault_systemes.enovia.changerequest.interfaces.IChangeRequest;
|
||||
import com.dassault_systemes.enovia.changerequest.interfaces.IChangeRequestServices;
|
||||
import com.matrixone.apps.domain.DomainObject;
|
||||
import com.matrixone.apps.domain.util.*;
|
||||
import com.matrixone.apps.framework.ui.UINavigatorUtil;
|
||||
import com.matrixone.apps.framework.ui.UIUtil;
|
||||
import matrix.db.BusinessObjectWithSelect;
|
||||
import matrix.db.Context;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class enoECMChangeReportUX_mxJPO extends enoECMChangeReportUXBase_mxJPO {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param context the eMatrix <code>Context</code> object.
|
||||
* @param args holds no arguments.
|
||||
* @throws Exception if the operation fails.
|
||||
* @since ECM R421.HF4
|
||||
*/
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(enoECMChangeReportUXBase_mxJPO.class.getName());
|
||||
|
||||
public enoECMChangeReportUX_mxJPO (Context context, String[] args) throws Exception {
|
||||
super(context, args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get change actions of Change Request for Summary Report
|
||||
*
|
||||
* @param context the eMatrix <code>Context</code> object.
|
||||
* @param args holds objectId.
|
||||
* @return String.
|
||||
* @throws Exception If the operation fails.
|
||||
*/
|
||||
public String getChangeActionsOfChangeRequest(Context context, String[] args) throws Exception {
|
||||
StringBuffer sbChangeActions = new StringBuffer();
|
||||
try {
|
||||
String strLanguage = context.getSession().getLanguage();
|
||||
String strChangeRequestId = args[0];
|
||||
|
||||
DomainObject domChange = DomainObject.newInstance(context, strChangeRequestId);
|
||||
|
||||
IChangeOrderServices changeOrderFactory = ChangeOrderFactory.createChangeOrderFactory();
|
||||
|
||||
IChangeRequestServices changeRequestFactory = ChangeRequestFactory.createChangeRequestFactory();
|
||||
IChangeRequest iChangeRequest = changeRequestFactory.retrieveChangeRequestFromDatabase(context, domChange);
|
||||
|
||||
Set<String> caPhysicalIdSet = iChangeRequest.getIndirectImplementingChangeActionIdentifiers(context);
|
||||
List<String> caIdList = iChangeRequest.getImplementingChangeActionIdentifiers(context);
|
||||
|
||||
LOGGER.info("caPhysicalIdSet == >" + caPhysicalIdSet);
|
||||
LOGGER.info("caIdList == >" + caIdList);
|
||||
|
||||
List<String> lsChangeActionId = new ArrayList<>();
|
||||
|
||||
if(!caIdList.isEmpty()){
|
||||
for (String caId : caIdList){
|
||||
lsChangeActionId.add(caId);
|
||||
}
|
||||
}
|
||||
|
||||
if(!caPhysicalIdSet.isEmpty()){
|
||||
for(String caPhysicalId : caPhysicalIdSet){
|
||||
String getCaId = "temp query bus * * * where 'physicalId == " + caPhysicalId + "' select id dump | ";
|
||||
String caIdInfo = MqlUtil.mqlCommand(context, getCaId);
|
||||
String caId = caIdInfo.split("\\|")[3];
|
||||
|
||||
if(lsChangeActionId.isEmpty() || !lsChangeActionId.contains(caId)){
|
||||
lsChangeActionId.add(caId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LOGGER.info("lsChangeActionId == >" + lsChangeActionId);
|
||||
|
||||
List<IChangeOrderServices.ChangeIdCardENUM> changeIdCardSelectables = new ArrayList<IChangeOrderServices.ChangeIdCardENUM>();
|
||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.NAMESELECTABLE);
|
||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.TYPESELECTABLE);
|
||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.POLICYSELECTABLE);
|
||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.OWNERSELECTABLE);
|
||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.CURRENTSELECTABLE);
|
||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.CATITLESELECTABLE);
|
||||
|
||||
Map<String, BusinessObjectWithSelect> mpChangeInfo = changeOrderFactory.getChangeIdCard(context, lsChangeActionId, changeIdCardSelectables);
|
||||
|
||||
sbChangeActions.append("<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" >");
|
||||
sbChangeActions.append("<tr>");
|
||||
sbChangeActions.append("<th>" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Label.NAME") + "</th>");
|
||||
sbChangeActions.append("<th>" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Label.Title") + "</th>");
|
||||
sbChangeActions.append("<th>" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Label.OWNER") + "</th>");
|
||||
sbChangeActions.append("<th>" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Common.State") + "</th>");
|
||||
sbChangeActions.append("</tr>");
|
||||
|
||||
Set<String> setMpChangeKeys = mpChangeInfo.keySet();
|
||||
for(String key : setMpChangeKeys) {
|
||||
BusinessObjectWithSelect busSelectData = (BusinessObjectWithSelect) mpChangeInfo.get(key);
|
||||
String strType = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.TYPESELECTABLE.toString());
|
||||
String strName = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.NAMESELECTABLE.toString());
|
||||
String strPolicy = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.POLICYSELECTABLE.toString());
|
||||
String strCurrent = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.CURRENTSELECTABLE.toString());
|
||||
String strTitle = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.CATITLESELECTABLE.toString());
|
||||
String strOwner= busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.OWNERSELECTABLE.toString());
|
||||
String strOwnerFullName = PersonUtil.getFullName(context, strOwner);
|
||||
|
||||
String imgChangeActionType = UINavigatorUtil.getTypeIconProperty(context, strType);
|
||||
if (UIUtil.isNullOrEmpty(imgChangeActionType)) {
|
||||
imgChangeActionType = "iconSmallDefault.gif";
|
||||
}
|
||||
|
||||
sbChangeActions.append("<tr>");
|
||||
sbChangeActions.append("<td><img src=\"../common/images/" + imgChangeActionType + "\" border=\"0\" alt=\"*\"> " + XSSUtil.encodeForHTML(context, strName) + " </td>");
|
||||
sbChangeActions.append("<td>" + XSSUtil.encodeForHTML(context, strTitle) + " </td>");
|
||||
sbChangeActions.append("<td>" + XSSUtil.encodeForHTML(context, strOwnerFullName) + " </td>");
|
||||
sbChangeActions.append("<td>" + i18nNow.getStateI18NString(strPolicy, strCurrent, strLanguage) + " </td>");
|
||||
sbChangeActions.append("</tr>");
|
||||
}
|
||||
if (lsChangeActionId.size() == 0) {
|
||||
sbChangeActions.append("<tr><td colspan=\"5\">" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Change.NoChangeActionConnected") + "</td></tr>");
|
||||
}
|
||||
} catch (FrameworkException Ex) {
|
||||
throw Ex;
|
||||
}
|
||||
sbChangeActions.append("</table>");
|
||||
return sbChangeActions.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,147 @@
|
||||
/* enoECMChangeReportUX
|
||||
*
|
||||
** Copyright (c) 1993-2020 Dassault Systemes. All Rights Reserved.
|
||||
** This program contains proprietary and trade secret information of
|
||||
** Dassault Systemes.
|
||||
** Copyright notice is precautionary only and does not evidence any actual
|
||||
** or intended publication of such program
|
||||
*
|
||||
*/
|
||||
|
||||
import com.dassault_systemes.enovia.changeorder.factory.ChangeOrderFactory;
|
||||
import com.dassault_systemes.enovia.changeorder.interfaces.IChangeOrderServices;
|
||||
import com.dassault_systemes.enovia.changerequest.factory.ChangeRequestFactory;
|
||||
import com.dassault_systemes.enovia.changerequest.interfaces.IChangeRequest;
|
||||
import com.dassault_systemes.enovia.changerequest.interfaces.IChangeRequestServices;
|
||||
import com.matrixone.apps.domain.DomainObject;
|
||||
import com.matrixone.apps.domain.util.*;
|
||||
import com.matrixone.apps.framework.ui.UINavigatorUtil;
|
||||
import com.matrixone.apps.framework.ui.UIUtil;
|
||||
import matrix.db.BusinessObjectWithSelect;
|
||||
import matrix.db.Context;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class enoECMChangeReportUX_mxJPO extends enoECMChangeReportUXBase_mxJPO {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param context the eMatrix <code>Context</code> object.
|
||||
* @param args holds no arguments.
|
||||
* @throws Exception if the operation fails.
|
||||
* @since ECM R421.HF4
|
||||
*/
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(enoECMChangeReportUXBase_mxJPO.class.getName());
|
||||
|
||||
public enoECMChangeReportUX_mxJPO (Context context, String[] args) throws Exception {
|
||||
super(context, args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get change actions of Change Request for Summary Report
|
||||
*
|
||||
* @param context the eMatrix <code>Context</code> object.
|
||||
* @param args holds objectId.
|
||||
* @return String.
|
||||
* @throws Exception If the operation fails.
|
||||
*/
|
||||
public String getChangeActionsOfChangeRequest(Context context, String[] args) throws Exception {
|
||||
StringBuffer sbChangeActions = new StringBuffer();
|
||||
try {
|
||||
String strLanguage = context.getSession().getLanguage();
|
||||
String strChangeRequestId = args[0];
|
||||
|
||||
DomainObject domChange = DomainObject.newInstance(context, strChangeRequestId);
|
||||
|
||||
IChangeOrderServices changeOrderFactory = ChangeOrderFactory.createChangeOrderFactory();
|
||||
|
||||
IChangeRequestServices changeRequestFactory = ChangeRequestFactory.createChangeRequestFactory();
|
||||
IChangeRequest iChangeRequest = changeRequestFactory.retrieveChangeRequestFromDatabase(context, domChange);
|
||||
|
||||
//获取已实现的更改和建议的更改的信息
|
||||
Set<String> caPhysicalIdSet = iChangeRequest.getIndirectImplementingChangeActionIdentifiers(context);
|
||||
List<String> caIdList = iChangeRequest.getImplementingChangeActionIdentifiers(context);
|
||||
|
||||
LOGGER.info("caPhysicalIdSet == >" + caPhysicalIdSet);
|
||||
LOGGER.info("caIdList == >" + caIdList);
|
||||
|
||||
List<String> lsChangeActionId = new ArrayList<>();
|
||||
|
||||
//先查询建议的更改 放入到集合中
|
||||
if(!caIdList.isEmpty()){
|
||||
for (String caId : caIdList){
|
||||
lsChangeActionId.add(caId);
|
||||
}
|
||||
}
|
||||
|
||||
//再查询已实现的更改 放入到集合中
|
||||
if(!caPhysicalIdSet.isEmpty()){
|
||||
for(String caPhysicalId : caPhysicalIdSet){
|
||||
String getCaId = "temp query bus * * * where 'physicalId == " + caPhysicalId + "' select id dump | ";
|
||||
String caIdInfo = MqlUtil.mqlCommand(context, getCaId);
|
||||
String caId = caIdInfo.split("\\|")[3];
|
||||
|
||||
if(lsChangeActionId.isEmpty() || !lsChangeActionId.contains(caId)){
|
||||
lsChangeActionId.add(caId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LOGGER.info("lsChangeActionId == >" + lsChangeActionId);
|
||||
|
||||
List<IChangeOrderServices.ChangeIdCardENUM> changeIdCardSelectables = new ArrayList<IChangeOrderServices.ChangeIdCardENUM>();
|
||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.NAMESELECTABLE);
|
||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.TYPESELECTABLE);
|
||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.POLICYSELECTABLE);
|
||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.OWNERSELECTABLE);
|
||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.CURRENTSELECTABLE);
|
||||
changeIdCardSelectables.add(IChangeOrderServices.ChangeIdCardENUM.CATITLESELECTABLE);
|
||||
|
||||
Map<String, BusinessObjectWithSelect> mpChangeInfo = changeOrderFactory.getChangeIdCard(context, lsChangeActionId, changeIdCardSelectables);
|
||||
|
||||
sbChangeActions.append("<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" >");
|
||||
sbChangeActions.append("<tr>");
|
||||
sbChangeActions.append("<th>" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Label.NAME") + "</th>");
|
||||
sbChangeActions.append("<th>" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Label.Title") + "</th>");
|
||||
sbChangeActions.append("<th>" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Label.OWNER") + "</th>");
|
||||
sbChangeActions.append("<th>" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Common.State") + "</th>");
|
||||
sbChangeActions.append("</tr>");
|
||||
|
||||
Set<String> setMpChangeKeys = mpChangeInfo.keySet();
|
||||
for(String key : setMpChangeKeys) {
|
||||
BusinessObjectWithSelect busSelectData = (BusinessObjectWithSelect) mpChangeInfo.get(key);
|
||||
String strType = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.TYPESELECTABLE.toString());
|
||||
String strName = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.NAMESELECTABLE.toString());
|
||||
String strPolicy = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.POLICYSELECTABLE.toString());
|
||||
String strCurrent = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.CURRENTSELECTABLE.toString());
|
||||
String strTitle = busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.CATITLESELECTABLE.toString());
|
||||
String strOwner= busSelectData.getSelectData(IChangeOrderServices.ChangeIdCardENUM.OWNERSELECTABLE.toString());
|
||||
String strOwnerFullName = PersonUtil.getFullName(context, strOwner);
|
||||
|
||||
String imgChangeActionType = UINavigatorUtil.getTypeIconProperty(context, strType);
|
||||
if (UIUtil.isNullOrEmpty(imgChangeActionType)) {
|
||||
imgChangeActionType = "iconSmallDefault.gif";
|
||||
}
|
||||
|
||||
sbChangeActions.append("<tr>");
|
||||
sbChangeActions.append("<td><img src=\"../common/images/" + imgChangeActionType + "\" border=\"0\" alt=\"*\"> " + XSSUtil.encodeForHTML(context, strName) + " </td>");
|
||||
sbChangeActions.append("<td>" + XSSUtil.encodeForHTML(context, strTitle) + " </td>");
|
||||
sbChangeActions.append("<td>" + XSSUtil.encodeForHTML(context, strOwnerFullName) + " </td>");
|
||||
sbChangeActions.append("<td>" + i18nNow.getStateI18NString(strPolicy, strCurrent, strLanguage) + " </td>");
|
||||
sbChangeActions.append("</tr>");
|
||||
}
|
||||
if (lsChangeActionId.size() == 0) {
|
||||
sbChangeActions.append("<tr><td colspan=\"5\">" + EnoviaResourceBundle.getProperty(context, "emxEnterpriseChangeMgtStringResource", context.getLocale(), "EnterpriseChangeMgt.Change.NoChangeActionConnected") + "</td></tr>");
|
||||
}
|
||||
} catch (FrameworkException Ex) {
|
||||
throw Ex;
|
||||
}
|
||||
sbChangeActions.append("</table>");
|
||||
return sbChangeActions.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
/* enoECMChangeReportUX
|
||||
*
|
||||
** Copyright (c) 1993-2020 Dassault Systemes. All Rights Reserved.
|
||||
** This program contains proprietary and trade secret information of
|
||||
** Dassault Systemes.
|
||||
** Copyright notice is precautionary only and does not evidence any actual
|
||||
** or intended publication of such program
|
||||
*
|
||||
*/
|
||||
|
||||
import matrix.db.Context;
|
||||
|
||||
public class enoECMChangeReportUX_mxJPO extends enoECMChangeReportUXBase_mxJPO {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param context the eMatrix <code>Context</code> object.
|
||||
* @param args holds no arguments.
|
||||
* @throws Exception if the operation fails.
|
||||
* @since ECM R421.HF4
|
||||
*/
|
||||
|
||||
public enoECMChangeReportUX_mxJPO (Context context, String[] args) throws Exception {
|
||||
super(context, args);
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
add bus "eService Trigger Program Parameters" "AEGIntegrateMail" "-"
|
||||
description "AEGIntegrateMail"
|
||||
policy "Business Rule"
|
||||
"eService Program Argument 1" "${FROMOBJECTID}"
|
||||
"eService Program Argument 2" "${RELID}"
|
||||
vault "eService Administration"
|
||||
"eService Program Name" "AegPublicAccountMailIntegrate"
|
||||
"eService Sequence Number" 1
|
||||
"eService Method Name" "sendMail"
|
||||
current Active;
|
||||
|
||||
modify relationship 'Project Task' add trigger Create Action emxTriggerManager input 'RelationshipProjectTaskCreateAction AEGIntegrateMail';
|
||||
|
||||
|
||||
add bus "eService Trigger Program Parameters" "ModifyApprovalPersonTrigger" "-"
|
||||
description "ModifyApprovalPersonTrigger"
|
||||
policy "Business Rule"
|
||||
"eService Program Argument 1" "${TOOBJECTID}"
|
||||
"eService Program Argument 2" "${FROMOBJECTID}"
|
||||
vault "eService Administration"
|
||||
"eService Program Name" "AegPublicAccountMailIntegrate"
|
||||
"eService Sequence Number" 1
|
||||
"eService Method Name" "updateApprovalInfo"
|
||||
current Active;
|
||||
|
||||
modify relationship 'Object Route' add trigger Create Action emxTriggerManager input 'RelationshipObjectRouteCreateAction ModifyApprovalPersonTrigger';
|
After Width: | Height: | Size: 473 KiB |
@ -0,0 +1,333 @@
|
||||
define('DS/UpdateModalValue/UpdateModalValue', [
|
||||
'UWA/Core',
|
||||
'DS/ApplicationFrame/Command',
|
||||
'DS/ENOXEngineerCommonUtils/XENModal',
|
||||
'DS/ENOXEngineerCommonUtils/xEngAlertManager',
|
||||
'DS/EngineeringItemCmd/SetPartNumberCmd/setPartNumberListView',
|
||||
'DS/ENOXEngineerCommonUtils/XENPlatform3DXSettings',
|
||||
'DS/ENOXEngineerCommonUtils/PromiseUtils',
|
||||
'DS/ENOXEngineerCommonUtils/XENCommandsAppContextProxy',
|
||||
'DS/ENOXEngineerCommonUtils/XENWebInWinHelper',
|
||||
'i18n!DS/EngineeringItemCmd/assets/nls/ExposedCmdsNls.json',
|
||||
'css!DS/UpdateModalValue/layui/css/layui.css',
|
||||
'DS/UpdateModalValue/layui/layui.all',
|
||||
'text!DS/UpdateModalValue/index.html',
|
||||
'DS/UpdateModalValue/layui/xmSelect'
|
||||
], function (
|
||||
UWA,
|
||||
AFRCommand,
|
||||
XEngineerModal,
|
||||
xEngAlertManager,
|
||||
PartNumberListView,
|
||||
XENPlatform3DXSettings,
|
||||
PromiseUtils,
|
||||
XENCommandsAppContextProxy,
|
||||
XENWebInWinHelper,
|
||||
nlsKeys,
|
||||
LayUI,
|
||||
laycss,
|
||||
testHTML,
|
||||
xmSelect
|
||||
) {
|
||||
'use strict';
|
||||
|
||||
//todo
|
||||
var SetPartNumber = AFRCommand.extend({
|
||||
_setPartNumberListView: null,
|
||||
items: [],
|
||||
modal: null,
|
||||
transactionParameters: null,
|
||||
sTenentID: "OnPremise",
|
||||
securityContext: null,
|
||||
myBaseAppURL: null,
|
||||
init: function (options) {
|
||||
options = UWA.extend(options, {
|
||||
isAsynchronous: false
|
||||
});
|
||||
this._parent(options);
|
||||
|
||||
// IR-749796-3DEXPERIENCER2021x
|
||||
// The initialization is to early to get the app Security context to correct it
|
||||
// the initialization has been deplaced in isUserGranted call and the that.enable() is now check with isUserGranted
|
||||
// XENCommandsAppContextProxy.loadCommandsSetting();
|
||||
this._initCommandPrereqs();
|
||||
},
|
||||
|
||||
//人员验证
|
||||
isUserGranted: function () {
|
||||
var that = this;
|
||||
if (this.grantingPromise)
|
||||
return this.grantingPromise;
|
||||
this.grantingPromise = PromiseUtils.wrappedWithCancellablePromise(function (resolve, reject) {
|
||||
XENCommandsAppContextProxy.loadCommandsSetting()
|
||||
.then(function (settings) {
|
||||
if (settings && settings.isGrantedEnterpriseExtension) {
|
||||
resolve(true);
|
||||
} else {
|
||||
if (XENPlatform3DXSettings.isCatiaV6Environment()) { //Setting added for IR-788376-3DEXPERIENCER2020x
|
||||
resolve(true);
|
||||
} else {
|
||||
reject('user is not granted');
|
||||
}
|
||||
}
|
||||
}).catch(function (reason) {
|
||||
if (XENPlatform3DXSettings.isCatiaV6Environment()) { //Setting added for IR-788376-3DEXPERIENCER2020x
|
||||
resolve(true);
|
||||
} else {
|
||||
console.error(reason);
|
||||
reject('some failure');
|
||||
}
|
||||
});
|
||||
});
|
||||
return this.grantingPromise;
|
||||
},
|
||||
|
||||
//todo 返回的值为 VPLMProjectLeader.Company Name.Common Space //该方法用处还需进一步验证
|
||||
getProvidedSC: function () {
|
||||
if (!this.options.context || !this.options.context.getSecurityContext)
|
||||
return null;
|
||||
|
||||
var _sc = this.options.context.getSecurityContext() || {};
|
||||
var value = _sc.SecurityContext;
|
||||
if (_sc.SecurityContext) {
|
||||
if (value.startsWith('ctx::'))
|
||||
value = value.substring(5);
|
||||
XENPlatform3DXSettings.setDefaultSecurityContext(value);
|
||||
}
|
||||
|
||||
if (_sc.tenant) {
|
||||
XENPlatform3DXSettings.setPlatformId(_sc.tenant);
|
||||
}
|
||||
return value;
|
||||
},
|
||||
|
||||
// 页面加载时触发
|
||||
execute: function () {
|
||||
var that = this;
|
||||
XENCommandsAppContextProxy.getAppContextPromise(this).then(function (context) {
|
||||
var ModalPhysicalId = "";
|
||||
//获取数据值
|
||||
that.items = that.options.context.getSelectedNodes().map(function (item) {
|
||||
console.log(item);
|
||||
//modalValue = item.options.grid['ds6w:identifier'];
|
||||
ModalPhysicalId = item.getID();
|
||||
console.log("==========>");
|
||||
console.log(ModalPhysicalId);
|
||||
return {
|
||||
physicalId: item.getID(),
|
||||
name: item.getLabel(),
|
||||
sessionStoredEIN: (item.getSessionStoredEIN && item.getSessionStoredEIN()) ? item.getSessionStoredEIN() : undefined,
|
||||
partNumber: item.options.grid['ds6wg:EnterpriseExtension.V_PartNumber']
|
||||
};
|
||||
});
|
||||
if (XENPlatform3DXSettings.isBuildSecurityContext() && XENPlatform3DXSettings.isCloud()) {
|
||||
var _platform = {};
|
||||
var strTenentId = that.sTenentID;
|
||||
var sURL = that.myBaseAppURL;
|
||||
_platform[strTenentId] = {
|
||||
"3DSpace": sURL
|
||||
}
|
||||
XENPlatform3DXSettings._platforms = _platform;
|
||||
XENPlatform3DXSettings.setDefaultSecurityContext(that.securityContext.replace("ctx : ", ""));
|
||||
|
||||
that._setPartNumberListView = new PartNumberListView();
|
||||
that._setPartNumberListView.render();
|
||||
that.showDialog(ModalPhysicalId);
|
||||
} else {
|
||||
var needSC = (!that.getProvidedSC());
|
||||
XENPlatform3DXSettings.bindCommandsToABackend(needSC /* need to retrieve SC */).then(function () {
|
||||
that.isUserGranted().then(function () {
|
||||
that._setPartNumberListView = new PartNumberListView();
|
||||
that._setPartNumberListView.render();
|
||||
//todo
|
||||
|
||||
that.showDialog(ModalPhysicalId);
|
||||
}).catch(function (reason) {
|
||||
xEngAlertManager.errorNotif({
|
||||
title: nlsKeys.get("error.not.granted"),
|
||||
subtitle: nlsKeys.get("error.contact.admin"),
|
||||
});
|
||||
that.progressDialog.close();
|
||||
});
|
||||
}).catch(function (error) {
|
||||
console.error(error);
|
||||
//notify the user
|
||||
xEngAlertManager.unexpectedFailure(nlsKeys.get('failure.setPartNumber.cmd.launch'));
|
||||
that.progressDialog.close();
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 向页面写具体body页面
|
||||
showDialog: function (ModalPhysicalId) {
|
||||
let httpBaseUrl = "/3dspace/ModalInfo/";
|
||||
|
||||
layui.use(['form', 'jquery'], function () {
|
||||
var form = layui.form;
|
||||
var $ = layui.jquery;
|
||||
let layer = layui.layer;
|
||||
|
||||
//判断当前模型是否是在工作中的状态
|
||||
$.get({
|
||||
url: httpBaseUrl + "GetModalState?PhysicalId=" + ModalPhysicalId,
|
||||
crossDomain: true,
|
||||
contentType: "application/json",
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
let modalCurrentState = res.data;
|
||||
console.log(modalCurrentState);
|
||||
if ("IN_WORK" == modalCurrentState) {
|
||||
//公司代码数据
|
||||
var companyCodeValue = "";
|
||||
|
||||
//物料组数据
|
||||
var AEGVPMDataValue = "";
|
||||
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: ["物料组修改", "font-size : 16px; font-weight: bold; color: #fff; background-color: #005685"],
|
||||
area: ["700px", "350px"],
|
||||
content: testHTML,
|
||||
success: function () {
|
||||
var companyCodeSelect = xmSelect.render({
|
||||
el: '#demo1',
|
||||
filterable: true,
|
||||
radio: true,
|
||||
clickClose: true,
|
||||
data: [],
|
||||
toolbar: { show: true },
|
||||
on: function (data) {
|
||||
var arr = data.arr;
|
||||
if (arr.length > 0) {
|
||||
companyCodeValue = arr[0].value;
|
||||
console.log(companyCodeValue);
|
||||
GetMaterialGroupData(materialGroupSelect, companyCodeValue)
|
||||
}
|
||||
}
|
||||
})
|
||||
GetCompanyCodeData("GetCompanyCode", companyCodeSelect);
|
||||
|
||||
var materialGroupSelect = xmSelect.render({
|
||||
el: '#demo2',
|
||||
filterable: true,
|
||||
radio: true,
|
||||
clickClose: true,
|
||||
toolbar: { show: true },
|
||||
on: function (data) {
|
||||
var arr = data.arr;
|
||||
console.log(arr);
|
||||
if (arr.length > 0) {
|
||||
AEGVPMDataValue = arr[0].material;
|
||||
console.log("0000000000");
|
||||
console.log(AEGVPMDataValue);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
function GetCompanyCodeData(url, companyCodeSelect) {
|
||||
$.get({
|
||||
url: httpBaseUrl + url,
|
||||
crossDomain: true,
|
||||
contentType: "application/json",
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
console.log(res.data);
|
||||
let companyCode = JSON.parse(res.data);
|
||||
companyCodeSelect.update({ data: companyCode });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function GetMaterialGroupData(materialGroupSelect, value) {
|
||||
$.get({
|
||||
url: httpBaseUrl + "GetMaterialGroup",
|
||||
crossDomain: true,
|
||||
contentType: "application/json",
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
let AEGVPMDataValue = JSON.parse(res.data);
|
||||
|
||||
let Array = [];
|
||||
|
||||
$.each(AEGVPMDataValue, function (index, item) {
|
||||
let valueJson = {};
|
||||
|
||||
if (item.value.includes(value)) {
|
||||
valueJson.name = item.name,
|
||||
valueJson.value = item.value,
|
||||
valueJson.material = item.material,
|
||||
Array.push(valueJson);
|
||||
}
|
||||
})
|
||||
|
||||
// console.log(Array);
|
||||
|
||||
materialGroupSelect.update({ data: Array });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// form.on('select(companyCode)', function (data) {
|
||||
// let companyCodeBySelect = data.value; //获取选中的省份索引
|
||||
|
||||
// console.log("00000");
|
||||
// console.log(companyCodeBySelect);
|
||||
|
||||
// //清空城市选择器
|
||||
// $('#MateriaGroup').empty();
|
||||
|
||||
// console.log("123123");
|
||||
|
||||
// console.log(AEGVPMData);
|
||||
|
||||
|
||||
// for (let index = 0; index < AEGVPMData.length; index++) {
|
||||
// console.log("234566");
|
||||
// console.log(AEGVPMData[index].code);
|
||||
// console.log(companyCodeBySelect);
|
||||
// if(AEGVPMData[index].code == companyCodeBySelect){
|
||||
// $('#MateriaGroup').append('<option value = "' + AEGVPMData[index].material + '">' + AEGVPMData[index].materialZH + '</option>')
|
||||
// }
|
||||
// }
|
||||
|
||||
// form.render('select');
|
||||
// });
|
||||
|
||||
$('#myButton').on('click', function (data) {
|
||||
console.log(data);
|
||||
|
||||
// var selectedCompanyCode = $('#demo1').val();
|
||||
// var selectedMateriaGroup = $('#demo2').val();
|
||||
// console.log(ModalPhysicalId);
|
||||
// console.log(selectedMateriaGroup);
|
||||
// console.log(selectedCompanyCode);
|
||||
|
||||
if (AEGVPMDataValue != "" && AEGVPMDataValue != null) {
|
||||
$.post({
|
||||
url: httpBaseUrl + "UpdateModalInfo/" + ModalPhysicalId + "/" + companyCodeValue + "/" + AEGVPMDataValue,
|
||||
crossDomain: true,
|
||||
contentType: "application/json",
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
layer.closeAll();
|
||||
}
|
||||
}).done(function () {
|
||||
layer.msg('修改成功');
|
||||
})
|
||||
} else {
|
||||
layer.msg('物料组不能为空')
|
||||
}
|
||||
});
|
||||
} else {
|
||||
layer.msg('当前模型已发布,不可更改,请联系管理员');
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
return SetPartNumber;
|
||||
});
|
@ -0,0 +1,2 @@
|
||||
/** layui-v2.2.5 MIT License By https://www.layui.com */
|
||||
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}
|
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 701 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 231 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 9.6 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 7.9 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 777 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.0 KiB |