Commit 037d9634 by Mr. Lan

添加工单优先级。

parent df95094c
...@@ -31,6 +31,19 @@ ...@@ -31,6 +31,19 @@
<span v-if="scope.row.is_end===0">{{ scope.row.principals }}</span> <span v-if="scope.row.is_end===0">{{ scope.row.principals }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="优先级" :show-overflow-tooltip="true" width="120" align="center">
<template slot-scope="scope">
<span v-if="scope.row.priority===2">
<el-tag type="warning">紧急</el-tag>
</span>
<span v-else-if="scope.row.priority===3">
<el-tag type="danger">非常紧急</el-tag>
</span>
<span v-else>
<el-tag type="success">正常</el-tag>
</span>
</template>
</el-table-column>
<el-table-column label="是否结束" :show-overflow-tooltip="true" width="80" align="center"> <el-table-column label="是否结束" :show-overflow-tooltip="true" width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.is_end===0" size="mini" type="success"></el-tag> <el-tag v-if="scope.row.is_end===0" size="mini" type="success"></el-tag>
......
...@@ -22,9 +22,16 @@ ...@@ -22,9 +22,16 @@
</div> </div>
<div class="text item"> <div class="text item">
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px"> <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px">
<el-form-item label="标题" prop="title" style="margin-bottom: 0"> <el-form-item label="标题:" prop="title" style="margin-bottom: 13px">
<el-input v-model="ruleForm.title" size="small" /> <el-input v-model="ruleForm.title" size="small" />
</el-form-item> </el-form-item>
<el-form-item label="优先级:" prop="priority" style="margin-bottom: 0">
<el-radio-group v-model="ruleForm.priority" size="small">
<el-radio :label="1">正常</el-radio>
<el-radio :label="2">紧急</el-radio>
<el-radio :label="3">非常紧急</el-radio>
</el-radio-group>
</el-form-item>
</el-form> </el-form>
</div> </div>
</el-card> </el-card>
...@@ -80,6 +87,7 @@ export default { ...@@ -80,6 +87,7 @@ export default {
processStructureValue: {}, processStructureValue: {},
ruleForm: { ruleForm: {
title: '', title: '',
priority: 1,
process: '', process: '',
classify: '', classify: '',
state: [], state: [],
...@@ -95,6 +103,9 @@ export default { ...@@ -95,6 +103,9 @@ export default {
rules: { rules: {
title: [ title: [
{ required: true, message: '请输入工单标题', trigger: 'blur' } { required: true, message: '请输入工单标题', trigger: 'blur' }
],
priority: [
{ required: true, message: '请选择工单优先级', trigger: 'blur' }
] ]
}, },
remoteFunc: { remoteFunc: {
...@@ -166,6 +177,7 @@ export default { ...@@ -166,6 +177,7 @@ export default {
Promise.all(promiseList).then(values => { Promise.all(promiseList).then(values => {
this.ruleForm.source = this.processStructureValue.nodes[this.active].id this.ruleForm.source = this.processStructureValue.nodes[this.active].id
this.ruleForm.tpls.form_data = values this.ruleForm.tpls.form_data = values
console.log(this.ruleForm)
createWorkOrder(this.ruleForm).then(response => { createWorkOrder(this.ruleForm).then(response => {
if (response.code === 200) { if (response.code === 200) {
this.$router.push({ path: '/process/upcoming' }) this.$router.push({ path: '/process/upcoming' })
......
...@@ -31,8 +31,19 @@ ...@@ -31,8 +31,19 @@
</div> </div>
<div class="text item"> <div class="text item">
<el-form label-width="100px"> <el-form label-width="100px">
<el-form-item label="标题: " style="margin-bottom: 0"> <el-form-item label="标题:" style="margin-bottom: 5px">
<span>{{ workOrderTitle }}</span> <span>{{ processStructureValue.workOrder.title }}</span>
</el-form-item>
<el-form-item label="优先级:" style="margin-bottom: 0">
<span v-if="processStructureValue.workOrder.priority===2">
<el-tag type="warning">紧急</el-tag>
</span>
<span v-else-if="processStructureValue.workOrder.priority===3">
<el-tag type="danger">非常紧急</el-tag>
</span>
<span v-else>
<el-tag type="success">正常</el-tag>
</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -126,9 +137,10 @@ export default { ...@@ -126,9 +137,10 @@ export default {
alertMessage: '', alertMessage: '',
nodeStepList: [], nodeStepList: [],
circulationHistoryList: [], circulationHistoryList: [],
workOrderTitle: '',
activeIndex: 0, activeIndex: 0,
processStructureValue: {}, processStructureValue: {
workOrder: { title: '' }
},
ruleForm: { ruleForm: {
title: '', title: '',
process: '', process: '',
...@@ -164,7 +176,6 @@ export default { ...@@ -164,7 +176,6 @@ export default {
workOrderId: this.$route.query.workOrderId workOrderId: this.$route.query.workOrderId
}).then(response => { }).then(response => {
this.processStructureValue = response.data this.processStructureValue = response.data
this.workOrderTitle = this.processStructureValue.workOrder.title
this.circulationHistoryList = this.processStructureValue.circulationHistory this.circulationHistoryList = this.processStructureValue.circulationHistory
// 获取当前展示节点列表 // 获取当前展示节点列表
......
...@@ -31,6 +31,19 @@ ...@@ -31,6 +31,19 @@
<span v-if="scope.row.is_end===0">{{ scope.row.principals }}</span> <span v-if="scope.row.is_end===0">{{ scope.row.principals }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="优先级" :show-overflow-tooltip="true" width="120" align="center">
<template slot-scope="scope">
<span v-if="scope.row.priority===2">
<el-tag type="warning">紧急</el-tag>
</span>
<span v-else-if="scope.row.priority===3">
<el-tag type="danger">非常紧急</el-tag>
</span>
<span v-else>
<el-tag type="success">正常</el-tag>
</span>
</template>
</el-table-column>
<el-table-column label="是否结束" :show-overflow-tooltip="true" width="80" align="center"> <el-table-column label="是否结束" :show-overflow-tooltip="true" width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.is_end===0" size="mini" type="success"></el-tag> <el-tag v-if="scope.row.is_end===0" size="mini" type="success"></el-tag>
......
...@@ -31,6 +31,19 @@ ...@@ -31,6 +31,19 @@
<span v-if="scope.row.is_end===0">{{ scope.row.principals }}</span> <span v-if="scope.row.is_end===0">{{ scope.row.principals }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="优先级" :show-overflow-tooltip="true" width="120" align="center">
<template slot-scope="scope">
<span v-if="scope.row.priority===2">
<el-tag type="warning">紧急</el-tag>
</span>
<span v-else-if="scope.row.priority===3">
<el-tag type="danger">非常紧急</el-tag>
</span>
<span v-else>
<el-tag type="success">正常</el-tag>
</span>
</template>
</el-table-column>
<el-table-column label="是否结束" :show-overflow-tooltip="true" width="80" align="center"> <el-table-column label="是否结束" :show-overflow-tooltip="true" width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.is_end===0" size="mini" type="success"></el-tag> <el-tag v-if="scope.row.is_end===0" size="mini" type="success"></el-tag>
......
...@@ -31,6 +31,19 @@ ...@@ -31,6 +31,19 @@
<span v-if="scope.row.is_end===0">{{ scope.row.principals }}</span> <span v-if="scope.row.is_end===0">{{ scope.row.principals }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="优先级" :show-overflow-tooltip="true" width="120" align="center">
<template slot-scope="scope">
<span v-if="scope.row.priority===2">
<el-tag type="warning">紧急</el-tag>
</span>
<span v-else-if="scope.row.priority===3">
<el-tag type="danger">非常紧急</el-tag>
</span>
<span v-else>
<el-tag type="success">正常</el-tag>
</span>
</template>
</el-table-column>
<el-table-column label="是否结束" :show-overflow-tooltip="true" width="80" align="center"> <el-table-column label="是否结束" :show-overflow-tooltip="true" width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.is_end===0" size="mini" type="success"></el-tag> <el-tag v-if="scope.row.is_end===0" size="mini" type="success"></el-tag>
......
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 sign in to comment