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

克隆弹框

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