diff --git a/src/views/wpm_bx/mlog_form.vue b/src/views/wpm_bx/mlog_form.vue
index b42732a7..4dd0672b 100644
--- a/src/views/wpm_bx/mlog_form.vue
+++ b/src/views/wpm_bx/mlog_form.vue
@@ -119,6 +119,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
new Date().getTime();
},
+ gettestitem(){
+ let that = this;
+ that.$API.qm.testitem.list.req({ process: that.process,type:20 }).then((res) => {
+ res.results.forEach((item) => {
+ let obj = {};
+ Object.assign(obj, item);
+ obj.value = '';
+ that.testitems.push(obj);
+ })
+ });
+ },
//获取
getUser() {
this.$API.system.user.list.req({ depts: this.dept }).then((res) => {
@@ -337,12 +405,26 @@ export default {
},
//表单注入数据
setData(data) {
+ let that = this;
console.log("data", data);
Object.assign(this.form, data);
if(data.test_file!==null){
this.form.test_file = data.test_file;
this.fileList = [{name:data.test_file,url:data.test_file}];
}
+ if(data.oinfo_json!==null){
+ if(that.testitems.length>0){
+ that.testitems.forEach((item) => {
+ item.value = data.oinfo_json[item.id];
+ });
+ }else{
+ setTimeout(() => {
+ that.testitems.forEach((item) => {
+ item.value = data.oinfo_json[item.id];
+ });
+ },500)
+ }
+ }
this.getRoute(data.id);
},
changeMtask(){
@@ -365,6 +447,11 @@ export default {
if (valid) {
that.isSaveing = true;
that.form.mgroup = that.mgroup;
+ let oinfo_json = {};
+ that.testitems.forEach((item) => {
+ oinfo_json[item.id] = item.value;
+ })
+ that.form.oinfo_json = oinfo_json;
if (that.mode === "add") {
that.$API.wpm.mlog.init.req(that.form).then((res) => {
that.isSaveing = false;
diff --git a/src/views/wpm_bx/mlogs.vue b/src/views/wpm_bx/mlogs.vue
index b0395724..d8dca1ab 100644
--- a/src/views/wpm_bx/mlogs.vue
+++ b/src/views/wpm_bx/mlogs.vue
@@ -146,7 +146,7 @@
:process="processId"
:mgroup="mgroupId"
:dept="deptId"
- :mgroup_name = "mgroup_name"
+ :mgroupName = "mgroupName"
@success="handleSaveSuccess"
@closed="dialog.save = false"
>
@@ -155,6 +155,7 @@
v-if="dialog.detail"
ref="detailDialog"
:mlogId="mlogId"
+ :process="processId"
:mtask="mtask"
@closed="detailClose"
>
@@ -197,7 +198,6 @@ export default {
deptId: null,
processId: "",
processCate: "",
- mgroup_name:''
};
},
watch: {
@@ -206,8 +206,7 @@ export default {
let that = this;
that.params.mgroup = "";
that.apiObj = null;
- that.mgroup_name = newval;
- // that.getMgroupInfo();
+ that.getMgroupInfo();
},
},
},
@@ -215,9 +214,7 @@ export default {
let that = this;
that.params.mgroup =that.mgroupId;
that.apiObj = that.$API.wpm.mlog.list;
- // this.mgroup_name = this.mgroupName;
- // this.getMgroupInfo();
- // console.log("mgroupName",this.mgroupName);
+ this.getMgroupInfo();
},
methods: {
getMgroupInfo(){
@@ -227,7 +224,6 @@ export default {
that.$message.error("获取工段错误");
return;
}
- that.mgroupId = res.id;
that.deptId = res.belong_dept;
that.processId = res.process;
that.processCate = res.process_cate;