Commit cbb2a00e authored by 仇晓婷's avatar 仇晓婷

上传

parent 67d7e6b7
...@@ -311,14 +311,19 @@ export default { ...@@ -311,14 +311,19 @@ export default {
computed: {}, computed: {},
watch: { watch: {
// value(v) { // value(v) {
// this.nameList = [] // this.nameList = [];
// this.nameList = v // this.nameList = v;
// } // }
}, },
mounted() { mounted() {
this.formatL(); this.formatL();
this.mutipleStatu(); this.mutipleStatu();
// this.intFiles() this.intFiles();
if (this.Photos === true) {
this.Photo = false;
} else {
this.Photo = true;
}
} }
}; };
</script> </script>
......
...@@ -111,7 +111,7 @@ export default { ...@@ -111,7 +111,7 @@ export default {
} }
}, },
mounted() { mounted() {
alert(this.parents.parentId); // alert(this.parents.parentId);
if (this.eid > 0) { if (this.eid > 0) {
this.load(this.eid); this.load(this.eid);
} }
......
<template> <template>
<Form ref="form" :model="entity" :rules="rules" :label-width="120"> <Layout>
<Row> <Sider width="300">
<Col :span="12"> <div class="add-list">
<FormItem :label="l('mmcode')" prop="mmcode"> <img :src="img" width="100%" height="100%" />
<Input v-model="entity.mmcode"></Input> </div>
</FormItem> </Sider>
</Col> <Content>
<Col :span="12"> <Form ref="form" :model="entity" :rules="rules" :label-width="120">
<FormItem :label="l('drawingNo')" prop="drawingNo"> <Row>
<Input v-model="entity.drawingNo"></Input> <Col :span="12">
</FormItem> <FormItem label="上级所属" prop="parentName">
</Col> <!-- <Input v-model="entity.parentName" disabled></Input> -->
<Col :span="12"> <productSelect1 v-model="entity.levelId" @on-change="proChange" />
<FormItem :label="l('name')" prop="name"> </FormItem>
<Input v-model="entity.name"></Input> </Col>
</FormItem> <Col :span="12">
</Col> <FormItem :label="l('productCode')" prop="productCode">
<Input v-model="entity.productCode"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('mmcode')" prop="mmcode">
<Input v-model="entity.mmcode"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('drawingNo')" prop="drawingNo">
<Input v-model="entity.drawingNo"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('name')" prop="name">
<Input v-model="entity.name"></Input>
</FormItem>
</Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('madeCompany')" prop="madeCompany"> <FormItem :label="l('madeCompany')" prop="madeCompany">
<Input v-model="entity.madeCompany"></Input> <Input v-model="entity.madeCompany"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24"> <!-- <Col :span="24">
<FormItem :label="l('productUrl')" prop="productUrl"> <FormItem :label="l('remark')" prop="remark">
<files ref="refFile" :parms="parms" fileFormat :Photos="true" @clickItem="clickData" /> <Input v-model="entity.remark"></Input>
</FormItem>
</Col>-->
<Col :span="24">
<FormItem :label="l('productUrlList')" prop="productUrlList">
<!-- <InputFile v-model="entity.productUrl"></InputFile> -->
<files ref="refFile" :parms="parms" fileFormat :Photos="true" @clickItem="clickData" />
</FormItem>
</Col>
<!-- <Col :span="24">
<FormItem :label="l('productUrlList')" prop="productUrlList">-->
<!-- <Input v-model="entity.productUrlList" type="textarea" :rows="5"></Input> -->
<!-- <filesList v-model="entity.productUrlList"></filesList>
</FormItem>
</Col>-->
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem> </FormItem>
</Col> </Form>
</Row> </Content>
<FormItem> </Layout>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
...@@ -45,6 +77,13 @@ export default { ...@@ -45,6 +77,13 @@ export default {
entity: {}, entity: {},
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }]
},
img: "",
parms: {
app: "technology",
eid: null,
name: "",
field: ""
} }
}; };
}, },
...@@ -57,9 +96,16 @@ export default { ...@@ -57,9 +96,16 @@ export default {
} }
}, },
methods: { methods: {
clickData(data) {
this.img = data;
},
proChange(items, data, roots) {},
load(v) { load(v) {
Api.get({ id: v }).then(r => { Api.get({ id: v }).then(r => {
this.$refs.refFile.intFilesClone();
this.parms.eid = r.result.productUrlList;
this.entity = r.result; this.entity = r.result;
this.img = this.entity.productUrl;
}); });
}, },
handleSubmit() { handleSubmit() {
...@@ -100,4 +146,17 @@ export default { ...@@ -100,4 +146,17 @@ export default {
} }
} }
}; };
</script> </script>
\ No newline at end of file <style lang="less">
.ivu-layout-sider {
background: rgba(255, 255, 255, 1);
margin-right: 10px;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
.add-list {
width: 100%;
height: 300px;
overflow: hidden;
}
}
</style>
\ No newline at end of file
...@@ -128,7 +128,6 @@ export default { ...@@ -128,7 +128,6 @@ export default {
this.title = "新增"; this.title = "新增";
this.detail = () => import("./add"); this.detail = () => import("./add");
this.modal = true; this.modal = true;
this.parents.parentId = this.parent.id; this.parents.parentId = this.parent.id;
this.parents.parentName = this.parent.parentName; this.parents.parentName = this.parent.parentName;
}, },
......
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