服装智能制造软件平台V3.0 http://182.92.169.222/hhxy/#/user/login
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

89 lines
2.0 KiB

<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<!-- <zy-process-modular-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-process-modular-form>-->
<ZyProcess ref="realForm"
@onChangeRowKey="chuancan"
@ok="submitCallback"
:disabled="disableSubmit"></ZyProcess>
</j-modal>
</template>
<script>
import ZyProcessModularForm from './ZyProcessModularForm'
import ZyProcess from "@views/zyProcessModular/modules/ZyProcessList";
import {postAction} from "@api/manage";
export default {
name: 'ZyProcessModularModal',
components: {
ZyProcess,
ZyProcessModularForm
},
data () {
return {
model:{
modularId: '',
processId: '',
},
title:'',
width:800,
visible: false,
disableSubmit: false,
url: {
add: "/zyProcessModular/zyProcessModular/add",
},
}
},
methods: {
add1 (modularId1) {
this.model.modularId = modularId1;
//console.log("modal modularId1: "+ modularId1);
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add1(modularId1);
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
chuancan(res) {
this.model.processId = res;
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
// this.$refs.realForm.submitForm();
postAction(this.url.add, this.model).then((res) => {
if (res.success) {
this.$message.success(res.message);
} else {
this.$message.warning(res.message);
}
this.$emit('valueChange', 1)
this.close()
})
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>