Commit 19ead9e3 authored by renjintao's avatar renjintao

tech

parent 7a9b0d11
...@@ -550,6 +550,7 @@ export default { ...@@ -550,6 +550,7 @@ export default {
position: relative; position: relative;
height: 100%; height: 100%;
.table-tools { .table-tools {
padding-top: 5px;
height: 50px; height: 50px;
overflow: hidden; overflow: hidden;
.table-search { .table-search {
......
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
<FormItem :label="l('departmentId')" prop="departmentId"> <FormItem :label="l('departmentId')" prop="departmentId">
<departmentSelect v-model="entity.departmentId"></departmentSelect> <departmentSelect v-model="entity.departmentId"></departmentSelect>
</FormItem> </FormItem>
</Col> <Col :span="5"> </Col>
<Col :span="5">
<FormItem :label="l('isMain')" prop="isMain"> <FormItem :label="l('isMain')" prop="isMain">
<Dictionary code="Process.state" v-model="entity.isMain" type="radio"></Dictionary> <Dictionary code="Process.state" v-model="entity.isMain" type="radio"></Dictionary>
</FormItem> </FormItem>
...@@ -61,7 +62,7 @@ ...@@ -61,7 +62,7 @@
<Dictionary code="Process.Status" v-model="entity.isEffect" type="radio"></Dictionary> <Dictionary code="Process.Status" v-model="entity.isEffect" type="radio"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<!-- <!--
<Col :span="12"> <Col :span="12">
<FormItem :label="l('upId')" prop="upId"> <FormItem :label="l('upId')" prop="upId">
<InputNumber v-model="entity.upId"></InputNumber> <InputNumber v-model="entity.upId"></InputNumber>
...@@ -121,23 +122,16 @@ ...@@ -121,23 +122,16 @@
</FormItem> </FormItem>
</Col>--> </Col>-->
<Col :span="24"> <Col :span="24">
<FormItem :label="l('remark')" prop="remark"> <FormItem :label="l('remark')" prop="remark">
<i-quill <i-quill v-model="entity.remark" :height="300" border v-paste="handleImg" />
v-model="entity.remark"
:height="300"
border
v-paste="handleImg"
/>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24"> <Col :span="24">
<FormItem label="多媒体附件" prop="files"> <FormItem label="多媒体附件" prop="files">
<files ref="refFile" :parms="parms" files />
<files />
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<FormItem> <FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button> <Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
...@@ -147,10 +141,10 @@ ...@@ -147,10 +141,10 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import iQuill from '@/components/quill' import iQuill from "@/components/quill";
export default { export default {
name: "Add", name: "Add",
components: { components: {
iQuill iQuill
// VueUeditorWrap // VueUeditorWrap
}, },
...@@ -186,6 +180,12 @@ export default { ...@@ -186,6 +180,12 @@ export default {
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }], name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }] code: [{ required: true, message: "必填", trigger: "blur" }]
},
parms: {
app: "technology",
eid: null,
name: "",
field: ""
} }
}; };
}, },
...@@ -194,15 +194,27 @@ export default { ...@@ -194,15 +194,27 @@ export default {
eid: Number eid: Number
}, },
mounted() { mounted() {
if (this.eid > 0) { this.parms.eid = this.$u.guid();
this.load(this.eid); this.$refs.refFile.intFiles();
}
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
if (v) { if (v) {
this.disabled = true; 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,'')
// }
Api.create(this.entity) Api.create(this.entity)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
...@@ -224,23 +236,23 @@ export default { ...@@ -224,23 +236,23 @@ export default {
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
}, },
handleImg(e) { handleImg(e) {
console.warn(e) console.warn(e);
let file = null let file = null;
if ( if (
e.clipboardData && e.clipboardData &&
e.clipboardData.items[0] && e.clipboardData.items[0] &&
e.clipboardData.items[0].type && e.clipboardData.items[0].type &&
e.clipboardData.items[0].type.indexOf('image') > -1 e.clipboardData.items[0].type.indexOf("image") > -1
) { ) {
//这里就是判断是否有粘贴进来的文件且文件为图片格式 //这里就是判断是否有粘贴进来的文件且文件为图片格式
file = e.clipboardData.items[0].getAsFile() file = e.clipboardData.items[0].getAsFile();
let reader = new FileReader() let reader = new FileReader();
reader.readAsDataURL(file) reader.readAsDataURL(file);
setTimeout(() => { setTimeout(() => {
var img = '<img src="' + reader.result + '" alt=""/>' var img = '<img src="' + reader.result + '" alt=""/>';
this.entity.remark += img this.entity.remark += img;
}, 1000) }, 1000);
// new R // new R
} }
......
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