Commit 4ea4556d authored by renjintao's avatar renjintao

编辑 附件

parent 40cb288a
......@@ -157,7 +157,7 @@ export default {
},
parms: {
app: "technology",
eid: this.uid != "" ? this.uid : "",
eid: this.uid,
name: "",
field: ""
}
......@@ -165,7 +165,7 @@ export default {
},
props: {
eid: Number,
uid: String
uid: String,
},
mounted() {
if (this.eid > 0) {
......@@ -176,6 +176,7 @@ export default {
load(v) {
Api.get({ id: v }).then(r => {
this.$refs.refFile.intFilesClone();
this.parms.eid = this.uid;
this.entity = r.result;
});
},
......@@ -183,7 +184,7 @@ export default {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
this.entity.fileId = this.parms.eid;
this.entity.fileId = this.uid;
Api.update(this.entity)
.then(r => {
this.disabled = false;
......@@ -236,6 +237,9 @@ export default {
if (v != 0) {
this.load(v);
}
},
uid(v) {
alert(v);
}
}
};
......
......@@ -6,11 +6,11 @@
.con {
padding: 5px 5px 0px 10px;
}
.con_bord{
.con_bord {
// margin: 15px 32px;
box-shadow: #c7c7c7 1px 2px 7px 3px;
}
background: rgba(245,246,250,1);
background: rgba(245, 246, 250, 1);
}
.fullWindow {
position: fixed;
......@@ -42,31 +42,31 @@
</a>
</div>
<Content class="con" :class="!showMenu?'con_bord':''">
<DataGrid :columns="columns" ref="grid" :action="action" class="card_box">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input
placeholder="请输入工艺名称/工艺编号"
v-width="200"
v-model="easySearch.keys.value"
clearable
/>
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
</FormItem>
</Form>
</template>
<template slot="searchForm">
<Search />
</template>
<template slot="buttons">
<Button type="primary" @click="add">新增</Button>
</template>
</DataGrid>
<DataGrid :columns="columns" ref="grid" :action="action" class="card_box">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input
placeholder="请输入工艺名称/工艺编号"
v-width="200"
v-model="easySearch.keys.value"
clearable
/>
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
</FormItem>
</Form>
</template>
<template slot="searchForm">
<Search />
</template>
<template slot="buttons">
<Button type="primary" @click="add">新增</Button>
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" :uid="uid" @on-close="cancel" @on-ok="ok" />
<component :is="detail" :eid="curId" :uid="uId" @on-close="cancel" @on-ok="ok" />
</Modal>
<div class="fullWindow flex fd" v-if="viewModal">
<div class="top flex">
......@@ -76,7 +76,7 @@
</a>
</div>
<div class="fg tc f14 fwBold blueTitle">
{{l('code')}}:
{{l('code')}}:
<span class="grayTitle mr10">{{titleObj.code}}</span>
{{l('name')}}:
<span class="grayTitle mr10">{{titleObj.name}}</span>
......@@ -85,7 +85,7 @@
{{l('version')}}:
<span class="grayTitle">{{titleObj.version}}</span>
<!-- {{l('departmentId')}}:
<span class="grayTitle">{{titleObj.departmentId}}</span> -->
<span class="grayTitle">{{titleObj.departmentId}}</span>-->
</div>
</div>
<div class="fg">
......@@ -122,7 +122,7 @@ export default {
src: null,
detail: null,
curId: 0,
uid:'',
uId: "",
columns: [
{ key: "id", title: this.$t("id"), hide: true, align: "left" },
{
......@@ -224,7 +224,7 @@ export default {
title: this.l("versionnotes"),
align: "left",
high: true,
hide:true,
hide: true
},
{
key: "phase",
......@@ -368,7 +368,12 @@ export default {
// },
edit(row) {
this.curId = row.id;
this.uId=row.fileId;
if (row.fileId) {
this.uId = row.fileId;
} else {
this.uId=this.$u.guid()//未上传过文件
}
this.title = "编辑";
this.detail = () => import("./edit");
this.modal = true;
......
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