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

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

parents 761050ce 4c6d66f4
<template> <template>
<div class="flex fd tree-menu"> <div class="flex fd tree-menu">
<h3 class="stitle pl10"> <h3>
产品结构 产品结构
<div class="fr mr10 mt10"> <div class="fr mr10 mt10">
<ButtonGroup class="fr" size="small"> <ButtonGroup class="fr" size="small">
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
</h3> </h3>
<div class="search"> <div class="search">
<Input search placeholder="关键字" v-model="keys" clearable/> <Input search placeholder="关键字" v-model="keys" clearable />
</div> </div>
<div class="fg"> <div class="fg">
<div class="tree"> <div class="tree">
...@@ -61,48 +61,48 @@ export default { ...@@ -61,48 +61,48 @@ export default {
toggle() { toggle() {
this.expand = !this.expand; this.expand = !this.expand;
}, },
change(v,b) { change(v, b) {
let ids=[]; let ids = [];
ids.push(b.value); ids.push(b.value);
if(b.children){ if (b.children) {
addId(b.children); addId(b.children);
function addId(data){ function addId(data) {
data.map(u=>{ data.map(u => {
ids.push(u.value) ids.push(u.value);
if(u.children){ if (u.children) {
addId(u.children) addId(u.children);
} }
}) });
} }
} }
this.$emit("on-select",b.value,b,ids) this.$emit("on-select", b.value, b, ids);
}, },
hide(){ hide() {
this.$emit("on-hide") this.$emit("on-hide");
} }
}, },
computed: { computed: {
data() { data() {
let items = this.$u.clone(this.list); let items = this.$u.clone(this.list);
let expand = this.expand; let expand = this.expand;
let result=[]; let result = [];
search(this.keys,items) search(this.keys, items);
function search(keys,data){ function search(keys, data) {
data.map(u=>{ data.map(u => {
if(keys.length<3){ if (keys.length < 3) {
u.expand=expand; u.expand = expand;
result.push(u);
} else {
u.expand = expand;
if (u.title.indexOf(keys) > -1) {
result.push(u); result.push(u);
}else{ } else if (u.children) {
u.expand=expand; search(keys, u.children);
if(u.title.indexOf(keys)>-1){
result.push(u);
}else if(u.children){
search(keys,u.children)
}
} }
}) }
} });
return result; }
return result;
} }
} }
}; };
...@@ -110,6 +110,17 @@ export default { ...@@ -110,6 +110,17 @@ export default {
<style lang="less"> <style lang="less">
.tree-menu { .tree-menu {
h3 {
height: 50px;
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: bold;
line-height: 50px;
color: rgba(81, 90, 110, 1);
background:rgba(245,246,250,1);
opacity: 1;
padding-left: 10px;
}
.search { .search {
height: 50px; height: 50px;
padding: 5px 10px; padding: 5px 10px;
......
<template> <template>
<div class="i-quill" :class="classes"> <div class="i-quill" :class="classes" >
<div ref="editor" :style="styles"></div> <div ref="editor" :style="styles"></div>
</div> </div>
</template> </template>
<script> <script>
import Quill from 'quill'; import Quill from "quill";
import 'quill/dist/quill.core.css'; import "quill/dist/quill.core.css";
import 'quill/dist/quill.snow.css'; import "quill/dist/quill.snow.css";
import 'quill/dist/quill.bubble.css'; import "quill/dist/quill.bubble.css";
// import resizeImage from "quill-image-resize-module"; // 图片缩放组件。
export default { // import { ImageDrop } from "quill-image-drop-module"; // 图片拖动组件。
name: 'i-quill', // Quill.register("modules/imageDrop", ImageDrop);
props: { // Quill.register("modules/resizeImage ", resizeImage);
value: { export default {
type: String, name: "i-quill",
default: '' props: {
}, value: {
border: { type: String,
type: Boolean, default: ""
default: false },
}, border: {
height: { type: Boolean,
type: Number default: false
}, },
minHeight: { height: {
type: Number type: Number
} },
}, minHeight: {
data () { type: Number
return { }
Quill: null, },
currentValue: '', data() {
options: { return {
theme: 'snow', Quill: null,
bounds: document.body, currentValue: "",
debug: 'warn', options: {
modules: { theme: "snow",
toolbar: [ bounds: document.body,
['bold', 'italic', 'underline', 'strike'], debug: "warn",
[{ 'header': [1, 2, 3, 4, 5, 6, false] }], modules: {
[{ 'size': ['small', false, 'large', 'huge'] }], // imageDrop: true,
[{ 'color': [] }, { 'background': [] }], // imageResize: {
['blockquote', 'code-block'], // displayStyles: {
[{ 'list': 'ordered' }, { 'list': 'bullet' }], // backgroundColor: "black",
// [{ 'script': 'sub' }, { 'script': 'super' }], // border: "none",
[{ 'indent': '-1' }, { 'indent': '+1' }], // color: "white"
[{ 'align': [] }], // },
[{ 'direction': 'rtl' }], // modules: ["Resize", "DisplaySize", "Toolbar"]
// [{ 'font': [] }], // },
['clean'], toolbar: [
['link', 'image'] ["bold", "italic", "underline", "strike"],
] [{ header: [1, 2, 3, 4, 5, 6, false] }],
}, [{ size: ["small", false, "large", "huge"] }],
placeholder: '内容...', [{ color: [] }, { background: [] }],
readOnly: false ["blockquote", "code-block"],
} [{ list: "ordered" }, { list: "bullet" }],
} // [{ 'script': 'sub' }, { 'script': 'super' }],
}, [{ indent: "-1" }, { indent: "+1" }],
computed: { [{ align: [] }],
classes () { [{ direction: "rtl" }],
return [ // [{ 'font': [] }],
{ ["clean"],
'i-quill-no-border': !this.border ["link", "image"]
} ]
];
},
styles () {
let style = {};
if (this.minHeight) {
style.minHeight = `${this.minHeight}px`;
}
if (this.height) {
style.height = `${this.height}px`;
}
return style;
}
},
watch: {
value: {
handler (val) {
if (val !== this.currentValue) {
this.currentValue = val;
if (this.Quill) {
this.Quill.pasteHTML(this.value);
}
}
},
immediate: true
}
},
methods: {
init () {
const editor = this.$refs.editor;
// 初始化编辑器
this.Quill = new Quill(editor, this.options);
// 默认值
this.Quill.pasteHTML(this.currentValue);
// 绑定事件
this.Quill.on('text-change', (delta, oldDelta, source) => {
const html = this.$refs.editor.children[0].innerHTML;
const text = this.Quill.getText();
const quill = this.Quill;
// 更新内部的值
this.currentValue = html;
// 发出事件 v-model
this.$emit('input', html);
// 发出事件
this.$emit('on-change', { html, text, quill });
});
// 将一些 quill 自带的事件传递出去
this.Quill.on('text-change', (delta, oldDelta, source) => {
this.$emit('on-text-change', delta, oldDelta, source);
});
this.Quill.on('selection-change', (range, oldRange, source) => {
this.$emit('on-selection-change', range, oldRange, source);
});
this.Quill.on('editor-change', (eventName, ...args) => {
this.$emit('on-editor-change', eventName, ...args);
});
}
},
mounted () {
this.init();
}, },
beforeDestroy () { placeholder: "内容...",
// 在组件销毁后销毁实例 readOnly: false
this.Quill = null; }
};
},
computed: {
classes() {
return [
{
"i-quill-no-border": !this.border
} }
];
},
styles() {
let style = {};
if (this.minHeight) {
style.minHeight = `${this.minHeight}px`;
}
if (this.height) {
style.height = `${this.height}px`;
}
return style;
} }
</script> },
<style lang="less"> watch: {
.i-quill-no-border{ value: {
.ql-toolbar.ql-snow{ handler(val) {
border: none; if (val !== this.currentValue) {
border-bottom: 1px solid #e8eaec; this.currentValue = val;
} if (this.Quill) {
.ql-container.ql-snow{ this.Quill.pasteHTML(this.value);
border: none; }
} }
},
immediate: true
} }
},
methods: {
init() {
const editor = this.$refs.editor;
// 初始化编辑器
this.Quill = new Quill(editor, this.options);
// 默认值
this.Quill.pasteHTML(this.currentValue);
// 绑定事件
this.Quill.on("text-change", (delta, oldDelta, source) => {
const html = this.$refs.editor.children[0].innerHTML;
const text = this.Quill.getText();
const quill = this.Quill;
// 更新内部的值
this.currentValue = html;
// 发出事件 v-model
this.$emit("input", html);
// 发出事件
this.$emit("on-change", { html, text, quill });
});
// 将一些 quill 自带的事件传递出去
this.Quill.on("text-change", (delta, oldDelta, source) => {
this.$emit("on-text-change", delta, oldDelta, source);
});
this.Quill.on("selection-change", (range, oldRange, source) => {
this.$emit("on-selection-change", range, oldRange, source);
});
this.Quill.on("editor-change", (eventName, ...args) => {
this.$emit("on-editor-change", eventName, ...args);
});
}
},
handleImg(e) {
console.warn(e);
let file = null;
if (
e.clipboardData &&
e.clipboardData.items[0] &&
e.clipboardData.items[0].type &&
e.clipboardData.items[0].type.indexOf("image") > -1
) {
//这里就是判断是否有粘贴进来的文件且文件为图片格式
file = e.clipboardData.items[0].getAsFile();
let reader = new FileReader();
reader.readAsDataURL(file);
setTimeout(() => {
var img = '<img src="' + reader.result + '" alt=""/>';
this.currentValue += img;
}, 1000);
// new R
}
},
mounted() {
this.init();
},
beforeDestroy() {
// 在组件销毁后销毁实例
this.Quill = null;
}
};
</script>
<style lang="less">
.i-quill-no-border {
.ql-toolbar.ql-snow {
border: none;
border-bottom: 1px solid #e8eaec;
}
.ql-container.ql-snow {
border: none;
}
}
</style> </style>
...@@ -1180,7 +1180,7 @@ export default { ...@@ -1180,7 +1180,7 @@ export default {
routingType: '工艺类型', routingType: '工艺类型',
status: '状态', status: '状态',
approvalStatus: '审批状态', approvalStatus: '审批状态',
remark: '备注', remark: '工艺说明',
approvalStatusRemark: '审批备注', approvalStatusRemark: '审批备注',
auditUserId1: '审批人', auditUserId1: '审批人',
auditUserId2: '审批人', auditUserId2: '审批人',
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -12,19 +12,23 @@ ...@@ -12,19 +12,23 @@
}, },
"dependencies": { "dependencies": {
"@nuxtjs/axios": "^5.3.6", "@nuxtjs/axios": "^5.3.6",
"@svgdotjs/svg.draggable.js": "^3.0.2",
"@svgdotjs/svg.js": "^3.0.16",
"area-data": "^5.0.6",
"awe-dnd": "^0.3.4", "awe-dnd": "^0.3.4",
"better-scroll": "^1.12.1", "better-scroll": "^1.12.1",
"cross-env": "^5.2.0", "cross-env": "^5.2.0",
"dayjs": "^1.8.22", "dayjs": "^1.8.22",
"echarts": "^4.7.0", "echarts": "^4.7.0",
"echarts-liquidfill": "^2.0.5", "echarts-liquidfill": "^2.0.5",
"gojs": "^2.1.10",
"iview-loader": "^1.3.0", "iview-loader": "^1.3.0",
"iview-pro": "file:./iview-pro", "iview-pro": "file:./iview-pro",
"js-cookie": "^2.2.1", "js-cookie": "^2.2.1",
"less": "^3.10.3", "less": "^3.10.3",
"less-loader": "^5.0.0", "less-loader": "^5.0.0",
"lodash.chunk": "^4.2.0",
"lodash": "^4.17.15", "lodash": "^4.17.15",
"lodash.chunk": "^4.2.0",
"lowdb": "^1.0.0", "lowdb": "^1.0.0",
"marked": "^0.3.9", "marked": "^0.3.9",
"mockjs": "^1.0.1-beta3", "mockjs": "^1.0.1-beta3",
...@@ -32,12 +36,9 @@ ...@@ -32,12 +36,9 @@
"nuxt": "^2.10.2", "nuxt": "^2.10.2",
"oidc-client": "^1.9.1", "oidc-client": "^1.9.1",
"qs": "^6.6.0", "qs": "^6.6.0",
"gojs": "^2.1.10", "quill-image-drop-module": "^1.0.3",
"quill-image-resize-module": "^3.0.0",
"screenfull": "^5.0.2", "screenfull": "^5.0.2",
"area-data": "^5.0.6",
"xlsx": "^0.15.1",
"@svgdotjs/svg.draggable.js": "^3.0.2",
"@svgdotjs/svg.js": "^3.0.16",
"ua-parser-js": "^0.7.18", "ua-parser-js": "^0.7.18",
"view-design": "^4.1.3", "view-design": "^4.1.3",
"vue-echarts": "^4.0.3", "vue-echarts": "^4.0.3",
...@@ -47,7 +48,8 @@ ...@@ -47,7 +48,8 @@
"vue-ueditor-wrap": "^2.4.1", "vue-ueditor-wrap": "^2.4.1",
"vue2-editor": "^2.10.2", "vue2-editor": "^2.10.2",
"vuedraggable": "^2.23.0", "vuedraggable": "^2.23.0",
"vuex-along": "^1.2.10" "vuex-along": "^1.2.10",
"xlsx": "^0.15.1"
}, },
"devDependencies": { "devDependencies": {
"@babel/plugin-transform-runtime": "^7.2.0", "@babel/plugin-transform-runtime": "^7.2.0",
......
<template> <template>
<div class="compare"> <div class="compare">
<div class="btn"> <div class="btn" style="z-index:9999;position:absolute;right:0">
<Button type="primary" @click="parameter">下发</Button> <Button type="primary" @click="parameter">下发</Button>
<!-- <Button type="primary">导出</Button>000 --> <!-- <Button type="primary">导出</Button>000 -->
<Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button> <Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
</style> </style>
<template> <template>
<div> <div>
<div class="btn"> <div class="btn" style="z-index:9999;position:absolute;right:0">
<Button type="primary" @click="parameter">下发</Button> <Button type="primary" @click="parameter">下发</Button>
<!-- <Button type="primary">导出</Button>000 --> <!-- <Button type="primary">导出</Button>000 -->
<Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button> <Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
<i-quill <i-quill
v-model="bugForm.content" v-model="bugForm.content"
:height="600" :height="600"
v-paste="handleImg"
/> />
</FormItem> </FormItem>
</Row> </Row>
......
...@@ -11,57 +11,57 @@ ...@@ -11,57 +11,57 @@
<Input v-model="entity.unicode"></Input> <Input v-model="entity.unicode"></Input>
</FormItem> </FormItem>
</Col>--> </Col>-->
<Col :span="12"> <Col :span="8">
<FormItem :label="l('name')" prop="name"> <FormItem :label="l('name')" prop="name">
<Input v-model="entity.name"></Input> <Input v-model="entity.name"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('code')" prop="code"> <FormItem :label="l('code')" prop="code">
<Input v-model="entity.code"></Input> <Input v-model="entity.code"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('routingType')" prop="routingType"> <FormItem :label="l('routingType')" prop="routingType">
<Dictionary code="Process.Routing.routingType" v-model="entity.routingType"></Dictionary> <Dictionary code="Process.Routing.routingType" v-model="entity.routingType"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('productId')" prop="productId"> <FormItem :label="l('productId')" prop="productId">
<ProductSelect v-model="entity.productId"></ProductSelect> <ProductSelect v-model="entity.productId"></ProductSelect>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('version')" prop="version"> <FormItem :label="l('version')" prop="version">
<Input v-model="entity.version"></Input> <Input v-model="entity.version"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('author')" prop="author"> <FormItem :label="l('author')" prop="author">
<UserSelect v-model="entity.author"></UserSelect> <UserSelect v-model="entity.author"></UserSelect>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="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="12"> </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>
</Col> </Col>
<Col :span="12"> <Col :span="6">
<FormItem :label="l('isSendPpm')" prop="isSendPpm"> <FormItem :label="l('isSendPpm')" prop="isSendPpm">
<Dictionary code="Process.Status" v-model="entity.isSendPpm" type="radio"></Dictionary> <Dictionary code="Process.Status" v-model="entity.isSendPpm" type="radio"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="5">
<FormItem :label="l('isEffect')" prop="isEffect"> <FormItem :label="l('isEffect')" prop="isEffect">
<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>
...@@ -120,12 +120,24 @@ ...@@ -120,12 +120,24 @@
<InputNumber v-model="entity.versionid"></InputNumber> <InputNumber v-model="entity.versionid"></InputNumber>
</FormItem> </FormItem>
</Col>--> </Col>-->
<Col :span="24"> <Col :span="24">
<FormItem :label="l('remark')" prop="remark"> <FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="5"></Input> <i-quill
v-model="entity.remark"
:height="300"
border
v-paste="handleImg"
/>
</FormItem>
</Col>
<Col :span="24">
<FormItem label="多媒体附件" prop="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>
...@@ -135,8 +147,13 @@ ...@@ -135,8 +147,13 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import iQuill from '@/components/quill'
export default { export default {
name: "Add", name: "Add",
components: {
iQuill
// VueUeditorWrap
},
data() { data() {
return { return {
disabled: false, disabled: false,
...@@ -206,6 +223,27 @@ export default { ...@@ -206,6 +223,27 @@ export default {
}, },
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
},
handleImg(e) {
console.warn(e)
let file = null
if (
e.clipboardData &&
e.clipboardData.items[0] &&
e.clipboardData.items[0].type &&
e.clipboardData.items[0].type.indexOf('image') > -1
) {
//这里就是判断是否有粘贴进来的文件且文件为图片格式
file = e.clipboardData.items[0].getAsFile()
let reader = new FileReader()
reader.readAsDataURL(file)
setTimeout(() => {
var img = '<img src="' + reader.result + '" alt=""/>'
this.entity.remark += img
}, 1000)
// new R
}
}, },
load(v) { load(v) {
Api.get({ id: v }).then(r => { Api.get({ id: v }).then(r => {
......
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
key: "stepSeq", key: "stepSeq",
title: this.l("stepSeq"), title: this.l("stepSeq"),
align: "left", align: "left",
width: 150, width: 100,
render: (h, params) => { render: (h, params) => {
return h("div", { style: "padding-left:10px" }, params.row.stepSeq); return h("div", { style: "padding-left:10px" }, params.row.stepSeq);
} }
...@@ -88,7 +88,7 @@ export default { ...@@ -88,7 +88,7 @@ export default {
{ {
key: "creationTime", key: "creationTime",
title: this.l("creationTime"), title: this.l("creationTime"),
align: "left", align: "center",
width: 200 width: 200
}, },
{ {
......
<template> <template>
<div> <div>
<DataGrid :columns="columns" ref="grid" :data="list" :easy="false" :high="false"> <DataGrid :columns="columns" ref="grid" :data="list" :easy="false" :high="false" :page="false">
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="add">新增</Button>
</template> </template>
......
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
<Col :span="12"> <Col :span="12">
<FormItem :label="l('stepSeq')" prop="stepSeq"> <FormItem :label="l('stepSeq')" prop="stepSeq">
<!-- <InputNumber v-model="entity.stepSeq"></InputNumber> --> <!-- <InputNumber v-model="entity.stepSeq"></InputNumber> -->
<Input style="width:300px" v-model="entity.stepSeq"></Input> <InputNumber v-model="entity.stepSeq"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('name')" prop="name"> <FormItem :label="l('name')" prop="name">
<Input style="width:350px" v-model="entity.name"></Input> <Input v-model="entity.name"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24"> <Col :span="24">
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
<Col :span="12"> <Col :span="12">
<FormItem :label="l('stepSeq')" prop="stepSeq"> <FormItem :label="l('stepSeq')" prop="stepSeq">
<!-- <InputNumber v-model="entity.stepSeq"></InputNumber> --> <!-- <InputNumber v-model="entity.stepSeq"></InputNumber> -->
<Input style="width:300px" v-model="entity.stepSeq"></Input> <InputNumber v-model="entity.stepSeq"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('name')" prop="name"> <FormItem :label="l('name')" prop="name">
<Input style="width:350px" v-model="entity.name"></Input> <Input v-model="entity.name"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24"> <Col :span="24">
......
...@@ -11,52 +11,53 @@ ...@@ -11,52 +11,53 @@
<Input v-model="entity.unicode"></Input> <Input v-model="entity.unicode"></Input>
</FormItem> </FormItem>
</Col>--> </Col>-->
<Col :span="12"> <Col :span="8">
<FormItem :label="l('name')" prop="name"> <FormItem :label="l('name')" prop="name">
<Input v-model="entity.name"></Input> <Input v-model="entity.name"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('code')" prop="code"> <FormItem :label="l('code')" prop="code">
<Input v-model="entity.code"></Input> <Input v-model="entity.code"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('routingType')" prop="routingType"> <FormItem :label="l('routingType')" prop="routingType">
<Dictionary code="Process.Routing.routingType" v-model="entity.routingType"></Dictionary> <Dictionary code="Process.Routing.routingType" v-model="entity.routingType"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('productId')" prop="productId"> <FormItem :label="l('productId')" prop="productId">
<ProductSelect v-model="entity.productId"></ProductSelect> <ProductSelect v-model="entity.productId"></ProductSelect>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('version')" prop="version"> <FormItem :label="l('version')" prop="version">
<Input v-model="entity.version"></Input> <Input v-model="entity.version"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('author')" prop="author"> <FormItem :label="l('author')" prop="author">
<UserSelect v-model="entity.author"></UserSelect> <UserSelect v-model="entity.author"></UserSelect>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="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="12"> </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>
</Col> </Col>
<Col :span="12"> <Col :span="6">
<FormItem :label="l('isSendPpm')" prop="isSendPpm"> <FormItem :label="l('isSendPpm')" prop="isSendPpm">
<Dictionary code="Process.Status" v-model="entity.isSendPpm" type="radio"></Dictionary> <Dictionary code="Process.Status" v-model="entity.isSendPpm" type="radio"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="5">
<FormItem :label="l('isEffect')" prop="isEffect"> <FormItem :label="l('isEffect')" prop="isEffect">
<Dictionary code="Process.Status" v-model="entity.isEffect" type="radio"></Dictionary> <Dictionary code="Process.Status" v-model="entity.isEffect" type="radio"></Dictionary>
</FormItem> </FormItem>
...@@ -120,10 +121,15 @@ ...@@ -120,10 +121,15 @@
<InputNumber v-model="entity.versionid"></InputNumber> <InputNumber v-model="entity.versionid"></InputNumber>
</FormItem> </FormItem>
</Col>--> </Col>-->
<Col :span="24"> <Col :span="24">
<FormItem :label="l('remark')" prop="remark"> <FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="5"></Input> <i-quill v-model="entity.remark" :height="300" border v-paste="handleImg" />
</FormItem>
</Col>
<Col :span="24">
<FormItem label="多媒体附件" prop="files">
<files />
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -135,7 +141,12 @@ ...@@ -135,7 +141,12 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import iQuill from "@/components/quill";
export default { export default {
components: {
iQuill
// VueUeditorWrap
},
name: "Edit", name: "Edit",
data() { data() {
return { return {
...@@ -182,6 +193,27 @@ export default { ...@@ -182,6 +193,27 @@ export default {
} }
}); });
}, },
handleImg(e) {
console.warn(e);
let file = null;
if (
e.clipboardData &&
e.clipboardData.items[0] &&
e.clipboardData.items[0].type &&
e.clipboardData.items[0].type.indexOf("image") > -1
) {
//这里就是判断是否有粘贴进来的文件且文件为图片格式
file = e.clipboardData.items[0].getAsFile();
let reader = new FileReader();
reader.readAsDataURL(file);
setTimeout(() => {
var img = '<img src="' + reader.result + '" alt=""/>';
this.entity.remark += img;
}, 1000);
// new R
}
},
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
}, },
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
.con { .con {
padding: 5px 5px 0px 10px; padding: 5px 5px 0px 10px;
} }
background: rgba(245,246,250,1);
} }
.fullWindow { .fullWindow {
position: fixed; position: fixed;
...@@ -37,10 +38,6 @@ ...@@ -37,10 +38,6 @@
</a> </a>
</div> </div>
<Content class="con"> <Content class="con">
<!-- <a class="detail_href" @click="view">
<Icon type="ios-undo-outline" />详情页面
</a>-->
<Card class="h100">
<DataGrid :columns="columns" ref="grid" :action="action" class="card_box"> <DataGrid :columns="columns" ref="grid" :action="action" class="card_box">
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
...@@ -64,7 +61,6 @@ ...@@ -64,7 +61,6 @@
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="add">新增</Button>
</template> </template>
</DataGrid> </DataGrid>
</Card>
<Modal v-model="modal" :title="title" width="1200" footer-hide> <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" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
......
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