add process flow and process node
This commit is contained in:
@@ -17,10 +17,12 @@
|
||||
<ProcessItem
|
||||
v-for="item in list"
|
||||
:key="item.id"
|
||||
:id="item.id"
|
||||
:name="item.name"
|
||||
:line="item.lineName"
|
||||
:desc="item.remark"
|
||||
:isActive="item.enabled" />
|
||||
:isActive="item.enabled"
|
||||
@edit="handleUpdate" />
|
||||
</section>
|
||||
|
||||
<base-dialog
|
||||
@@ -42,17 +44,29 @@
|
||||
|
||||
<script>
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import cache from './cache';
|
||||
// import cache from './cache';
|
||||
|
||||
const ProcessItem = {
|
||||
name: 'ProcessItem',
|
||||
components: {},
|
||||
props: ['name', 'line', 'desc', 'isActive'],
|
||||
props: ['id', 'name', 'line', 'desc', 'isActive'],
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {},
|
||||
methods: {},
|
||||
methods: {
|
||||
handleEdit() {
|
||||
this.$emit('edit', this.id);
|
||||
},
|
||||
handleViewDetail(e) {
|
||||
this.$router.push({
|
||||
name: 'ProcessFlowView',
|
||||
params: {
|
||||
id: this.id,
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
render: function (h) {
|
||||
return (
|
||||
<div
|
||||
@@ -60,9 +74,13 @@ const ProcessItem = {
|
||||
style="display: flex; flex-direction: column; position: relative;">
|
||||
<div
|
||||
class="process-item__content"
|
||||
style="flex: 1; display: flex; align-items: center;">
|
||||
{this.isActive && (
|
||||
style="flex: 1; display: flex; align-items: center; cursor: pointer;"
|
||||
title="点击查看详细工序列表"
|
||||
onClick={this.handleViewDetail}>
|
||||
{this.isActive ? (
|
||||
<span style="display: inline-block; width: 10px; height: 10px; border-radius: 100%; background: #0ebe3a; position: absolute; top: 20px; right: 20px;" />
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
<svg-icon
|
||||
icon-class="tree-table"
|
||||
@@ -75,7 +93,7 @@ const ProcessItem = {
|
||||
{this.name}
|
||||
</h2>
|
||||
<h3 style="margin: 0; font-weight: 400; font-size: 14px; line-height: 2; color: #888;">
|
||||
{this.line}
|
||||
{this.line || '/'}
|
||||
</h3>
|
||||
<p style="margin: 0; text-overflow: ellipse; white-space: nowrap; font-weight: 400; font-size: 14px; line-height: 1.25; color: #888;">
|
||||
{this.desc}
|
||||
@@ -89,7 +107,10 @@ const ProcessItem = {
|
||||
<el-col
|
||||
span={8}
|
||||
style="text-align: center; border-right: 1px solid #0001">
|
||||
<el-button type="text" style="color: #0007; line-height: 1.75">
|
||||
<el-button
|
||||
type="text"
|
||||
style="color: #0007; line-height: 1.75"
|
||||
onClick={this.handleEdit}>
|
||||
编辑
|
||||
</el-button>
|
||||
</el-col>
|
||||
@@ -122,6 +143,7 @@ export default {
|
||||
updateUrl: '/extend/process-flow/update',
|
||||
addUrl: '/extend/process-flow/create',
|
||||
pageUrl: '/extend/process-flow/page',
|
||||
infoUrl: '/extend/process-flow/get',
|
||||
searchBarKeys: ['name', 'code', 'lineId', 'productId'],
|
||||
searchBarFormConfig: [
|
||||
{
|
||||
@@ -161,7 +183,7 @@ export default {
|
||||
select: true,
|
||||
label: '产线',
|
||||
prop: 'lineId',
|
||||
cache: 'processFlow::lineList',
|
||||
// cache: 'processFlow::lineList',
|
||||
url: '/base/core-production-line/listAll',
|
||||
bind: {
|
||||
filterable: true,
|
||||
@@ -169,9 +191,13 @@ export default {
|
||||
},
|
||||
|
||||
{
|
||||
input: true,
|
||||
switch: true,
|
||||
label: '是否启用',
|
||||
prop: 'enabled',
|
||||
bind: {
|
||||
'active-value': 1,
|
||||
'inactive-value': 0,
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
@@ -222,6 +248,13 @@ export default {
|
||||
this.showUploadComponents = false;
|
||||
this.title = '添加工艺';
|
||||
},
|
||||
async handleUpdate(id) {
|
||||
this.reset();
|
||||
const { data } = await this.info({ id });
|
||||
this.form = data;
|
||||
this.open = true;
|
||||
this.title = '修改工艺';
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (!valid) {
|
||||
|
||||
Reference in New Issue
Block a user