Commit 2e96f4bc authored by renjintao's avatar renjintao

Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product-rjt

parents f8aed324 c4b7b181
...@@ -110,6 +110,7 @@ export default { ...@@ -110,6 +110,7 @@ export default {
code: 0, code: 0,
status: 0, status: 0,
codeRuleId: this.nodeInfo.codeRuleId, codeRuleId: this.nodeInfo.codeRuleId,
codeRuleType: this.nodeInfo.codeRuleType,
}, },
disabled: false, disabled: false,
codeList: [], codeList: [],
......
...@@ -108,6 +108,7 @@ export default { ...@@ -108,6 +108,7 @@ export default {
upId: 0, upId: 0,
code: 0, code: 0,
codeRuleId: this.nodeInfo.codeRuleId, codeRuleId: this.nodeInfo.codeRuleId,
codeRuleType: this.nodeInfo.codeRuleType,
}, },
arr: [], arr: [],
disabled: false, disabled: false,
......
This diff is collapsed.
...@@ -52,7 +52,8 @@ export default { ...@@ -52,7 +52,8 @@ export default {
upId: this.nodeInfo.id, upId: this.nodeInfo.id,
code: 0, code: 0,
status: 0, status: 0,
codeRuleId:this.nodeInfo.codeRuleId codeRuleId:this.nodeInfo.codeRuleId,
codeRuleType: this.nodeInfo.codeRuleType,
}, },
upName: this.nodeInfo.title, upName: this.nodeInfo.title,
disabled: false, disabled: false,
......
...@@ -51,13 +51,14 @@ export default { ...@@ -51,13 +51,14 @@ export default {
entity: { entity: {
upId: 0, upId: 0,
code: 0, code: 0,
codeRuleId:this.nodeInfo.codeRuleId codeRuleId: this.nodeInfo.codeRuleId,
codeRuleType: this.nodeInfo.codeRuleType,
}, },
upName: this.nodeInfo.title, upName: this.nodeInfo.title,
disabled: false, disabled: false,
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }],
} },
}; };
}, },
props: ["nodeInfo"], props: ["nodeInfo"],
...@@ -69,25 +70,25 @@ export default { ...@@ -69,25 +70,25 @@ export default {
}, },
methods: { methods: {
get() { get() {
Api.get({ id: this.nodeInfo.id }).then(r => { Api.get({ id: this.nodeInfo.id }).then((r) => {
if (r.result) { if (r.result) {
this.entity = r.result; this.entity = r.result;
} }
}); });
}, },
handleSubmit() { handleSubmit() {
this.$refs.form.validate(v => { this.$refs.form.validate((v) => {
if (v) { if (v) {
Api.update({ categoryDto: this.entity, pro: [] }) Api.update({ categoryDto: this.entity, pro: [] })
.then(r => { .then((r) => {
if (r.success) { if (r.success) {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$emit("on-ok",this.entity); this.$emit("on-ok", this.entity);
} else { } else {
this.$Message.error(r.error.message); this.$Message.error(r.error.message);
} }
}) })
.catch(err => { .catch((err) => {
this.disabled = false; this.disabled = false;
this.$Message.error(r.error.message); this.$Message.error(r.error.message);
}); });
...@@ -96,7 +97,7 @@ export default { ...@@ -96,7 +97,7 @@ export default {
}, },
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
} },
} },
}; };
</script> </script>
...@@ -91,14 +91,15 @@ export default { ...@@ -91,14 +91,15 @@ export default {
codeRuleId: this.nodeInfo.codeRuleId, codeRuleId: this.nodeInfo.codeRuleId,
categoryId: this.nodeInfo.categoryId, //左侧树点击的id categoryId: this.nodeInfo.categoryId, //左侧树点击的id
customProperties: {}, customProperties: {},
rootCategoryId: this.nodeInfo.rootCategoryId //左侧树点击的数据的最顶层id rootCategoryId: this.nodeInfo.rootCategoryId, //左侧树点击的数据的最顶层id
codeRuleType: this.nodeInfo.codeRuleType,
}, },
disabled: false, disabled: false,
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }],
}, },
fileds: [] //扩展属性 fileds: [], //扩展属性
}; };
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
...@@ -113,17 +114,17 @@ export default { ...@@ -113,17 +114,17 @@ export default {
{ {
conditionalType: "Equal", conditionalType: "Equal",
fieldName: "categoryId", fieldName: "categoryId",
fieldValue: this.nodeInfo.rootCategoryId fieldValue: this.nodeInfo.rootCategoryId,
} },
]; ];
Api.listTable({ Api.listTable({
conditions: conditions, conditions: conditions,
sortBy: "id", sortBy: "id",
isDesc: false isDesc: false,
}).then(r => { }).then((r) => {
if (r.result) { if (r.result) {
this.fileds = r.result.filter(function(item) { this.fileds = r.result.filter(function (item) {
item.span = 12; item.span = 12;
if (item.dataType > 4) { if (item.dataType > 4) {
item.span = 24; item.span = 24;
...@@ -131,7 +132,7 @@ export default { ...@@ -131,7 +132,7 @@ export default {
delete item["id"]; delete item["id"];
return item.fieldType != 1; return item.fieldType != 1;
}); });
this.fileds.map(u => { this.fileds.map((u) => {
let v = ""; let v = "";
if (u.dataType == 1 || u.dataType == 2) { if (u.dataType == 1 || u.dataType == 2) {
v = 0; v = 0;
...@@ -158,12 +159,12 @@ export default { ...@@ -158,12 +159,12 @@ export default {
}, },
handleSubmit() { handleSubmit() {
this.$refs.form.validate(v => { this.$refs.form.validate((v) => {
if (v) { if (v) {
// let categoryDto = this.entity; // let categoryDto = this.entity;
// let pro = this.checkList.concat(this.arr); // let pro = this.checkList.concat(this.arr);
Api.create(this.entity) Api.create(this.entity)
.then(r => { .then((r) => {
if (r.success) { if (r.success) {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$emit("on-ok"); this.$emit("on-ok");
...@@ -171,7 +172,7 @@ export default { ...@@ -171,7 +172,7 @@ export default {
this.$Message.error(r.error.message); this.$Message.error(r.error.message);
} }
}) })
.catch(err => { .catch((err) => {
this.disabled = false; this.disabled = false;
this.$Message.error(r.error.message); this.$Message.error(r.error.message);
}); });
...@@ -180,7 +181,7 @@ export default { ...@@ -180,7 +181,7 @@ export default {
}, },
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
} },
} },
}; };
</script> </script>
...@@ -89,14 +89,15 @@ export default { ...@@ -89,14 +89,15 @@ export default {
categoryId: this.nodeInfo.categoryId, //左侧树点击的id categoryId: this.nodeInfo.categoryId, //左侧树点击的id
customProperties: {}, customProperties: {},
rootCategoryId: this.nodeInfo.rootCategoryId, //左侧树点击的数据的最顶层id rootCategoryId: this.nodeInfo.rootCategoryId, //左侧树点击的数据的最顶层id
version: null version: null,
codeRuleType: this.nodeInfo.codeRuleType,
}, },
fileds: [], fileds: [],
checkList: [], checkList: [],
disabled: false, disabled: false,
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }],
} },
}; };
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
...@@ -114,16 +115,16 @@ export default { ...@@ -114,16 +115,16 @@ export default {
{ {
conditionalType: "Equal", conditionalType: "Equal",
fieldName: "categoryId", fieldName: "categoryId",
fieldValue: this.nodeInfo.rootCategoryId fieldValue: this.nodeInfo.rootCategoryId,
} },
]; ];
Api.listTable({ Api.listTable({
conditions: conditions, conditions: conditions,
sortBy: "id", sortBy: "id",
isDesc: false isDesc: false,
}).then(r => { }).then((r) => {
if (r.result) { if (r.result) {
this.fileds = r.result.filter(function(item) { this.fileds = r.result.filter(function (item) {
item.span = 12; item.span = 12;
if (item.dataType > 4) { if (item.dataType > 4) {
item.span = 24; item.span = 24;
...@@ -131,7 +132,7 @@ export default { ...@@ -131,7 +132,7 @@ export default {
delete item["id"]; delete item["id"];
return item.fieldType != 1; return item.fieldType != 1;
}); });
this.fileds.map(u => { this.fileds.map((u) => {
let v = ""; let v = "";
if (u.dataType == 1 || u.dataType == 2) { if (u.dataType == 1 || u.dataType == 2) {
v = 0; v = 0;
...@@ -143,7 +144,7 @@ export default { ...@@ -143,7 +144,7 @@ export default {
}); });
}, },
get() { get() {
Api.get({ id: this.eid }).then(r => { Api.get({ id: this.eid }).then((r) => {
if (r.result) { if (r.result) {
this.entity = r.result; this.entity = r.result;
this.entity.version = parseInt(r.result.version); this.entity.version = parseInt(r.result.version);
...@@ -155,23 +156,23 @@ export default { ...@@ -155,23 +156,23 @@ export default {
{ {
conditionalType: "In", conditionalType: "In",
fieldName: "fieldType", fieldName: "fieldType",
fieldValue: "1,2" fieldValue: "1,2",
}, },
{ {
conditionalType: "Equal", conditionalType: "Equal",
fieldName: "categoryId", fieldName: "categoryId",
fieldValue: "0" fieldValue: "0",
} },
]; ];
Api.listTable({ Api.listTable({
conditions: conditions, conditions: conditions,
sortBy: "id", sortBy: "id",
isDesc: false isDesc: false,
}).then(r => { }).then((r) => {
if (r.result) { if (r.result) {
var arr = r.result; var arr = r.result;
this.checkList = arr.filter(function(item) { this.checkList = arr.filter(function (item) {
item.mid = item.id; item.mid = item.id;
delete item["id"]; //删除属性id delete item["id"]; //删除属性id
return item; return item;
...@@ -195,12 +196,12 @@ export default { ...@@ -195,12 +196,12 @@ export default {
}, },
handleSubmit() { handleSubmit() {
this.$refs.form.validate(v => { this.$refs.form.validate((v) => {
if (v) { if (v) {
// let categoryDto = this.entity; // let categoryDto = this.entity;
// let pro = this.checkList.concat(this.arr); // let pro = this.checkList.concat(this.arr);
Api.update(this.entity) Api.update(this.entity)
.then(r => { .then((r) => {
if (r.success) { if (r.success) {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$emit("on-ok"); this.$emit("on-ok");
...@@ -208,7 +209,7 @@ export default { ...@@ -208,7 +209,7 @@ export default {
this.$Message.error(r.error.message); this.$Message.error(r.error.message);
} }
}) })
.catch(err => { .catch((err) => {
this.disabled = false; this.disabled = false;
this.$Message.error(r.error.message); this.$Message.error(r.error.message);
}); });
...@@ -217,7 +218,7 @@ export default { ...@@ -217,7 +218,7 @@ export default {
}, },
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
} },
} },
}; };
</script> </script>
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment