Commit 49df4b2a authored by renjintao's avatar renjintao

technology

parent d8fd10d0
......@@ -1187,7 +1187,7 @@ export default {
isDeleted: '是否删除',
platesnum: '板数',
isEffect: '生效',
versionnotes: '版本',
versionnotes: '版本说明',
phase: '阶段',
versionid: '版本ID',
isSendPpm: '发送PPM',
......
......@@ -175,7 +175,8 @@ export default {
versionnotes: "",
phase: null,
versionid: null,
isSendPpm: 1
isSendPpm: 1,
fileId: ""
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
......@@ -202,19 +203,11 @@ export default {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
// this.entity.qualityTemplateName = ''
// this.entity.qualityTemplate=''
// if (this.$refs.refFile.nameList.length > 0) {
// let nameList=this.$refs.refFile.nameList
// let names=[]
// let url=[]
// nameList.forEach(e => {
// names.push(e.fileName)
// url.push(e.filePath)
// });
// this.entity.qualityTemplateName = JSON.stringify(names).replace('[','').replace(']','').replace(/\"/g,'')//附件本地库暂存文件名称
// this.entity.qualityTemplate=JSON.stringify(url).replace('[','').replace(']','').replace(/\"/g,'')
// }
if (this.$refs.refFile.nameList.length > 0) {
this.entity.fileId = this.parms.eid;
} else {
this.entity.fileId = "";
}
Api.create(this.entity)
.then(r => {
this.disabled = false;
......
......@@ -129,7 +129,7 @@
<Col :span="24">
<FormItem label="多媒体附件" prop="files">
<files />
<files ref="refFile" :parms="parms" files />
</FormItem>
</Col>
</Row>
......@@ -154,11 +154,18 @@ export default {
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
},
parms: {
app: "technology",
eid: this.uid != "" ? this.uid : "",
name: "",
field: ""
}
};
},
props: {
eid: Number
eid: Number,
uid: String
},
mounted() {
if (this.eid > 0) {
......@@ -168,6 +175,7 @@ export default {
methods: {
load(v) {
Api.get({ id: v }).then(r => {
this.$refs.refFile.intFilesClone();
this.entity = r.result;
});
},
......@@ -175,6 +183,7 @@ export default {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
this.entity.fileId = this.parms.eid;
Api.update(this.entity)
.then(r => {
this.disabled = false;
......
......@@ -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" :uid="uid" @on-close="cancel" @on-ok="ok" />
</Modal>
<div class="fullWindow flex fd" v-if="viewModal">
<div class="top flex">
......@@ -122,6 +122,7 @@ export default {
src: null,
detail: null,
curId: 0,
uid:'',
columns: [
{ key: "id", title: this.$t("id"), hide: true, align: "left" },
{
......@@ -222,7 +223,8 @@ export default {
key: "versionnotes",
title: this.l("versionnotes"),
align: "left",
high: true
high: true,
hide:true,
},
{
key: "phase",
......@@ -266,7 +268,7 @@ export default {
"op",
{
attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row.id) }
on: { click: () => this.edit(params.row) }
},
"编辑"
),
......@@ -364,8 +366,9 @@ export default {
// this.detail = () => import("./detail");
// this.modal = true;
// },
edit(id) {
this.curId = id;
edit(row) {
this.curId = row.id;
this.uId=row.fileId;
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