Commit 406d62d3 authored by renjintao's avatar renjintao

details 列表

parent a43fe07b
<template> <template>
<div class="detail"> <div class="orderDetail">
<Row> <Row>
<Filed :span="12" :name="l('mesCode')">{{entity.mesCode}}</Filed> <Col span="8">
<Filed :span="12" :name="l('taskType')"> <span class="fwBold">{{l('mesCode')}}</span>
<state code="plan.order.taskType" :value="entity.taskType" type="text"></state> <p>{{entity.mesCode}}</p>
</Filed> </Col>
<Filed :span="12" :name="l('quantity')">{{entity.quantity}}</Filed> <Col span="8">
<Filed :span="12" :name="l('status')"> <span class="fwBold">{{l('taskType')}}</span>
<state code="plan.order.status" :value="entity.status" type="text"></state> <p> <state code="plan.order.taskType" :value="entity.taskType" type="text"></state></p>
</Filed> </Col>
<Filed :span="12" :name="l('productName')">{{entity.productName}}</Filed> <Col span="8">
<Filed :span="12" :name="l('drawnNumber')">{{entity.drawnNumber}}</Filed> <span class="fwBold">{{l('quantity')}}</span>
<Filed :span="12" :name="l('batchNumber')">{{entity.batchNumber}}</Filed> <p>{{entity.quantity}}</p>
<Filed :span="12" :name="l('projectNumber')">{{entity.projectNumber}}</Filed> </Col>
<Filed :span="12" :name="l('urgencyLevel')">
<state code="plan.order.urgencyLevel" :value="entity.urgencyLevel" type="text"></state>
</Filed>
<Filed :span="12" :name="l('demandStartDate')"><DTSpan type="date" v-model="entity.demandStartDate"></DTSpan></Filed>
<Filed :span="12" :name="l('demandFinishDate')"><DTSpan type="date" v-model="entity.demandFinishDate"></DTSpan></Filed>
<Filed :span="12" :name="l('taskRequire')">{{entity.taskRequire}}</Filed>
<Filed :span="24" :name="l('remark')">{{entity.remark}}</Filed>
</Row> </Row>
<Row>
<Col span="8">
<span class="fwBold">{{l('status')}}</span>
<p><state code="plan.order.status" :value="entity.status" type="text"></state></p>
</Col>
<Col span="8">
<span class="fwBold">{{l('productName')}}</span>
<p>{{entity.productName}}</p>
</Col>
<Col span="8">
<span class="fwBold">{{l('drawnNumber')}}</span>
<p>{{entity.drawnNumber}}</p>
</Col>
</Row>
<Row>
<Col span="8">
<span class="fwBold">{{l('batchNumber')}}</span>
<p>{{entity.batchNumber}}</p>
</Col>
<Col span="8">
<span class="fwBold">{{l('projectNumber')}}</span>
<p>{{entity.projectNumber}}</p>
</Col>
<Col span="8">
<span class="fwBold">{{l('urgencyLevel')}}</span>
<p><state code="plan.order.urgencyLevel" :value="entity.urgencyLevel" type="text"></state></p>
</Col>
</Row>
<Row>
<Col span="8">
<span class="fwBold">{{l('demandStartDate')}}</span>
<p><DTSpan type="date" v-model="entity.demandStartDate"></DTSpan></p>
</Col>
<Col span="8">
<span class="fwBold">{{l('demandFinishDate')}}</span>
<p><DTSpan type="date" v-model="entity.demandFinishDate"></DTSpan></p>
</Col>
<Col span="8">
<span class="fwBold">{{l('taskRequire')}}</span>
<p>{{entity.taskRequire}}</p>
</Col>
</Row>
<Row class="lastRow">
<Col span="24">
<span class="fwBold">{{l('remark')}}</span>
<p>{{entity.remark}}</p>
</Col>
</Row>
</div> </div>
</template> </template>
<script> <script>
...@@ -47,7 +89,7 @@ export default { ...@@ -47,7 +89,7 @@ export default {
l(key) { l(key) {
key = "mes_plan" + "." + key; key = "mes_plan" + "." + key;
return this.$t(key); return this.$t(key);
}, }
}, },
watch: { watch: {
row(v) { row(v) {
...@@ -58,3 +100,20 @@ export default { ...@@ -58,3 +100,20 @@ export default {
} }
}; };
</script> </script>
<style lang="less">
.orderDetail
{
line-height: 30px;
width: 90%;
margin: 0 auto;
.ivu-row{
padding-top: 20px;
padding-bottom: 20px;
border-bottom:#ccc solid 1px;
}
.lastRow
{
border-bottom:none;
}
}
</style>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<Modal v-model="editModal" title="编辑" footer-hide width="1200"> <Modal v-model="editModal" title="编辑" footer-hide width="1200">
<Edit :row="rowData" @on-close="cancel" @on-ok="addOk" /> <Edit :row="rowData" @on-close="cancel" @on-ok="addOk" />
</Modal> </Modal>
<Modal v-model="detailModal" title="详情" width="1200"> <Modal v-model="detailModal" title="订单详情" width="900">
<Detail :row="rowData" /> <Detail :row="rowData" />
</Modal> </Modal>
<Modal v-model="splitModal" title="订单分解" width="1200"> <Modal v-model="splitModal" title="订单分解" width="1200">
...@@ -297,7 +297,7 @@ export default { ...@@ -297,7 +297,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "detail", title: "查看" }, attrs: { oprate: "detail", },
on: { click: () => this.detail(params.row) } on: { click: () => this.detail(params.row) }
}, },
"查看" "查看"
...@@ -305,7 +305,7 @@ export default { ...@@ -305,7 +305,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "edit", title: "编辑" }, attrs: { oprate: "edit", },
on: { click: () => this.edit(params.row) }, on: { click: () => this.edit(params.row) },
style: style:
(params.row.status == 1 && (params.row.status == 1 &&
...@@ -321,7 +321,7 @@ export default { ...@@ -321,7 +321,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "remove", title: "删除" }, attrs: { oprate: "remove", },
on: { click: () => this.remove(params.row) }, on: { click: () => this.remove(params.row) },
style: style:
(params.row.status == 1 && (params.row.status == 1 &&
...@@ -336,7 +336,7 @@ export default { ...@@ -336,7 +336,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "detail", title: "分解" }, attrs: { oprate: "detail", },
on: { click: () => this.split(params.row) }, on: { click: () => this.split(params.row) },
style: style:
(params.row.divideMark != 0 && (params.row.divideMark != 0 &&
......
...@@ -23,7 +23,11 @@ export default { ...@@ -23,7 +23,11 @@ export default {
deletes(params) { deletes(params) {
return Api.post(`${technologyUrl}routingdetail/batchdelete`, params); return Api.post(`${technologyUrl}routingdetail/batchdelete`, params);
}, },
pagedDetails(params) { //获取工序列表 pagedDetails(params) { //根据工艺规程ID获取工序列表
return Api.get(`${technologyUrl}routingdetail/getlistbyheaderid`, params); return Api.get(`${technologyUrl}routingdetail/getlistbyheaderid`, params);
}, },
getdetailsteps(params) { //根据工艺规程ID获取工序及对应工步的列表
return Api.get(`${technologyUrl}routingdetail/getdetailsteps`, params);
},
} }
<template>
<div class="excute">
<DataGrid
:columns="columnsExpand"
ref="gridExpand"
:data="listExpand"
:tool="false"
:height="gridHeight"
:page="false"
></DataGrid>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "expand",
props: {
row: { type: Array, default: [] }
},
data() {
return {
columnsExpand: [
{
key: "id",
title: this.l("id"),
align: "left",
hide: true
},
{
key: "routingHeaderId",
title: this.l("routingHeaderId"),
hide: true,
align: "left",
hide: true
},
{
key: "routingDetailId",
title: this.l("routingDetailId"),
hide: true,
align: "left"
},
{
key: "classId",
title: this.l("classId"),
align: "left",
hide: true
},
{
key: "stepSeq",
title: this.l("stepSeq"),
align: "left",
width:120
},
{
key: "name",
title: this.l("name"),
align: "left"
},
{
key: "status",
title: this.l("status"),
align: "center",
code: "Process.Status",
width: 100
},
{
key: "stepContent",
title: this.l("stepContent"),
align: "left",
width: 800,
tooltip: true
},
{
key: "creationTime",
title: this.l("creationTime"),
hide: true,
align: "left"
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
hide: true,
align: "left"
},
{
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: "edit" },
on: { click: () => this.edit(params.row.id) }
},
"编辑"
),
h(
"op",
{
attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row.id) }
},
"删除"
)
]);
}
}
],
listExpand: [],
gridHeight: 50
};
},
mounted() {
this.loadList();
},
methods: {
loadList() {
this.listExpand = this.row;
this.gridHeight = 50;
if (this.listExpand.length > 0) {
this.gridHeight = 52 + this.listExpand.length * 50;
} else {
this.gridHeight = 102;
}
},
l(key) {
let vkey = "routing_step" + "." + key;
return this.$t(vkey) || key;
}
},
watch: {
row(v) {
if (v && v.length > 0) {
this.listExpand = v;
}
}
}
};
</script>
<style scoped>
.excute table tr th span,
.excute table tr td {
font-size: 10px;
}
</style>
\ No newline at end of file
<template> <template>
<div> <div>
<DataGrid :columns="columns" ref="grid" :conditions="easySearch" :action="action"> <DataGrid :columns="columns" ref="grid" :data="list" :easy="false" :high="false">
<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">查询 {{headerid}}vv</Button>
</FormItem>
</Form>
</template>
<template slot="searchForm">
<Search />
</template>
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="add">新增</Button>
</template> </template>
...@@ -26,6 +13,7 @@ ...@@ -26,6 +13,7 @@
<script> <script>
import Api from "./api"; import Api from "./api";
import Search from "./search"; import Search from "./search";
import expandRow from "./expand.vue";
export default { export default {
name: "list", name: "list",
components: { components: {
...@@ -47,228 +35,223 @@ export default { ...@@ -47,228 +35,223 @@ export default {
}, },
routingHeaderId: { op: "Equal", value: -1 } routingHeaderId: { op: "Equal", value: -1 }
}, },
// conditions: { routingHeaderId: { op: "Equal", value: -1 } }, // conditions: { routingHeaderId: { op: "Equal", value: -1 } },
modal: false, modal: false,
title: "新增", title: "新增",
detail: null, detail: null,
curId: 0, curId: 0,
columns: [ columns: [
{ key: "id", title: this.l("id"), hide: true, align: "left" },
{
key: "creationTime",
title: this.l("creationTime"),
hide: true,
align: "left"
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
hide: true,
align: "left"
},
{ {
key: "lastModificationTime", type: "expand",
title: this.l("lastModificationTime"), width: 50,
hide: true, render: (h, params) => {
align: "left" return h(expandRow, {
}, props: {
{ row: params.row.steps
key: "lastModifierUserId", }
title: this.l("lastModifierUserId"), });
hide: true, }
align: "left"
}, },
{ key: "classId", title: this.l("classId"), align: "left", high: true }, { key: "id", title: this.l("id"), hide: true, align: "left" },
{ key: "classId", title: this.l("classId"), align: "left" },
{ {
key: "routingHeaderId", key: "routingHeaderId",
title: this.l("routingHeaderId"), title: this.l("routingHeaderId"),
align: "left", align: "left"
high: true
}, },
{ {
key: "name", key: "name",
title: this.l("name"), title: this.l("name"),
align: "left", align: "left"
easy: true,
high: true
}, },
{ key: "taskSeq", title: this.l("taskSeq"), align: "left", high: true }, { key: "taskSeq", title: this.l("taskSeq"), align: "left" },
{ {
key: "description", key: "description",
title: this.l("description"), title: this.l("description"),
align: "left", align: "left"
easy: true,
high: true
}, },
{ {
key: "resourceId", key: "resourceId",
title: this.l("resourceId"), title: this.l("resourceId"),
align: "left", align: "left"
high: true
}, },
{ {
key: "resourceType", key: "resourceType",
title: this.l("resourceType"), title: this.l("resourceType"),
align: "left", align: "left",
high: true,
code: "Process.routing_detail.resource_type" code: "Process.routing_detail.resource_type"
}, },
{ key: "runtime", title: this.l("runtime"), align: "left", high: true }, { key: "runtime", title: this.l("runtime"), align: "left" },
{ {
key: "setupTime", key: "setupTime",
title: this.l("setupTime"), title: this.l("setupTime"),
align: "left", align: "left"
high: true
}, },
{ {
key: "transportTime", key: "transportTime",
title: this.l("transportTime"), title: this.l("transportTime"),
align: "left", align: "left"
high: true
}, },
{ {
key: "checkTime", key: "checkTime",
title: this.l("checkTime"), title: this.l("checkTime"),
align: "left", align: "left"
high: true
}, },
{ {
key: "checkFlag", key: "checkFlag",
title: this.l("checkFlag"), title: this.l("checkFlag"),
align: "left", align: "left",
high: true,
code: "Process.routing_detail.check_flag" code: "Process.routing_detail.check_flag"
}, },
{ {
key: "efficiencyValue", key: "efficiencyValue",
title: this.l("efficiencyValue"), title: this.l("efficiencyValue"),
align: "left", align: "left"
high: true
}, },
{ {
key: "singleOut", key: "singleOut",
title: this.l("singleOut"), title: this.l("singleOut"),
align: "left", align: "left"
high: true
}, },
{ {
key: "isOutside", key: "isOutside",
title: this.l("isOutside"), title: this.l("isOutside"),
align: "left", align: "left",
high: true,
code: "Process.state" code: "Process.state"
}, },
{ {
key: "departmentId", key: "departmentId",
title: this.l("departmentId"), title: this.l("departmentId"),
align: "left", align: "left"
high: true
}, },
{ {
key: "isImportant", key: "isImportant",
title: this.l("isImportant"), title: this.l("isImportant"),
align: "left", align: "left",
high: true,
code: "Process.state" code: "Process.state"
}, },
{ {
key: "milestoneId", key: "milestoneId",
title: this.l("milestoneId"), title: this.l("milestoneId"),
align: "left", align: "left"
high: true
}, },
{ key: "phaseId", title: this.l("phaseId"), align: "left", high: true }, { key: "phaseId", title: this.l("phaseId"), align: "left", high: true },
{ {
key: "status", key: "status",
title: this.l("status"), title: this.l("status"),
align: "left", align: "left",
high: true,
code: "Process.Status" code: "Process.Status"
}, },
{ {
key: "outsideTime", key: "outsideTime",
title: this.l("outsideTime"), title: this.l("outsideTime"),
align: "left", align: "left"
high: true
}, },
{ {
key: "performanceHours", key: "performanceHours",
title: this.l("performanceHours"), title: this.l("performanceHours"),
align: "left", align: "left"
high: true
}, },
{ {
key: "resourceCode", key: "resourceCode",
title: this.l("resourceCode"), title: this.l("resourceCode"),
align: "left", align: "left",
easy: true, easy: true
high: true
}, },
{ {
key: "isImportantResources", key: "isImportantResources",
title: this.l("isImportantResources"), title: this.l("isImportantResources"),
align: "left", align: "left",
high: true,
code: "Process.state" code: "Process.state"
}, },
{ {
key: "schedulingWorkingHours", key: "schedulingWorkingHours",
title: this.l("schedulingWorkingHours"), title: this.l("schedulingWorkingHours"),
align: "left", align: "left"
high: true
}, },
{ {
key: "realWorkingHours", key: "realWorkingHours",
title: this.l("realWorkingHours"), title: this.l("realWorkingHours"),
align: "left", align: "left"
high: true
}, },
{ {
key: "realRuntime", key: "realRuntime",
title: this.l("realRuntime"), title: this.l("realRuntime"),
align: "left", align: "left"
high: true
}, },
{ {
key: "performanceWorkingHours", key: "performanceWorkingHours",
title: this.l("performanceWorkingHours"), title: this.l("performanceWorkingHours"),
align: "left", align: "left"
high: true
}, },
{ {
key: "isParticipateIntime", key: "isParticipateIntime",
title: this.l("isParticipateIntime"), title: this.l("isParticipateIntime"),
align: "left", align: "left",
high: true,
code: "Process.state" code: "Process.state"
}, },
{ {
key: "equipType", key: "equipType",
title: this.l("equipType"), title: this.l("equipType"),
align: "left", align: "left",
easy: true, easy: true
high: true
}, },
{ {
key: "equipTypeId", key: "equipTypeId",
title: this.l("equipTypeId"), title: this.l("equipTypeId"),
align: "left", align: "left"
high: true
}, },
{ {
key: "note", key: "note",
title: this.l("note"), title: this.l("note"),
align: "left", align: "left",
easy: true, easy: true
high: true },
{
key: "creationTime",
title: this.l("creationTime"),
hide: true,
align: "left"
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
hide: true,
align: "left"
},
{
key: "lastModificationTime",
title: this.l("lastModificationTime"),
hide: true,
align: "left"
},
{
key: "lastModifierUserId",
title: this.l("lastModifierUserId"),
hide: true,
align: "left"
}, },
{ {
title: "操作", title: "操作",
key: "action", key: "action",
width: 140, width: 180,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", { class: "action" }, [
h(
"op",
{
attrs: { oprate: "detail" },
on: { click: () => this.view(params.row.id) }
},
"新增"
),
h( h(
"op", "op",
{ {
...@@ -297,18 +280,20 @@ export default { ...@@ -297,18 +280,20 @@ export default {
]); ]);
} }
} }
] ],
list: []
}; };
}, },
created() { created() {
console.warn("dfadf:",this.headerid) console.warn("dfadf:", this.headerid);
if(this.headerid!=-1){ if (this.headerid != -1) {
this.easySearch.routingHeaderId.value = this.headerid; this.easySearch.routingHeaderId.value = this.headerid;
}else{ } else {
this.easySearch.routingHeaderId.value=this.$route.query.id; this.easySearch.routingHeaderId.value = this.$route.query.id;
} }
}, },
mounted() { mounted() {
this.load();
// console.log(this); // console.log(this);
// alert(this.headerid); // alert(this.headerid);
// if(this.headerid){ // if(this.headerid){
...@@ -320,6 +305,20 @@ export default { ...@@ -320,6 +305,20 @@ export default {
}, },
methods: { methods: {
load() {
let params = {
id: this.$route.query.id
};
Api.getdetailsteps(params)
.then(r => {
if (r.success) {
this.list = r.result;
}
})
.catch(err => {
this.$Message.error("连接错误");
});
},
ok() { ok() {
this.$refs.grid.load(); this.$refs.grid.load();
this.modal = false; this.modal = false;
......
<template> <template>
<div> <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> <DataGrid :columns="columns" ref="grid" :action="action">
<FormItem><Button type="primary" @click="search">查询</Button></FormItem> <template slot="easySearch">
</Form></template> <Form ref="formInline" :model="easySearch" inline>
<template slot="searchForm"> <FormItem prop="keys">
<Search /> <Input placeholder="请输入关键字工步名称/描述/备注/工步内容" v-model="easySearch.keys.value" />
</template> </FormItem>
<template slot="buttons"> <FormItem>
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="search">查询</Button>
</template> </FormItem>
</DataGrid> </Form>
<Modal v-model="modal" :title="title" width="1200" footer-hide> </template>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" /> <template slot="searchForm">
</Modal> <Search />
</div> </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> </template>
<script> <script>
import Api from './api' import Api from "./api";
import Search from './search' import Search from "./search";
export default { export default {
name: 'list', name: "list",
components:{ components: {
Search Search
}, },
head: { head: {
title: "工步", title: "工步",
author: "henq", author: "henq",
description: "routing_step 4/28/2020 4:23:17 PM", description: "routing_step 4/28/2020 4:23:17 PM"
}, },
data() { data() {
return { return {
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys:{op:"name,description,remark,stepContent",value:null} keys: { op: "name,description,remark,stepContent", value: null }
}, },
modal: false, modal: false,
title:"新增", title: "新增",
detail:null, detail: null,
curId: 0, curId: 0,
columns: [ columns: [
{ key:"id",title:this.l("id") ,hide:true ,align:"left" }, { 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: "creationTime",
{ key:"lastModificationTime",title:this.l("lastModificationTime") ,hide:true ,align:"left" ,high:true }, title: this.l("creationTime"),
{ key:"lastModifierUserId",title:this.l("lastModifierUserId") ,hide:true ,align:"left" ,high:true }, hide: true,
{ key:"routingHeaderId",title:this.l("routingHeaderId") ,hide:true ,align:"left" }, align: "left",
{ key:"routingDetailId",title:this.l("routingDetailId") ,hide:true ,align:"left" }, high: true
{ 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: "creatorUserId",
{ key:"description",title:this.l("description") ,align:"left" ,easy:true ,high:true }, title: this.l("creatorUserId"),
{ key:"status",title:this.l("status") ,align:"left" ,high:true ,code:'Process.Status' }, hide: true,
{ align: "left",
title: '操作', high: true
key: 'action', },
width: 140, {
align: 'center', key: "lastModificationTime",
render: (h, params) => { title: this.l("lastModificationTime"),
return h('div', { class: "action" }, [ hide: true,
h('op', { attrs: { oprate: 'detail' }, on: { click: () => this.view(params.row.id) } }, '查看'), align: "left",
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'), high: true
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: "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) }
},
"删除"
)
]);
}
}
] ]
} };
}, },
mounted(){ mounted() {
console.log(this); console.log(this);
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods:{ methods: {
ok() { ok() {
this.$refs.grid.load() this.$refs.grid.load();
this.modal = false this.modal = false;
this.curId = 0; this.curId = 0;
}, },
search() { search() {
this.$refs.grid.reload(this.easySearch) this.$refs.grid.reload(this.easySearch);
}, },
add() { add() {
this.curId = 0; this.curId = 0;
this.title = "新增"; this.title = "新增";
this.detail =()=> import('./add') this.detail = () => import("./add");
this.modal = true; this.modal = true;
}, },
copy(id) { copy(id) {
this.curId = id; this.curId = id;
this.title = "克隆"; this.title = "克隆";
this.detail = () =>import('./add') this.detail = () => import("./add");
this.modal = true; this.modal = true;
}, },
view(id) { view(id) {
this.curId = id; this.curId = id;
this.title = "详情"; this.title = "详情";
this.detail = () =>import('./detail') this.detail = () => import("./detail");
this.modal = true; this.modal = true;
}, },
edit(id) { edit(id) {
this.curId = id; this.curId = id;
this.title = "编辑"; this.title = "编辑";
this.detail = () => import('./edit') this.detail = () => import("./edit");
this.modal = true; this.modal = true;
}, },
remove(id) { remove(id) {
Api.delete(id).then((r) => { Api.delete(id).then(r => {
if (r.success) { if (r.success) {
this.$refs.grid.load(); this.$refs.grid.load();
this.$Message.success('删除成功') this.$Message.success("删除成功");
} }
}) });
}, },
cancel() { cancel() {
this.curId = 0; this.curId = 0;
this.modal = false this.modal = false;
}, },
l(key) { l(key) {
/* /*
routing_step:{ routing_step:{
id:'', id:'',
creationTime:'创建时间', creationTime:'创建时间',
...@@ -142,11 +223,11 @@ keys:{op:"name,description,remark,stepContent",value:null} ...@@ -142,11 +223,11 @@ keys:{op:"name,description,remark,stepContent",value:null}
extend:'扩展字段', extend:'扩展字段',
} }
*/ */
let vkey = "routing_step" + "." + key; let vkey = "routing_step" + "." + key;
return this.$t(vkey)||key return this.$t(vkey) || key;
} }
} }
} };
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
\ No newline at end of file
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