Commit e5364661 authored by 康振飞's avatar 康振飞

Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product

parents 213df326 229526fb
......@@ -1187,7 +1187,7 @@ export default {
isDeleted: '是否删除',
platesnum: '板数',
isEffect: '生效',
versionnotes: '版本',
versionnotes: '版本说明',
phase: '阶段',
versionid: '版本ID',
isSendPpm: '发送PPM',
......
......@@ -274,6 +274,8 @@ export default {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
this.$refs.grid.load();
this.$refs.grid.footerToolbar = false;
} else {
this.$Message.error("保存失败");
}
......
......@@ -178,7 +178,8 @@ export default {
versionnotes: "",
phase: null,
versionid: null,
isSendPpm: 1
isSendPpm: 1,
fileId: ""
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
......@@ -210,20 +211,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,'')
// }
console.log(this.entity)
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,
name: "",
field: ""
}
};
},
props: {
eid: Number
eid: Number,
uid: String,
},
mounted() {
if (this.eid > 0) {
......@@ -168,6 +175,8 @@ export default {
methods: {
load(v) {
Api.get({ id: v }).then(r => {
this.$refs.refFile.intFilesClone();
this.parms.eid = this.uid;
this.entity = r.result;
});
},
......@@ -175,6 +184,7 @@ export default {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
this.entity.fileId = this.uid;
Api.update(this.entity)
.then(r => {
this.disabled = false;
......@@ -227,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" :title="title" @on-close="cancel" @on-ok="ok" />
<component :is="detail" :eid="curId" :uid="uId" :title="title" @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,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,14 @@ export default {
// this.detail = () => import("./detail");
// this.modal = true;
// },
edit(id) {
this.curId = id;
edit(row) {
this.curId = row.id;
if (row.fileId) {
this.uId = row.fileId;
} else {
this.uId=this.$u.guid()//未上传过文件
}
this.title = "编辑";
this.detail = () => import("./edit");
this.modal = true;
......
<style lang="less">
.test_layout {
height: 50%;
height: 100%;
.bg1{
background:#fefefe ;
}
.fg {
background-color: rgba(234,45,198, 1);
overflow: auto;
}
}
......@@ -20,20 +19,15 @@
<div>
<Menu mode="horizontal" active-name="1">
<div class="layout-assistant">
<MenuItem name="1">Option 1</MenuItem>
<MenuItem name="1" to="/test/user">人员选择</MenuItem>
<MenuItem name="2">Option 2</MenuItem>
<MenuItem name="3">Option 3</MenuItem>
</div>
</Menu>
</div>
<div class="fg">
<h4 v-for="i in 200">
{{i}}内容部分
</h4>
</div>
<div>
这是一个问题
</div>
<nuxt-child></nuxt-child>
</div>
</div>
</template>
<script>
......
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