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

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

parents 05529d0c 3b409d56
<style lang="less">
.timer {
.ivu-input-number {
width: 60px;
}
> span {
line-height: 30px;
}
}
</style>
<template>
<div class="flex timer">
<div class="fg1">
<InputNumber v-model="hour" :formatter="value => `${value}`" :min="0" :max="100" />
</div>
<span>小时</span>
<div class="fg1">
<InputNumber v-model="minute" :formatter="value => `${value}`" :min="-1" :max="60" />
</div>
<span>分钟</span>
<div class="fg1">
<InputNumber v-model="second" :formatter="value => `${value}`" :min="0" :max="60" />
</div>
<span></span>
</div>
</template>
<script>
export default {
data() {
return {
hour: 0,
minute: 0,
second: 0
};
},
model: {
prop: "value",
event: "on-change",
},
props: {
value: [Number],
},
mounted(){
this.setTime(this.value)
},
methods: {
setTime(v) {
let h = parseInt(v / ( 60 * 60));
this.hour = h;
this.minute = parseInt((v - h * 60 * 60) / 60);
this.second = parseInt(v - h * 60 * 60 - this.minute * 60);
},
change(){
let result=0
result+=this.hour*60*60;
result+=this.minute*60;
result+=this.second;
this.$emit("on-change",result);
}
},
watch: {
value(v){
this.setTime(v);
},
second(v){
if(v>=60){
this.second=0
this.minute+=1;
}
this.change();
},
minute(v){
if(v>=60){
this.minute=0;
this.hour+=1;
}else if(v<0){
this.hour-=1;
this.minute=59;
}
this.change();
},
hour(v){
this.change();
}
}
};
</script>
\ No newline at end of file
......@@ -15362,8 +15362,7 @@
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -15523,7 +15522,6 @@
"version": "2.9.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
......@@ -15542,7 +15540,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
......@@ -15645,7 +15642,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -15731,8 +15727,7 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -15768,7 +15763,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -15832,14 +15826,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"yallist": {
"version": "3.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
}
}
},
......@@ -18617,6 +18609,7 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
......@@ -19485,7 +19478,6 @@
"version": "2.9.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
......@@ -19504,7 +19496,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
......@@ -19607,7 +19598,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -19693,8 +19683,7 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -19794,14 +19783,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"yallist": {
"version": "3.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
}
}
},
......
<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"> <Input v-model="entity.isDeleted"> </Input>
</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('deletionTime')" prop="deletionTime"> <DatePicker type="date" v-model="entity.deletionTime"></DatePicker>
</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('routingDetailId')" prop="routingDetailId"> <InputNumber v-model="entity.routingDetailId"></InputNumber>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('classId')" prop="classId"> <InputNumber v-model="entity.classId"></InputNumber>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('stepSeq')" prop="stepSeq"> <InputNumber v-model="entity.stepSeq"></InputNumber>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('name')" prop="name"> <Input v-model="entity.name"> </Input>
</FormItem></Col>
<Col :span="24"><FormItem :label="l('description')" prop="description"> <Input v-model="entity.description" type="textarea" :rows="5"></Input>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('status')" prop="status"> <Dictionary code="Process.Status" v-model="entity.status"></Dictionary>
</FormItem></Col>
<Col :span="24"><FormItem :label="l('remark')" prop="remark"> <Input v-model="entity.remark" type="textarea" :rows="5"></Input>
</FormItem></Col>
<Col :span="24"><FormItem :label="l('stepContent')" prop="stepContent"> <Input v-model="entity.stepContent" type="textarea" :rows="5"></Input>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('extend')" prop="extend"> <Input v-model="entity.extend"> </Input>
</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="12">
<FormItem :label="l('routingHeaderId')" prop="routingHeaderId">
<InputNumber style="width:200px" v-model="entity.routingHeaderId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('routingDetailId')" prop="routingDetailId">
<InputNumber style="width:200px" v-model="entity.routingDetailId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('stepSeq')" prop="stepSeq">
<!-- <InputNumber v-model="entity.stepSeq"></InputNumber> -->
<Input style="width:300px" v-model="entity.stepSeq"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('name')" prop="name">
<Input style="width:350px" v-model="entity.name"></Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('stepContent')" prop="stepContent">
<i-quill
v-model="entity.stepContent"
:height="260"
v-paste="handleImg"
/>
<!-- <Input v-model="entity.stepContent" type="textarea" :rows="5"></Input> -->
<!-- <Input v-model="entity.stepContent" type="textarea" :minRows="3", :maxRows="7" ></Input> -->
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<RadioGroup v-model="entity.status">
<Radio :label="1"></Radio>
<Radio :label="0"></Radio>
</RadioGroup>
<!-- <Dictionary style="width:100px" code="Process.Status" v-model="entity.status"></Dictionary> -->
</FormItem>
</Col>
<!--<Col :span="24">
<FormItem :label="l('description')" prop="description">
<Input v-model="entity.description" type="textarea" :rows="5"></Input>
</FormItem>
</Col>
<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">
<Input v-model="entity.isDeleted"></Input>
</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('deletionTime')" prop="deletionTime">
<DatePicker type="date" v-model="entity.deletionTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('classId')" prop="classId">
<InputNumber v-model="entity.classId"></InputNumber>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="5"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('extend')" prop="extend">
<Input v-model="entity.extend"></Input>
</FormItem>
</Col> -->
</Row>
</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,
deleterUserId: null,
deletionTime: null,
routingHeaderId: null,
routingDetailId: null,
classId: null,
stepSeq: null,
name: "",
description: "",
status: null,
remark: "",
stepContent: "",
extend: ""},
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 = "routing_step" + "." + key;
return this.$t(key)
import Api from "./api";
import iQuill from '@/components/quill'
export default {
name: "Add",
components: { iQuill },
data() {
return {
disabled: false,
entity: {
creationTime: null,
creatorUserId: null,
lastModificationTime: null,
lastModifierUserId: null,
isDeleted: null,
deleterUserId: null,
deletionTime: null,
routingHeaderId: null,
routingDetailId: null,
classId: null,
stepSeq: null,
name: "",
description: "",
status: null,
remark: "",
stepContent: "",
extend: ""
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
}
},
watch: {
v() {
this.entity = this.$u.clone(this.v)
},
eid(v) {
if (v > 0) {
this.load(v);
}
}
};
},
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);
});
}
});
},
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.bugForm.content += img
// }, 1000)
// // new R
// }
},
handleClose() {
this.$emit("on-close");
},
load(v) {
Api.get({ id: v }).then(r => {
this.entity = r.result;
this.entity.id = 0;
});
},
l(key) {
key = "routing_step" + "." + 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,7 +11,7 @@ export default {
return Api.post(`${technologyUrl}routingstep/create`,params);
},
update(params){
return Api.post(`${technologyUrl}routingstep/update`,params);
return Api.put(`${technologyUrl}routingstep/update`,params);
},
delete(id) {
return Api.delete(`${technologyUrl}routingstep/delete`,{params:{id:id}});
......
<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"> <Input v-model="entity.isDeleted"> </Input>
</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('deletionTime')" prop="deletionTime"> <DatePicker type="date" v-model="entity.deletionTime"></DatePicker>
</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('routingDetailId')" prop="routingDetailId"> <InputNumber v-model="entity.routingDetailId"></InputNumber>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('classId')" prop="classId"> <InputNumber v-model="entity.classId"></InputNumber>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('stepSeq')" prop="stepSeq"> <InputNumber v-model="entity.stepSeq"></InputNumber>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('name')" prop="name"> <Input v-model="entity.name"> </Input>
</FormItem></Col>
<Col :span="24"><FormItem :label="l('description')" prop="description"> <Input v-model="entity.description" type="textarea" :rows="5"></Input>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('status')" prop="status"> <Dictionary code="Process.Status" v-model="entity.status"></Dictionary>
</FormItem></Col>
<Col :span="24"><FormItem :label="l('remark')" prop="remark"> <Input v-model="entity.remark" type="textarea" :rows="5"></Input>
</FormItem></Col>
<Col :span="24"><FormItem :label="l('stepContent')" prop="stepContent"> <Input v-model="entity.stepContent" type="textarea" :rows="5"></Input>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('extend')" prop="extend"> <Input v-model="entity.extend"> </Input>
</FormItem></Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="12">
<FormItem :label="l('stepSeq')" prop="stepSeq">
<!-- <InputNumber v-model="entity.stepSeq"></InputNumber> -->
<Input style="width:300px" v-model="entity.stepSeq"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('name')" prop="name">
<Input style="width:350px" v-model="entity.name"></Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('stepContent')" prop="stepContent">
<i-quill
v-model="entity.stepContent"
:height="260"
v-paste="handleImg"
/>
<!-- <Input v-model="entity.stepContent" type="textarea" :rows="5"></Input> -->
<!-- <Input v-model="entity.stepContent" type="textarea" :minRows="3", :maxRows="7" ></Input> -->
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<RadioGroup v-model="entity.status">
<Radio :label="1"></Radio>
<Radio :label="0"></Radio>
</RadioGroup>
<!-- <Dictionary style="width:100px" code="Process.Status" v-model="entity.status"></Dictionary> -->
</FormItem>
</Col>
<!--<Col :span="24">
<FormItem :label="l('description')" prop="description">
<Input v-model="entity.description" type="textarea" :rows="5"></Input>
</FormItem>
</Col>
<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('routingHeaderId')" prop="routingHeaderId">
<InputNumber v-model="entity.routingHeaderId"></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('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">
<Input v-model="entity.isDeleted"></Input>
</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('deletionTime')" prop="deletionTime">
<DatePicker type="date" v-model="entity.deletionTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('classId')" prop="classId">
<InputNumber v-model="entity.classId"></InputNumber>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="5"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('extend')" prop="extend">
<Input v-model="entity.extend"></Input>
</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: 'Edit',
data() {
return {
disabled: false,
entity: {
},
rules: {
name: [{ required: true, message: '必填', trigger: 'blur' }]
}
}
},
props: {
eid: Number
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.get({ id: v }).then(r => {
this.entity = r.result;
})
},
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true;
Api.update(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')
},
l(key) {
key = "routing_step" + "." + key;
return this.$t(key)
import Api from "./api";
import iQuill from '@/components/quill'
export default {
name: "Edit",
components: { iQuill },
data() {
return {
disabled: false,
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
}
},
watch: {
eid(v) {
if (v != 0) {
this.load(v);
}
}
};
},
props: {
eid: Number
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.get({ id: v }).then(r => {
console.log(r)
this.entity = r.result;
// this.entity.status.toString
});
},
handleSubmit() {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
Api.update(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);
});
}
});
},
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.bugForm.content += img
// }, 1000)
// // new R
// }
},
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "routing_step" + "." + key;
return this.$t(key);
}
},
watch: {
eid(v) {
if (v != 0) {
this.load(v);
}
}
}
};
</script>
\ No newline at end of file
<template>
<div>
<DataGrid :columns="columns" ref="grid" :action="action"><template slot="easySearch"><Form ref="formInline" :model="easySearch" inline><FormItem prop="keys"><Input placeholder="请输入关键字工步名称/描述/备注/工步内容" v-model="easySearch.keys.value" /> </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" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
<div>
<DataGrid :columns="columns" ref="grid" :action="action">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<!-- <Poptip trigger="focus" title="Title" content="请输入关键字工步名称/描述/备注/工步内容"> -->
<FormItem prop="keys">
<Input placeholder="请输入关键字工步名称/描述/备注/工步内容" v-model="easySearch.keys.value" />
</FormItem>
<!-- <Poptip/> -->
<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" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</template>
<script>
import Api from './api'
import Search from './search'
import Api from "./api";
import Search from "./search";
export default {
name: 'list',
components:{
name: "list",
components: {
Search
},
head: {
title: "工步",
author: "henq",
description: "routing_step 4/28/2020 4:23:17 PM",
},
},
head: {
title: "工步",
author: "henq",
description: "routing_step 4/28/2020 4:23:17 PM"
},
data() {
return {
action: Api.index,
easySearch: {
keys:{op:"name,description,remark,stepContent",value:null}
},
modal: false,
title:"新增",
detail:null,
curId: 0,
return {
action: Api.index,
easySearch: {
keys: { op: "name,description,remark,stepContent", value: null }
},
modal: false,
title: "新增",
detail: null,
curId: 0,
columns: [
{ key:"id",title:this.l("id") ,hide:true ,align:"left" },
{ key:"creationTime",title:this.l("creationTime") ,hide:true ,align:"left" ,high:true },
{ key:"creatorUserId",title:this.l("creatorUserId") ,hide:true ,align:"left" ,high:true },
{ key:"lastModificationTime",title:this.l("lastModificationTime") ,hide:true ,align:"left" ,high:true },
{ key:"lastModifierUserId",title:this.l("lastModifierUserId") ,hide:true ,align:"left" ,high:true },
{ key:"routingHeaderId",title:this.l("routingHeaderId") ,hide:true ,align:"left" },
{ key:"routingDetailId",title:this.l("routingDetailId") ,hide:true ,align:"left" },
{ key:"classId",title:this.l("classId") ,hide:true ,align:"left" },
{ key:"stepSeq",title:this.l("stepSeq") ,align:"left" ,high:true },
{ key:"name",title:this.l("name") ,align:"left" ,easy:true ,high:true },
{ key:"description",title:this.l("description") ,align:"left" ,easy:true ,high:true },
{ key:"status",title:this.l("status") ,align:"left" ,high:true ,code:'Process.Status' },
{
title: '操作',
key: 'action',
width: 140,
align: 'center',
render: (h, params) => {
return h('div', { class: "action" }, [
h('op', { attrs: { oprate: 'detail' }, on: { click: () => this.view(params.row.id) } }, '查看'),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h('op', { attrs: { oprate: 'edit'}, on: { click: () => this.edit(params.row.id) } }, '编辑'),
h('op', { attrs: { oprate: 'delete' }, on: { click: () => this.remove(params.row.id) } }, '删除')
])
}
},
{ key: "id", title: this.l("id"), hide: true, align: "left" },
{
key: "creationTime",
title: this.l("creationTime"),
hide: true,
align: "left",
high: true
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
hide: true,
align: "left",
high: true
},
{
key: "lastModificationTime",
title: this.l("lastModificationTime"),
hide: true,
align: "left",
high: true
},
{
key: "lastModifierUserId",
title: this.l("lastModifierUserId"),
hide: true,
align: "left",
high: true
},
{
key: "routingHeaderId",
title: this.l("routingHeaderId"),
high: true,
align: "left"
},
{
key: "routingDetailId",
title: this.l("routingDetailId"),
high: true,
align: "left"
},
{ key: "classId", title: this.l("classId"), hide: true, align: "left" },
{ key: "stepSeq", title: this.l("stepSeq"), align: "left", high: true },
{
key: "name",
title: this.l("name"),
align: "left",
easy: true,
high: true
},
{
key: "description",
title: this.l("description"),
align: "left",
hide: true
},
{
key: "stepContent",
title: this.l("stepContent"),
align: "left",
hide: true
},
{
key: "status",
title: this.l("status"),
align: "left",
high: true,
code: "Process.Status"
},
{
title: "操作",
key: "action",
width: 140,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
h(
"op",
{
attrs: { oprate: "detail" },
on: { click: () => this.view(params.row.id) }
},
"查看"
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h(
"op",
{
attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row.id) }
},
"编辑"
),
h(
"op",
{
attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row.id) }
},
"删除"
)
]);
}
}
]
}
};
},
mounted(){
mounted() {
console.log(this);
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
},
methods:{
ok() {
this.$refs.grid.load()
this.modal = false
this.curId = 0;
},
search() {
this.$refs.grid.reload(this.easySearch)
},
add() {
this.curId = 0;
this.title = "新增";
this.detail =()=> import('./add')
this.modal = true;
},
copy(id) {
this.curId = id;
this.title = "克隆";
this.detail = () =>import('./add')
this.modal = true;
},
view(id) {
this.curId = id;
this.title = "详情";
this.detail = () =>import('./detail')
this.modal = true;
},
edit(id) {
this.curId = id;
this.title = "编辑";
this.detail = () => import('./edit')
this.modal = true;
},
remove(id) {
Api.delete(id).then((r) => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success('删除成功')
}
})
},
cancel() {
this.curId = 0;
this.modal = false
},
l(key) {
/*
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
ok() {
this.$refs.grid.load();
this.modal = false;
this.curId = 0;
},
search() {
this.$refs.grid.reload(this.easySearch);
},
add() {
this.curId = 0;
this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
},
copy(id) {
this.curId = id;
this.title = "克隆";
this.detail = () => import("./add");
this.modal = true;
},
view(id) {
this.curId = id;
this.title = "详情";
this.detail = () => import("./detail");
this.modal = true;
},
edit(id) {
this.curId = id;
this.title = "编辑";
this.detail = () => import("./edit");
this.modal = true;
},
remove(id) {
Api.delete(id).then(r => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success("删除成功");
}
});
},
cancel() {
this.curId = 0;
this.modal = false;
},
l(key) {
/*
routing_step:{
id:'',
creationTime:'创建时间',
......@@ -142,11 +230,11 @@ keys:{op:"name,description,remark,stepContent",value:null}
extend:'扩展字段',
}
*/
let vkey = "routing_step" + "." + key;
return this.$t(vkey)||key
}
let vkey = "routing_step" + "." + key;
return this.$t(vkey) || key;
}
}
}
};
</script>
<style lang="less">
</style>
\ No newline at end of file
......@@ -16,7 +16,7 @@
right: 0;
// bottom:100%;
// right: 100%;
z-index: 990;
z-index: 898;
background-color: white;
// background: red;
.top {
......
<template>
<div>
<div v-width="400">
<InputTime v-model="time"></InputTime>
</div>
{{time}}
</div>
</template>
<script>
export default {
layout: 'empty',
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
},
data() {
return {
time: 39470,
}
},
created() {
// this.setList();
// alert(1234321)
// var arrs = []
// for (let i = 0; i < 5; i++) {
// arrs.push(i)
// }
// this.list = arrs
},
mounted() {
},
methods: {
},
}
</script>
\ No newline at end of file
......@@ -44,6 +44,7 @@ import ProductNumberSelect from '@/components/page/productNumberSelect.vue'
import ProductSelect from '@/components/page/productSelect.vue'
import DTSpan from '@/components/page/dtSpan.vue'
import DTSearch from '@/components/page/dtSearch.vue'
import InputTime from '@/components/page/inputTime.vue'
// import FormMaking from 'form-making'
// import 'form-making/dist/FormMaking.css'
......@@ -94,6 +95,7 @@ Vue.component("ProductNumberSelect", ProductNumberSelect)
Vue.component("ProductSelect", ProductSelect)
Vue.component("DTSpan", DTSpan)
Vue.component("DTSearch", DTSearch)
Vue.component("InputTime", InputTime)
//注入mock
// require("../mock")
......
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