Commit 0b19c975 authored by renjintao's avatar renjintao

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

parents e063137c 6d5f8dbc
......@@ -41,7 +41,7 @@
<FormItem label>
<files ref="refFile" :parms="parms" files />
</FormItem>
</Row>
</Row>
</Form>
</div>
</template>
......
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="12"><FormItem :label="l('creationTime')" prop="creationTime"> <DatePicker type="date" v-model="entity.creationTime"></DatePicker>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('creatorUserId')" prop="creatorUserId"> <InputNumber v-model="entity.creatorUserId"></InputNumber>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('lastModificationTime')" prop="lastModificationTime"> <DatePicker type="date" v-model="entity.lastModificationTime"></DatePicker>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId"> <InputNumber v-model="entity.lastModifierUserId"></InputNumber>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('isDeleted')" prop="isDeleted"> <InputNumber v-model="entity.isDeleted"></InputNumber>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('deletionTime')" prop="deletionTime"> <DatePicker type="date" v-model="entity.deletionTime"></DatePicker>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('deleterUserId')" prop="deleterUserId"> <InputNumber v-model="entity.deleterUserId"></InputNumber>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('title')" prop="title"> <Input v-model="entity.title"> </Input>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('creator')" prop="creator"> <Input v-model="entity.creator"> </Input>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('content')" prop="content"> <Input v-model="entity.content"> </Input>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('filePath')" prop="filePath"> <InputFile v-model="entity.filePath"></InputFile>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('filePaths')" prop="filePaths"> <Input v-model="entity.filePaths"> </Input>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('dispatchId')" prop="dispatchId"> <InputNumber v-model="entity.dispatchId"></InputNumber>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('routingDetailId')" prop="routingDetailId"> <InputNumber v-model="entity.routingDetailId"></InputNumber>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('routingHeaderId')" prop="routingHeaderId"> <InputNumber v-model="entity.routingHeaderId"></InputNumber>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('type')" prop="type"> <InputNumber v-model="entity.type"></InputNumber>
</FormItem></Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="24">
<FormItem :label="l('title')" prop="title" style="width:95%">
<Input v-model="entity.title"></Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem label>
<files ref="refFile" :parms="parms" files />
</FormItem>
<!-- <FormItem :label="l('filePath')" prop="filePath">
<InputFile v-model="entity.filePath"></InputFile>
</FormItem> -->
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import Api from './api'
export default {
name: 'Add',
data() {
return {
disabled: false,
entity: {creationTime: null,
creatorUserId: null,
lastModificationTime: null,
lastModifierUserId: null,
isDeleted: null,
deletionTime: null,
deleterUserId: null,
title: "",
creator: "",
content: "",
filePath: "",
filePaths: "",
dispatchId: null,
routingDetailId: null,
routingHeaderId: null,
type: null},
rules: {
name: [{ required: true, message: '必填', trigger: 'blur' }]
}
}
},
props: {
v: Object,
eid: Number
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true;
Api.create(this.entity).then((r) => {
this.disabled = false;
if (r.success) {
this.$Message.success('保存成功')
this.$emit('on-ok')
} else {
this.$Message.error('保存失败')
}
}).catch(err => {
this.disabled = false;
this.$Message.error('保存失败')
console.warn(err)
})
}
})
},
handleClose() {
this.$emit('on-close')
},
load(v) {
Api.get({ id: v }).then(r => {
this.entity = r.result;
this.entity.id = 0;
});
},
l(key) {
key = "process_case" + "." + key;
return this.$t(key)
}
},
watch: {
v() {
this.entity = this.$u.clone(this.v)
},
eid(v) {
if (v > 0) {
this.load(v);
}
}
import Api from "./api";
export default {
name: "Add",
data() {
return {
disabled: false,
entity: {
// creationTime: null,
creatorUserId: this.$store.state.userInfo.userId,
// lastModificationTime: null,
// lastModifierUserId: null,
// isDeleted: null,
// deletionTime: null,
// deleterUserId: null,
title: "",
creator: this.$store.state.userInfo.userName,
content: "",
filePath: "",
filePaths: "",
dispatchId: null,
routingDetailId: null,
routingHeaderId: null,
type: 1
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
},
parms:{
},
};
},
props: {
v: Object,
eid: Number
},
created(){
console.log(this.entity.creator)
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
handleSubmit() {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
Api.create(this.entity)
.then(r => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
}
})
.catch(err => {
this.disabled = false;
this.$Message.error("保存失败");
console.warn(err);
});
}
});
},
handleClose() {
this.$emit("on-close");
},
load(v) {
Api.get({ id: v }).then(r => {
this.entity = r.result;
this.entity.id = 0;
});
},
l(key) {
key = "process_case" + "." + key;
return this.$t(key);
}
},
watch: {
v() {
this.entity = this.$u.clone(this.v);
},
eid(v) {
if (v > 0) {
this.load(v);
}
}
</script>
\ No newline at end of file
}
};
</script>
\ No newline at end of file
......@@ -11,13 +11,8 @@
<Filed :span="12" :name="l('deleterUserId')">{{entity.deleterUserId}}</Filed>
<Filed :span="12" :name="l('title')">{{entity.title}}</Filed>
<Filed :span="12" :name="l('creator')">{{entity.creator}}</Filed>
<Filed :span="12" :name="l('content')">{{entity.content}}</Filed>
<Filed :span="12" :name="l('filePath')">{{entity.filePath}}</Filed>
<Filed :span="12" :name="l('filePaths')">{{entity.filePaths}}</Filed>
<Filed :span="12" :name="l('dispatchId')">{{entity.dispatchId}}</Filed>
<Filed :span="12" :name="l('routingDetailId')">{{entity.routingDetailId}}</Filed>
<Filed :span="12" :name="l('routingHeaderId')">{{entity.routingHeaderId}}</Filed>
<Filed :span="12" :name="l('type')">{{entity.type}}</Filed>
</Row>
</div>
......
......@@ -27,7 +27,37 @@
<Button type="primary" @click="add">新增</Button>
</template>
<template slot="card" slot-scope="{row}">
<div class="card_box" @click="changeCards(row)">
<div class="card_body">
<Row class="title_i">
<Col :span="21">案例名称:{{row.title}}</Col>
<Col :span="3" class="btn_click">
<!-- <a @click="edit(row.id)">
<Icon type="ios-create" @click="edit(row.id)" />
</a> -->
<a @click="view(row.id)">
<Icon type="ios-paper" />
</a>
<a @click="remove(row.id)">
<Icon type="ios-trash" />
</a>
</Col>
</Row>
<div class="down_text">
<Row :gutter="16">
<Col span="6">
<div class="file">
<Icon type="ios-paper" v-if="row.id%2==0" />
<Icon type="md-film" v-else />
</div>
</Col>
<Col span="18">
<p>{{row.creationTime}}</p>
<p>{{row.id}}{{row.creator}}</p>
</Col>
</Row>
</div>
</div>
<!-- <div class="card_box" @click="changeCards(row)">
<Row :gutter="16">
<Col span="6">
<div class="file">
......@@ -43,12 +73,15 @@
<p>{{row.id}}{{row.creator}}</p>
</Col>
</Row>
</div>
</div> -->
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal>
<Modal v-model="deletelModal" title="删除" @on-ok="removeOk" @on-cancel="cancel" :mask-closable="false">
<p>确定删除?</p>
</Modal>
</div>
</template>
<script>
......@@ -72,6 +105,7 @@ export default {
type: { op: "Equal", value: 1 }
},
modal: false,
deletelModal: false,
title: "新增",
detail: null,
curId: 0,
......@@ -251,6 +285,11 @@ export default {
this.modal = true;
},
remove(id) {
this.deletelModal = true;
this.curId = id;
},
removeOk(){
let id = this.curId;
Api.delete(id).then(r => {
if (r.success) {
this.$refs.grid.load();
......@@ -261,6 +300,7 @@ export default {
cancel() {
this.curId = 0;
this.modal = false;
this.deletedlModal = false;
},
l(key) {
/*
......
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="12">
<FormItem :label="l('creationTime')" prop="creationTime">
<DatePicker type="date" v-model="entity.creationTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('creatorUserId')" prop="creatorUserId">
<InputNumber v-model="entity.creatorUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('lastModificationTime')" prop="lastModificationTime">
<DatePicker type="date" v-model="entity.lastModificationTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId">
<InputNumber v-model="entity.lastModifierUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('isDeleted')" prop="isDeleted">
<InputNumber v-model="entity.isDeleted"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('deletionTime')" prop="deletionTime">
<DatePicker type="date" v-model="entity.deletionTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('deleterUserId')" prop="deleterUserId">
<InputNumber v-model="entity.deleterUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('title')" prop="title">
<Col :span="24">
<FormItem :label="l('title')" prop="title" style="width:95%">
<Input v-model="entity.title"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('creator')" prop="creator">
<Input v-model="entity.creator"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('content')" prop="content">
<Input v-model="entity.content"></Input>
<Col :span="24">
<FormItem label>
<files ref="refFile" :parms="parms" files />
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('filePath')" prop="filePath">
<!-- <FormItem :label="l('filePath')" prop="filePath">
<InputFile v-model="entity.filePath"></InputFile>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('filePaths')" prop="filePaths">
<Input v-model="entity.filePaths"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('dispatchId')" prop="dispatchId">
<InputNumber v-model="entity.dispatchId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('routingDetailId')" prop="routingDetailId">
<InputNumber v-model="entity.routingDetailId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('routingHeaderId')" prop="routingHeaderId">
<InputNumber v-model="entity.routingHeaderId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('type')" prop="type">
<InputNumber v-model="entity.type"></InputNumber>
</FormItem>
</FormItem> -->
</Col>
</Row>
<FormItem>
......@@ -96,32 +29,38 @@ export default {
return {
disabled: false,
entity: {
creationTime: null,
creatorUserId: null,
lastModificationTime: null,
lastModifierUserId: null,
isDeleted: null,
deletionTime: null,
deleterUserId: null,
// creationTime: null,
creatorUserId: this.$store.state.userInfo.userId,
// lastModificationTime: null,
// lastModifierUserId: null,
// isDeleted: null,
// deletionTime: null,
// deleterUserId: null,
title: "",
creator: "",
creator: this.$store.state.userInfo.userName,
content: "",
filePath: "",
filePaths: "",
dispatchId: null,
routingDetailId: null,
routingHeaderId: null,
type: null
type: 2
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
}
},
parms:{
},
};
},
props: {
v: Object,
eid: Number
},
created(){
console.log(this.entity.creator)
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
......
......@@ -24,7 +24,37 @@
<Button type="primary" @click="add">新增</Button>
</template>
<template slot="card" slot-scope="{row}">
<div class="card_box" @click="changeCards(row)">
<div class="card_body">
<Row class="title_i">
<Col :span="21">工艺名称:{{row.title}}</Col>
<Col :span="3" class="btn_click">
<!-- <a @click="edit(row.id)">
<Icon type="ios-create" @click="edit(row.id)" />
</a> -->
<a @click="view(row.id)">
<Icon type="ios-paper" />
</a>
<a @click="remove(row.id)">
<Icon type="ios-trash" />
</a>
</Col>
</Row>
<div class="down_text">
<Row :gutter="16">
<Col span="6">
<div class="file">
<Icon type="ios-paper" v-if="row.id%2==0" />
<Icon type="md-film" v-else />
</div>
</Col>
<Col span="18">
<p>{{row.creationTime}}</p>
<p>{{row.id}}{{row.creator}}</p>
</Col>
</Row>
</div>
</div>
<!-- <div class="card_box" @click="changeCards(row)">
<Row :gutter="16">
<Col span="6">
<div class="file">
......@@ -40,12 +70,15 @@
<p>{{row.id}}{{row.creator}}</p>
</Col>
</Row>
</div>
</div> -->
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide>
<Modal v-model="modal" :title="title" width="1200" footer-hide :mask-closable="false">
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal>
<Modal v-model="deletelModal" title="删除" @on-ok="removeOk" @on-cancel="cancel" :mask-closable="false">
<p>确定删除?</p>
</Modal>
</div>
</template>
<script>
......@@ -58,8 +91,8 @@ export default {
},
head: {
title: "工艺提醒",
author: "henq",
description: "process_case 6/1/2020 5:06:34 PM"
// author: "henq",
// description: "process_case 6/1/2020 5:06:34 PM"
},
data() {
return {
......@@ -69,6 +102,7 @@ export default {
type: { op: "Equal", value: 2 }
},
modal: false,
deletelModal: false,
title: "新增",
detail: null,
curId: 0,
......@@ -242,6 +276,11 @@ export default {
this.modal = true;
},
remove(id) {
this.deletelModal = true;
this.curId = id;
},
removeOk(){
let id = this.curId;
Api.delete(id).then(r => {
if (r.success) {
this.$refs.grid.load();
......@@ -252,6 +291,7 @@ export default {
cancel() {
this.curId = 0;
this.modal = false;
this.deletedlModal = false;
},
l(key) {
/*
......
......@@ -126,7 +126,30 @@
padding: 0;
}
}
.card_body{
border: 1px solid #e4e6ed;
border-radius: 4px;
margin-bottom: 30px;
.title_i{
padding: 0 8px;
height: 35px;
line-height: 35px;
color: #fff;
background: #a7b8cc;
font-size: 15px;
}
.btn_click{
text-align: right;
}
.down_text{
background: #a7b8cc33;
padding: 5px 8px;
line-height: 32px;
i{
font-size: 62px;
}
}
}
.gd_box{
.ivu-drawer-wrap{
.ivu-drawer-left{
......
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