Commit 213df326 authored by 康振飞's avatar 康振飞

克隆弹框

parent d5afbeb0
...@@ -17,9 +17,12 @@ ...@@ -17,9 +17,12 @@
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
<FormItem :label="l('code')" prop="code"> <FormItem v-if="title=='新增'" :label="l('code')" prop="code">
<Input v-model="entity.code"></Input> <Input v-model="entity.code"></Input>
</FormItem> </FormItem>
<FormItem v-else-if="title=='克隆'" :label="l('code')" prop="code">
<Input disabled v-model="entity.code"></Input>
</FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
<FormItem :label="l('routingType')" prop="routingType"> <FormItem :label="l('routingType')" prop="routingType">
...@@ -191,11 +194,16 @@ export default { ...@@ -191,11 +194,16 @@ export default {
}, },
props: { props: {
v: Object, v: Object,
eid: Number eid: Number,
title: String
}, },
mounted() { mounted() {
this.parms.eid = this.$u.guid(); this.parms.eid = this.$u.guid();
this.$refs.refFile.intFiles(); this.$refs.refFile.intFiles();
console.log(this.title)
if (this.eid > 0) {
this.load(this.eid);
}
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
...@@ -215,6 +223,7 @@ export default { ...@@ -215,6 +223,7 @@ export default {
// this.entity.qualityTemplateName = JSON.stringify(names).replace('[','').replace(']','').replace(/\"/g,'')//附件本地库暂存文件名称 // this.entity.qualityTemplateName = JSON.stringify(names).replace('[','').replace(']','').replace(/\"/g,'')//附件本地库暂存文件名称
// this.entity.qualityTemplate=JSON.stringify(url).replace('[','').replace(']','').replace(/\"/g,'') // this.entity.qualityTemplate=JSON.stringify(url).replace('[','').replace(']','').replace(/\"/g,'')
// } // }
console.log(this.entity)
Api.create(this.entity) Api.create(this.entity)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
...@@ -258,8 +267,9 @@ export default { ...@@ -258,8 +267,9 @@ export default {
} }
}, },
load(v) { load(v) {
Api.get({ id: v }).then(r => { Api.get({ id: v }).then(r => { //Number parseInt
this.entity = r.result; this.entity = r.result;
this.entity.isEffect = parseInt(r.result.isEffect);
this.entity.id = 0; this.entity.id = 0;
}); });
}, },
...@@ -273,10 +283,10 @@ export default { ...@@ -273,10 +283,10 @@ export default {
this.entity = this.$u.clone(this.v); this.entity = this.$u.clone(this.v);
}, },
eid(v) { eid(v) {
if (v > 0) { if (v != 0) {
this.load(v); this.load(v);
} }
} },
} }
}; };
</script> </script>
\ No newline at end of file
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide> <Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" :title="title" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
<div class="fullWindow flex fd" v-if="viewModal"> <div class="fullWindow flex fd" v-if="viewModal">
<div class="top flex"> <div class="top flex">
...@@ -249,7 +249,7 @@ export default { ...@@ -249,7 +249,7 @@ export default {
{ {
title: "操作", title: "操作",
key: "action", key: "action",
width: 140, width: 150,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", { class: "action" }, [
...@@ -261,7 +261,7 @@ export default { ...@@ -261,7 +261,7 @@ export default {
}, },
"查看" "查看"
), ),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'), h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h( h(
"op", "op",
{ {
......
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